/* ===========================================================================
   Contact page foundation and shared design tokens
   ========================================================================== */

/* The contact surface follows the established red, ink and warm-paper system. */
.csp-contact-page {
    --contact-red: #f10100;
    --contact-red-deep: #b90201;
    --contact-ink: #171717;
    --contact-copy: #5d5d5d;
    --contact-muted: #818181;
    --contact-white: #ffffff;
    --contact-soft: #f7f7f5;
    --contact-warm: #fffaf5;
    --contact-line: #e8e8e4;
    --contact-radius: 7px;
    padding: clamp(4.5rem, 8vw, 7.5rem) 0 clamp(5rem, 9vw, 8rem);
    overflow: clip;
    background: var(--contact-white);
    color: var(--contact-copy);
    font-family: "Roboto", Arial, Helvetica, sans-serif;
}

/* The page canvas continues cleanly into the shared footer. */
.csp-internal-category-page {
    background: var(--contact-white, #ffffff);
}

/* Selection uses the single brand accent for a cohesive browser surface. */
.csp-contact-page ::selection {
    background: var(--contact-red-deep);
    color: var(--contact-white);
}

/* Keyboard users receive one visible focus treatment across the contact flow. */
.csp-contact-page :where(a, button, input, select, textarea):focus-visible {
    border-radius: var(--contact-radius);
    outline: 3px solid var(--contact-red);
    outline-offset: 3px;
}

/* The contact reading rail stays generous without becoming excessively wide. */
.contact-page-container {
    max-width: 1320px;
}

/* ===========================================================================
   Editorial introduction and planning promises
   ========================================================================== */

/* Heading and lead copy form a decisive two-column editorial opening. */
.contact-intro {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    align-items: end;
    gap: clamp(2rem, 7vw, 7rem);
    padding-bottom: clamp(3rem, 5vw, 4.5rem);
}

/* Metromedium carries the same heading voice used across current landing pages. */
.contact-page-title {
    max-width: 10ch;
    margin: 0;
    color: var(--contact-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2.5rem, 5.5vw, 5.2rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 0.95;
    text-wrap: balance;
}

/* The introductory paragraph stays within a comfortable reading measure. */
.contact-page-lead {
    max-width: 68ch;
    margin: 0;
    color: var(--contact-copy);
    font-size: 1.08rem;
    line-height: 1.82;
}

/* Promises use a shared horizontal rule rather than three floating cards. */
.contact-promises {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 4vw, 3.5rem);
    padding: clamp(2rem, 4vw, 3rem) 0 clamp(4.5rem, 8vw, 7rem);
    border-top: 1px solid var(--contact-line);
}

/* Each promise aligns its brand icon with one compact text group. */
.contact-promise {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

/* Promise icons use a controlled red field and the universal 7px corner. */
.contact-promise-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--contact-radius);
    background: var(--contact-red);
    color: var(--contact-white);
}

/* Promise headings are compact interface titles rather than miniature displays. */
.contact-promise h3 {
    margin: 0 0 0.45rem;
    color: var(--contact-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: 1.12rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Supporting promise text remains calm and readable. */
.contact-promise p {
    margin: 0;
    color: var(--contact-muted);
    font-size: 0.92rem;
    line-height: 1.62;
}

/* ===========================================================================
   Main planning layout and form surface
   ========================================================================== */

/* The primary action receives more space than the supporting contact rail. */
.contact-planning-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 5rem);
}

/* The form is a quiet warm-paper workspace with restrained depth. */
.contact-form-section {
    padding: clamp(1.6rem, 4vw, 3.5rem);
    border-radius: var(--contact-radius);
    background: var(--contact-warm);
    box-shadow: 0 18px 48px rgba(23, 23, 23, 0.08);
}

/* The form heading clearly announces the page's primary task. */
.contact-form-heading {
    max-width: 700px;
    margin-bottom: 2.25rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--contact-line);
}

/* Form title uses the established editorial display face. */
.contact-form-title {
    margin: 0 0 0.65rem;
    color: var(--contact-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2rem, 3.4vw, 3.1rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Form supporting copy stays secondary while remaining fully legible. */
.contact-form-subtitle {
    max-width: 62ch;
    margin: 0;
    color: var(--contact-copy);
    font-size: 1rem;
    line-height: 1.7;
}

/* Labels use the system's compact, heavy action typography. */
.contact-field-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--contact-ink);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1.25;
}

/* Required indicators use the brand red without changing label hierarchy. */
.contact-field-label .text-danger {
    color: var(--contact-red-deep) !important;
}

/* Field hints explain consequences without competing with labels. */
.contact-field-hint {
    display: block;
    margin-top: 0.45rem;
    color: #707070;
    font-size: 0.78rem;
    line-height: 1.5;
}

/* Icons and inputs share a stable positioning context. */
.contact-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

