/* ═══════════════════════════════════════════════════════════════
   D4 — Google Calendar booking modal — Variant "C — Halo Command Modal"
   (client-approved)
   Ported from design-variants/D4-google-calendar.html: the shared
   (non-gated) calendar-engine styles it depends on (.d4-cal-*,
   .d4-slots/.d4-slot, .d4-field, .d4-confirm-btn, .d4-success*,
   .d4-microhint, .d4-placeholder) plus the [data-variant="c"]-gated
   halo modal skin, with the ancestor prefix stripped since this page
   only ever uses variant C.

   Availability is loaded from the same-origin PHP backend. Google
   credentials and Calendar IDs never reach the browser.

   Reuses existing tokens from premium.css :root — no new colors.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Micro-hint near the hero CTA (H5, revealed 5s after load) ── */
/* A separate consultation row below the contact heading. */
.contact-form .contact-form-title--consultation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 24px;
}

.contact-form-title--consultation h3 {
    min-width: 0;
    margin-bottom: 0 !important;
}

.contact-consultation {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
}

.contact-consultation p {
    margin: 0;
    color: var(--white);
    font-size: 14px;
    line-height: 1.5;
}

.contact-consultation-button {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--accent);
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.contact-consultation-button:hover {
    background: var(--accent);
    color: var(--ink);
}

.contact-consultation-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.d4-microhint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--accent);
    margin: 16px 0 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.d4-microhint.is-shown {
    opacity: 1;
    transform: translateY(0);
}

.d4-microhint i {
    font-size: 0.78rem;
}

/* ══════════════════════════════════════════════════════
   SHARED CALENDAR STRUCTURE
   ══════════════════════════════════════════════════════ */
.d4-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.d4-cal-label {
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.95rem;
    color: var(--white);
    letter-spacing: -0.01em;
}

.d4-cal-nav {
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-hover);
    background: transparent;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.d4-cal-nav:hover:not(:disabled) {
    border-color: var(--accent-border);
    color: var(--accent);
}

.d4-cal-nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.d4-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.d4-cal-weekdays span {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding-bottom: 4px;
}

.d4-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.d4-cal-day {
    appearance: none;
    border: none;
    background: transparent;
    min-width: 0;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: var(--white);
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.d4-cal-day.is-outside {
    color: var(--muted);
    opacity: 0.3;
}

.d4-cal-day.is-disabled {
    color: var(--muted);
    opacity: 0.32;
    cursor: not-allowed;
}

.d4-cal-day .d4-cal-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
}

.d4-cal-day.is-selected .d4-cal-dot,
.d4-cal-day.is-today .d4-cal-dot {
    opacity: 0;
}

.d4-cal-day:not(.is-disabled):not(.is-outside):hover {
    background: var(--surface-2);
}

.d4-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.d4-slot {
    appearance: none;
    border: 1px solid var(--border-hover);
    background: var(--surface-2);
    color: var(--white);
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 100px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.d4-slot:hover:not(:disabled) {
    border-color: var(--accent-border);
    color: var(--accent);
}

.d4-slot.is-picked {
    background: var(--accent);
    border-color: var(--accent);
    color: #0d0d0d;
    -webkit-text-fill-color: #0d0d0d;
    text-shadow: none;
}

.d4-slot.is-picked:hover,
.d4-slot.is-picked:focus-visible,
.d4-slot.is-picked:active {
    color: #0d0d0d;
    -webkit-text-fill-color: #0d0d0d;
}

.d4-slot:disabled {
    color: var(--muted);
    opacity: 0.35;
    text-decoration: line-through;
    cursor: not-allowed;
}

.d4-empty-msg {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.d4-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.d4-field label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.d4-field input,
.d4-field textarea,
.d4-field select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--ink);
    border: 1px solid var(--border-hover);
    border-radius: var(--r-sm);
    color: var(--white);
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s;
}

.d4-field textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    line-height: 1.5;
}

.d4-field select {
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 38px;
}

.d4-field select option {
    background: var(--surface);
    color: var(--white);
}

.d4-field input:focus,
.d4-field textarea:focus,
.d4-field select:focus {
    border-color: var(--accent);
}

.d4-field input::placeholder,
.d4-field textarea::placeholder {
    color: var(--muted);
}

.d4c-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}

.d4-confirm-btn {
    appearance: none;
    border: none;
    width: 100%;
    background: var(--accent);
    color: var(--ink);
    font-family: 'Manrope', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 13px 24px;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.d4-confirm-btn:hover {
    background: #d4af67;
    transform: translateY(-2px);
}

.d4-confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.d4-summary-line {
    font-size: 0.9rem;
    color: var(--white);
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border-hover);
}

