/**
 * Locali LP AI Modal - shared between /adu/ and /kitchen-bath/ (and pool/landscape/hardscape/etc).
 * Wraps the locali-ai-designer wizard shortcode in a full-screen modal
 * with brand-on chrome (deep green + warm gold + cream).
 *
 * MOBILE-FIRST:
 *   - Base styles target mobile (full-screen edge-to-edge panel).
 *   - @media (min-width: 720px) — tablet (floating, rounded, max 90vw / 90vh).
 *   - @media (min-width: 1024px) — desktop (max 960px width, generous padding).
 */

/* ============================================================================
   Overlay shell
   ============================================================================ */
.lp-ai-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: rgba(26, 60, 42, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow-y: auto;
    /* Mobile: edge-to-edge, zero outer padding so inner panel can be full-screen. */
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

.lp-ai-modal--open {
    display: block;
    animation: lpAiFadeIn 0.28s ease-out both;
}

@keyframes lpAiFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

body.lp-ai-modal-locked {
    overflow: hidden;
}

/* ============================================================================
   Inner panel
   Mobile (base): full-screen, no rounding, fills viewport.
   ============================================================================ */
.lp-ai-modal__inner {
    position: relative;
    margin: 0 auto;
    background: #FAFAF7;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    animation: lpAiSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes lpAiSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Close button — 44x44 tap target, top-right. */
.lp-ai-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: rgba(26, 60, 42, 0.9);
    color: #fff;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lp-ai-modal__close:hover {
    background: #1A3C2A;
    transform: scale(1.05);
}

.lp-ai-modal__close:focus-visible {
    outline: 2px solid #C8A96E;
    outline-offset: 2px;
}

.lp-ai-modal__body {
    padding: 56px 16px 24px;
}

/* ===== Tablet 720+ : floating, rounded, max 90vw / 90vh ===== */
@media (min-width: 720px) {
    .lp-ai-modal {
        padding: 24px;
    }
    .lp-ai-modal__inner {
        max-width: 90vw;
        max-height: 90vh;
        min-height: 0;
        border-radius: 8px;
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
        overflow-y: auto;
    }
    .lp-ai-modal__body {
        padding: 56px 32px 32px;
    }
}

/* ===== Desktop 1024+ : capped width, generous padding ===== */
@media (min-width: 1024px) {
    .lp-ai-modal__inner {
        max-width: 960px;
        max-height: 90vh;
    }
    .lp-ai-modal__body {
        padding: 64px 48px 40px;
    }
}

/* Reduced motion — kill the slide-up + fade animations. */
@media (prefers-reduced-motion: reduce) {
    .lp-ai-modal--open,
    .lp-ai-modal__inner {
        animation: none;
    }
    .lp-ai-modal__close:hover {
        transform: none;
    }
}

/* ============================================================================
   K&B picker (intro screen, custom to K&B page)
   ============================================================================ */
.lp-kb-picker {
    text-align: center;
    padding: 32px 16px;
}

.lp-kb-picker__label {
    display: inline-block;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #C8A96E;
    margin-bottom: 16px;
}

.lp-kb-picker__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 12px;
    line-height: 1.2;
}

.lp-kb-picker__sub {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 16px;
    color: #4A4A4A;
    margin: 0 0 32px;
    line-height: 1.6;
}

/* Mobile (base): single column. */
.lp-kb-picker__cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 640px;
    margin: 0 auto;
}

/* Tablet+ : two columns. */
@media (min-width: 720px) {
    .lp-kb-picker__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.lp-kb-picker__card {
    background: #fff;
    border: 2px solid #E5E2DC;
    border-radius: 6px;
    padding: 32px 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
}

.lp-kb-picker__card:hover {
    border-color: #C8A96E;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.lp-kb-picker__card:focus-visible {
    outline: 2px solid #C8A96E;
    outline-offset: 2px;
}

.lp-kb-picker__card-icon {
    font-size: 40px;
    color: #2D5E3F;
    margin-bottom: 12px;
}

.lp-kb-picker__card-label {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 6px;
}

.lp-kb-picker__card-desc {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    color: #7A7A7A;
    margin: 0;
}

/* ============================================================================
   K&B "Want to do the other?" prompt
   ============================================================================ */
.lp-kb-second-prompt {
    background: linear-gradient(180deg, #F4F1EC 0%, #FAFAF7 100%);
    border: 1px solid #E5E2DC;
    border-radius: 6px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.lp-kb-second-prompt__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    color: #1A3C2A;
    margin: 0 0 8px;
}

.lp-kb-second-prompt__sub {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 14px;
    color: #4A4A4A;
    margin: 0 0 16px;
}

.lp-kb-second-prompt__buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.lp-kb-second-prompt__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-decoration: none;
    min-height: 44px;
}

.lp-kb-second-prompt__btn--primary {
    background: #2D5E3F;
    color: #fff;
}

.lp-kb-second-prompt__btn--primary:hover {
    background: #3A7D52;
    transform: translateY(-1px);
}

.lp-kb-second-prompt__btn--ghost {
    background: transparent;
    color: #2D5E3F;
    border-color: #2D5E3F;
}

.lp-kb-second-prompt__btn--ghost:hover {
    background: #2D5E3F;
    color: #fff;
}

/* ============================================================================
   K&B final "Both Designs" panel
   ============================================================================ */
.lp-kb-both {
    text-align: center;
    padding: 24px 0 8px;
}

.lp-kb-both__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: #1A3C2A;
    margin: 0 0 24px;
}

.lp-kb-both__cta {
    margin-top: 24px;
}