/* Field icons remain secondary and never intercept pointer input. */
.contact-input-icon {
    position: absolute;
    right: 15px;
    z-index: 1;
    color: var(--contact-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* Form fields follow the documented 50px, white, one-pixel input pattern. */
.contact-form-control,
.contact-form-select,
.contact-form-textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 42px 12px 14px;
    border: 1px solid #d8d8d3;
    border-radius: var(--contact-radius) !important;
    background-color: var(--contact-white);
    color: var(--contact-ink);
    caret-color: var(--contact-red-deep);
    font-family: "Roboto", Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

/* Placeholder contrast remains readable without matching entered content. */
.contact-form-control::placeholder,
.contact-form-textarea::placeholder {
    color: #727272;
    opacity: 1;
}

/* Select controls retain a native interaction model with a consistent arrow. */
.contact-form-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%235d5d5d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 10px 10px;
}

/* Selects use their dedicated arrow without a competing field icon. */
.contact-form-select + .contact-input-icon {
    display: none;
}

/* Long travel notes gain an adjustable, comfortable writing area. */
.contact-form-textarea {
    min-height: 150px;
    padding-right: 42px;
    resize: vertical;
}

/* The read-only date field remains visibly interactive. */
.contact-date-control {
    cursor: pointer;
}

/* Focus states use the same red border and translucent ring as the system. */
.contact-form-control:focus,
.contact-form-select:focus,
.contact-form-textarea:focus {
    border-color: var(--contact-red-deep);
    background-color: var(--contact-white);
    box-shadow: 0 0 0 3px rgba(185, 2, 1, 0.14);
    outline: 0;
}

/* Invalid required fields become explicit after interaction or submission. */
.contact-form-control:user-invalid,
.contact-form-select:user-invalid,
.contact-form-textarea:user-invalid {
    border-color: var(--contact-red-deep);
}

/* The primary submission control follows the site's 48px action standard. */
.contact-submit-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 0;
    border-radius: var(--contact-radius) !important;
    background: var(--contact-red);
    color: var(--contact-white);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease, box-shadow 180ms ease;
}

/* Hover reinforces the action with the approved deeper red and soft lift. */
.contact-submit-btn:hover {
    transform: translateY(-2px);
    background: var(--contact-red-deep);
    color: var(--contact-white);
    box-shadow: 0 10px 24px rgba(23, 23, 23, 0.16);
}

/* Disabled submission state communicates work in progress. */
.contact-submit-btn:disabled {
    cursor: wait;
    transform: none;
    background: #767676;
    box-shadow: none;
}

/* Successful submission feedback uses a full outline, never a left rail. */
.contact-success-alert {
    margin-top: 1.75rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid #8fc49d;
    border-radius: var(--contact-radius) !important;
    background: #f2faf4;
}

/* Success icon carries semantic green independently of the brand palette. */
.contact-success-icon {
    flex: 0 0 auto;
    color: #176b2c;
    font-size: 1.5rem;
    line-height: 1;
}

/* Success heading gives the confirmation a clear reading start. */
.contact-success-title {
    margin: 0 0 0.35rem;
    color: #155b28;
    font-size: 1.05rem;
    font-weight: 900;
}

/* Success detail maintains accessible green-on-light contrast. */
.contact-success-desc {
    margin: 0;
    color: #214b2b;
    font-size: 0.9rem;
    line-height: 1.62;
}

/* ===========================================================================
   Direct support rail
   ========================================================================== */

/* The support rail remains visible while long forms are completed. */
.contact-support-rail {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 1rem;
}

/* Direct channels receive a confident dark surface for fast scanning. */
.contact-direct-panel {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-radius: var(--contact-radius);
    background: var(--contact-ink);
    color: var(--contact-white);
}

/* Supporting help and social groups use quiet neutral surfaces. */
.contact-help-panel,
.contact-social-panel {
    padding: clamp(1.35rem, 2.5vw, 1.8rem);
    border: 1px solid var(--contact-line);
    border-radius: var(--contact-radius);
    background: var(--contact-white);
}

/* Panel headings align icon and label in the compact title system. */
.contact-panel-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--contact-line);
    color: var(--contact-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.25;
}

/* Panel icons provide the only red cue in supporting light surfaces. */
.contact-panel-title i {
    color: var(--contact-red);
}

/* The dark channel panel reverses its heading and softens its divider. */
.contact-direct-panel .contact-panel-title {
    border-bottom-color: rgba(255, 255, 255, 0.16);
    color: var(--contact-white);
}

/* Direct contact options are unstyled semantically correct list items. */
.direct-channels-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Channel rows separate with horizontal rules and generous touch targets. */
.direct-channels-list li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Every direct channel keeps its icon and text aligned across long labels. */
.direct-channel-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    gap: 0.85rem;
    padding: 1rem 0;
    color: inherit;
    text-decoration: none;
}

/* Contact icons use the shared radius and a subtle reversed field. */
.channel-icon-box {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--contact-radius);
    background: rgba(255, 255, 255, 0.09);
    color: var(--contact-red);
    transition: background-color 180ms ease, color 180ms ease;
}