.d4-summary-line strong {
    color: var(--accent);
}

.d4-success {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.d4-success-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.d4-success-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.d4-success h4 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.05rem;
    color: var(--white);
    margin: 0;
}

.d4-success-summary {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}

.d4-success-summary strong {
    color: var(--accent);
}

.d4-success-reset {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.78rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.d4-success-reset:hover {
    color: var(--white);
}

.d4-placeholder {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

.d4-placeholder.is-error,
.d4-form-message {
    color: #ffb7b7;
}

.d4c-service-field {
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: rgba(0, 0, 0, 0.14);
}

.d4c-service-field > label {
    color: var(--accent);
}

.d4c-service-status {
    min-height: 1.4em;
    margin: 2px 0 0;
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--muted);
}

.d4c-service-status.is-loading {
    color: var(--white);
}

.d4c-service-status.is-ready {
    color: var(--accent);
}

.d4c-service-status.is-error {
    color: #ffb7b7;
}

#d4c-cal {
    transition: opacity 0.2s ease;
}

#d4c-cal.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

.d4-retry-btn {
    appearance: none;
    margin-top: 10px;
    padding: 9px 14px;
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    background: transparent;
    color: var(--accent);
    font: 700 0.78rem/1 'Manrope', sans-serif;
    cursor: pointer;
}

.d4-contact-hint {
    margin: -3px 0 0;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.d4-consent {
    align-items: start;
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.5;
}

.d4-consent .consent-checkmark {
    margin-top: 1px;
}

.d4-consent a,
.d4-meet-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.d4-form-message {
    min-height: 1.35em;
    margin: -2px 0 0;
    font-size: 0.76rem;
    line-height: 1.45;
}

.d4-meet-link {
    display: inline-flex;
    margin-top: 2px;
    font-size: 0.82rem;
    font-weight: 700;
}

/* ══════════════════════════════════════════════════════
   VARIANT C — "HALO COMMAND MODAL" (full-screen modal)
   Soft backlit glow + top light strip, matching D1's
   "Halo Signal" / "Lit Foil" card skins.
   ══════════════════════════════════════════════════════ */
.d4c-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 8, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.d4c-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.d4c-modal {
    width: min(860px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 162, 85, 0.5) transparent;
    background: linear-gradient(155deg, #201f1a 0%, var(--surface) 55%, #14120c 100%);
    border: 1px solid rgba(201, 162, 85, 0.3);
    border-radius: var(--r-lg) 0 0 var(--r-lg);
    position: relative;
    padding: 34px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 36px;
    box-shadow:
        0 40px 90px -24px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.4s var(--ease-out);
}

.d4c-modal::-webkit-scrollbar-thumb {
    border-color: #1c1a15;
}

.d4c-backdrop.is-open .d4c-modal {
    transform: translateY(0) scale(1);
}

.d4c-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
    opacity: 0.7;
}

.d4c-modal::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 20%;
    right: 20%;
    height: 220px;
    background: radial-gradient(ellipse at center, rgba(201, 162, 85, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.d4c-close {
    position: absolute;
    top: 18px;
    right: 18px;
    appearance: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-hover);
    background: var(--surface-2);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s, color 0.2s;
    z-index: 2;
}

.d4c-close:hover {
    border-color: var(--accent-border);
    color: var(--accent);
}

.d4c-modal-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.15rem;
    color: var(--white);
    margin: 0 0 4px;
}

.d4c-modal-sub {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 22px;
}

.d4c-modal .d4-cal-day.is-selected {
    background: transparent;
    color: var(--ink);
}

.d4c-modal .d4-cal-day.is-selected::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: radial-gradient(circle, var(--accent) 0%, var(--accent) 60%, rgba(201, 162, 85, 0.3) 100%);
    box-shadow: 0 0 18px 2px rgba(201, 162, 85, 0.55);
    z-index: -1;
}

.d4c-modal .d4-cal-day.is-selected .d4-cal-daynum {
    color: var(--ink);
    position: relative;
}

.d4c-modal .d4-cal-day.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1px var(--accent-border);
}

.d4c-side {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: start;
    position: sticky;
    top: 0;
}

.d4c-side-heading {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0;
}

@media (max-width: 760px) {
    .d4c-modal {
        grid-template-columns: 1fr;
        padding: 28px 22px;
        max-height: 92vh;
    }

    .d4c-side {
        position: static;
    }
}

@media (prefers-reduced-motion: reduce) {
    .d4-microhint,
    .d4c-backdrop,
    .d4c-modal,
    .d4-cal-day,
    .d4-slot,
    .d4-confirm-btn {
        transition: none !important;
        animation: none !important;
    }
}
