/* ==========================================================================
   Cheetah Contact Page
   ==========================================================================
   Location: assets/css/conditional/contact.css
   Loaded on: is_page_template( 'page-templates/template-contact.php' )
   Dependencies: core/variables.css, core/components.css

   Design language shared with cart / checkout / account templates:
     - same page-title rhythm (1rem above on desktop, 1.75rem on mobile)
     - same card surface (1px border, 14px radius, subtle shadow)
     - same accent color (#2563eb)
     - same quiet, content-first typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
.cheetah-contact-page-template {
    /* The shared `.cheetah-main` wrapper already contributes 1rem of top
       padding and 4rem of bottom padding. The title below owns the rest
       of the vertical rhythm, matching the cart / checkout / account
       pages, so no extra padding is needed on the container itself. */
    position: relative;
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */
.cheetah-contact-page-header {
    max-width: 720px;
    margin: 0 0 2.5rem;
    text-align: left;
}

/* The H1 owns the entire vertical rhythm above the title. The wrapper
   <header> is zeroed universally in assets/css/core/layout.css via the
   shared .cheetah-page-header selector. */
.cheetah-contact-page-header__title {
    padding-top: 1rem;
    margin: 0 0 0.85rem;
    font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.125rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--cheetah-heading, #0f172a);
}

.cheetah-contact-page-header__lead {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--cheetah-secondary, #64748b);
}

/* --------------------------------------------------------------------------
   Two-column grid
   --------------------------------------------------------------------------
   Desktop (>= 992px): [ info sidebar ~360px ] [ form fills the rest ]
   Tablet / mobile:    stacked, info first, form second.

   The info column uses a fixed-ish track so the cards do not stretch
   uncomfortably wide on very wide viewports.
   -------------------------------------------------------------------------- */
.cheetah-contact-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

/* --------------------------------------------------------------------------
   Contact information column
   -------------------------------------------------------------------------- */