/* Channel text may shrink without forcing horizontal overflow. */
.contact-channel-text {
    min-width: 0;
}

/* Channel labels use the documented uppercase label treatment. */
.channel-label {
    display: block;
    margin-bottom: 0.25rem;
    color: #d6d6d2;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

/* Channel values keep sufficient contrast and wrap long email addresses. */
.channel-value {
    display: block;
    overflow-wrap: anywhere;
    color: var(--contact-white);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
}

/* Interactive channel rows reveal their affordance without large motion. */
a.direct-channel-item:hover .channel-icon-box {
    background: var(--contact-red);
    color: var(--contact-white);
}

a.direct-channel-item:hover .channel-value {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: var(--contact-red);
    text-underline-offset: 4px;
}

/* Help topics are compact rows instead of another grid of cards. */
.help-checklist {
    display: grid;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Check icons and copy align from the first text baseline. */
.help-checklist li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 0.7rem;
    color: var(--contact-copy);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Red checkmarks keep general-purpose accents within the brand system. */
.help-checklist i {
    margin-top: 0.2rem;
    color: var(--contact-red-deep);
}

/* Social actions form a compact, accessible row. */
.social-links-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* Social buttons retain practical 44px targets and 7px corners. */
.social-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--contact-line);
    border-radius: var(--contact-radius) !important;
    background: var(--contact-soft);
    color: var(--contact-ink);
    text-decoration: none;
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

/* Social hover uses the brand action treatment and a restrained lift. */
.social-btn:hover {
    transform: translateY(-2px);
    border-color: var(--contact-red);
    background: var(--contact-red);
    color: var(--contact-white);
}

/* ===========================================================================
   Air Datepicker integration
   ========================================================================== */

/* The calendar inherits the site's fonts, red action color and 7px geometry. */
.air-datepicker {
    --adp-font-family: "Roboto", Arial, Helvetica, sans-serif;
    --adp-font-size: 1rem;
    --adp-border-radius: 7px;
    --adp-cell-border-radius: 7px;
    --adp-btn-border-radius: 7px;
    --adp-accent-color: #b90201;
    --adp-color-current-date: #b90201;
    --adp-cell-background-color-selected: #b90201;
    --adp-cell-background-color-selected-hover: #171717;
    --adp-btn-color: #b90201;
    --adp-btn-background-color-hover: #fffaf5;
    --adp-background-color-active: #f7f7f5;
    --adp-background-color-hover: #f7f7f5;
    z-index: 1050;
    border: 1px solid #e8e8e4;
    border-radius: 7px !important;
    box-shadow: 0 18px 48px rgba(23, 23, 23, 0.16);
}

/* Every datepicker control preserves the universal corner radius. */
.air-datepicker-cell,
.air-datepicker-button,
.air-datepicker-nav--action,
.air-datepicker-nav--title {
    border-radius: 7px !important;
}

/* ===========================================================================
   Responsive behavior
   ========================================================================== */

/* Tablet widths stack the task and support rail while keeping promises concise. */
@media (max-width: 991.98px) {
    .contact-intro {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 1.5rem;
    }

    .contact-page-title {
        max-width: 14ch;
    }

    .contact-promises {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .contact-planning-layout {
        grid-template-columns: 1fr;
    }

    .contact-support-rail {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-direct-panel {
        grid-row: span 2;
    }
}

/* Mobile widths prioritize form completion and full-width controls. */
@media (max-width: 767.98px) {
    .csp-contact-page {
        padding: 3.5rem 0 4.5rem;
    }

    .contact-page-title {
        max-width: 11ch;
        font-size: clamp(2.35rem, 13vw, 3.8rem);
    }

    .contact-page-lead {
        font-size: 1rem;
        line-height: 1.72;
    }

    .contact-promises {
        padding-bottom: 3.5rem;
    }

    .contact-form-section {
        padding: 1.35rem;
    }

    .contact-support-rail {
        grid-template-columns: 1fr;
    }

    .contact-direct-panel {
        grid-row: auto;
    }

    .contact-submit-btn {
        width: 100%;
    }
}

/* Very narrow devices retain clean labels, fields and contact values. */
@media (max-width: 420px) {
    .contact-promise {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .contact-promise-icon {
        width: 44px;
        height: 44px;
    }

    .contact-form-section,
    .contact-direct-panel,
    .contact-help-panel,
    .contact-social-panel {
        padding: 1.2rem;
    }
}

/* Reduced-motion preferences remove decorative movement while preserving state. */
@media (prefers-reduced-motion: reduce) {
    .contact-submit-btn,
    .channel-icon-box,
    .social-btn,
    .contact-form-control,
    .contact-form-select,
    .contact-form-textarea {
        transition: none;
    }

    .contact-submit-btn:hover,
    .social-btn:hover {
        transform: none;
    }
}