.cheetah-contact-info {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Individual contact card
   --------------------------------------------------------------------------
   Surface matches the checkout billing / shipping cards and the account
   content card exactly — same 1px border, same 14px radius, same subtle
   elevation. Consistency across page templates is what makes the theme
   feel like one product.
   -------------------------------------------------------------------------- */
.cheetah-contact-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem 1.25rem;
    background: var(--cheetah-bg, #ffffff);
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition:
            border-color 0.2s ease,
            box-shadow 0.2s ease,
            transform 0.2s ease;
}

.cheetah-contact-card:hover {
    border-color: color-mix(in srgb, var(--cheetah-primary, #2563eb) 25%, var(--cheetah-border, #e2e8f0));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.cheetah-contact-card__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cheetah-primary, #2563eb) 10%, transparent);
    color: var(--cheetah-primary, #2563eb);
}

.cheetah-contact-card__icon svg {
    display: block;
}

.cheetah-contact-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.cheetah-contact-card__title {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--cheetah-heading, #0f172a);
}

.cheetah-contact-card__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--cheetah-text, #1e293b);
    /* Long unbroken strings (emails, phone numbers without spaces,
       international addresses) must wrap rather than overflow the card. */
    overflow-wrap: anywhere;
}

.cheetah-contact-card__text a {
    color: var(--cheetah-primary, #2563eb);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.cheetah-contact-card__text a:hover,
.cheetah-contact-card__text a:focus-visible {
    color: var(--cheetah-primary-hover, #1d4ed8);

    outline: none;
}

.cheetah-contact-card__meta {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--cheetah-secondary, #64748b);
}

/* --------------------------------------------------------------------------
   Contact form column
   --------------------------------------------------------------------------
   Same card surface as the info cards, but larger padding because the
   form is the primary action on the page.
   -------------------------------------------------------------------------- */
.cheetah-contact-form {
    min-width: 0;
    padding: 1.75rem 1.85rem;
    background: var(--cheetah-bg, #ffffff);
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.cheetah-contact-form__header {
    margin: 0 0 1.5rem;
    padding: 0 0 1.15rem;
    border-bottom: 1px solid var(--cheetah-border, #e2e8f0);
}

.cheetah-contact-form__title {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.005em;
    color: var(--cheetah-heading, #0f172a);
}

.cheetah-contact-form__subtitle {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--cheetah-secondary, #64748b);
}

.cheetah-contact-form__body {
    min-width: 0;
}

/* Inactive-plugin fallback notice. Rendered only when the Cheetah Forms
   plugin is not available. Uses the canonical notice grammar from
   assets/css/conditional/woocommerce.css so it reads as an intentional
   message rather than a broken page. */
.cheetah-contact-form__notice {
    padding: 0.9rem 1.15rem;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    color: #1e40af;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.cheetah-contact-form__notice p {
    margin: 0;
}

.cheetah-contact-form__notice a {
    color: #1e40af;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cheetah-contact-form__notice a:hover {
    color: #0f172a;
}

/* --------------------------------------------------------------------------
   Defensive form field styling
   --------------------------------------------------------------------------
   The Cheetah Forms plugin renders its own markup and, in normal use,
   loads its own stylesheet. These rules are a low-specificity fallback
   that only kicks in when the plugin's stylesheet is not present (for
   example, an older plugin build, or a build that only ships partial
   styles).

   Selectors are scoped to `.cheetah-contact-form__body` so they can
   never leak onto any other form on the site, and they use only
   type-attribute selectors so the plugin's own class-based rules
   always win when both are present.
   -------------------------------------------------------------------------- */
.cheetah-contact-form__body input[type="text"],
.cheetah-contact-form__body input[type="email"],
.cheetah-contact-form__body input[type="tel"],
.cheetah-contact-form__body input[type="url"],
.cheetah-contact-form__body input[type="number"],
.cheetah-contact-form__body input[type="search"],
.cheetah-contact-form__body textarea,
.cheetah-contact-form__body select {
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 0.9rem;
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--cheetah-heading, #0f172a);
    background: #ffffff;
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cheetah-contact-form__body textarea {
    min-height: 130px;
    padding: 0.75rem 0.9rem;
    resize: vertical;
}

.cheetah-contact-form__body input:focus,
.cheetah-contact-form__body textarea:focus,
.cheetah-contact-form__body select:focus {
    outline: none;
    border-color: var(--cheetah-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cheetah-contact-form__body input::placeholder,
.cheetah-contact-form__body textarea::placeholder {
    color: #94a3b8;
}

.cheetah-contact-form__body label {
    display: block;
    margin: 0 0 0.38rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--cheetah-heading, #0f172a);
}

.cheetah-contact-form__body .required,
.cheetah-contact-form__body abbr[title] {
    color: #dc2626;
    text-decoration: none;
    border-bottom: none;
    cursor: help;
}

.cheetah-contact-form__body button[type="submit"],
.cheetah-contact-form__body input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    background: var(--cheetah-primary, #2563eb);
    border: 1px solid var(--cheetah-primary, #2563eb);
    border-radius: 10px;
    cursor: pointer;
    transition:
            background-color 0.15s ease,
            border-color 0.15s ease,
            transform 0.12s ease,
            box-shadow 0.15s ease;
}

.cheetah-contact-form__body button[type="submit"]:hover,
.cheetah-contact-form__body input[type="submit"]:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.cheetah-contact-form__body button[type="submit"]:active,
.cheetah-contact-form__body input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

/* --------------------------------------------------------------------------
   Optional additional editor content
   -------------------------------------------------------------------------- */
.cheetah-contact-page__content {
    margin: 3rem 0 0;
    padding: 2rem 0 0;
    border-top: 1px solid var(--cheetah-border, #e2e8f0);
}

.cheetah-contact-page__content > *:first-child {
    margin-top: 0;
}

.cheetah-contact-page__content > *:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Tablet: collapse to a single column with the info cards above the form. */
@media (max-width: 991px) {
    .cheetah-contact-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile: tighter title rhythm, tighter card padding, smaller lead. */
@media (max-width: 767px) {
    .cheetah-contact-page-header {
        margin-bottom: 2rem;
    }

    .cheetah-contact-page-header__title {
        padding-top: 1.75rem;
    }

    .cheetah-contact-page-header__lead {
        font-size: 1rem;
        line-height: 1.6;
    }

    .cheetah-contact-card {
        padding: 1rem 1.1rem;
        gap: 0.85rem;
    }

    .cheetah-contact-card__icon {
        width: 40px;
        height: 40px;
    }

    .cheetah-contact-form {
        padding: 1.35rem 1.2rem;
    }

    .cheetah-contact-form__title {
        font-size: 1.125rem;
    }

    .cheetah-contact-page__content {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
}

/* Very small screens: keep the info card icon from squeezing the text. */
@media (max-width: 380px) {
    .cheetah-contact-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .cheetah-contact-card,
    .cheetah-contact-card__text a,
    .cheetah-contact-form__body input,
    .cheetah-contact-form__body textarea,
    .cheetah-contact-form__body select,
    .cheetah-contact-form__body button[type="submit"],
    .cheetah-contact-form__body input[type="submit"] {
        transition: none;
    }

    .cheetah-contact-card:hover {
        transform: none;
    }
}