/* Age Verification Overlay */
.hero__age-verification {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 16, 0.85);
    backdrop-filter: blur(8px);
    border-radius: inherit;
    animation: fadeIn 0.3s ease-out;
}

.hero__age-verification:not([hidden]) {
    display: flex;
}

/* Mobile: Make age verification fullscreen */
@media (max-width: 768px) {
    .hero__age-verification {
        position: fixed;
        inset: 0;
        border-radius: 0;
        z-index: 1000;
        padding: env(safe-area-inset-top, 20px) 20px env(safe-area-inset-bottom, 20px);
    }
}

.hero__age-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.hero__age-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.turnstile-container {
    margin: 8px 0;
    min-height: 65px;
    /* Prevent layout shift */
    display: flex;
    justify-content: center;
}

.hero__age-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.hero__age-btn {
    padding: 10px 24px;
    font-size: 1rem;
    min-width: 80px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__age-btn--yes {
    background: var(--primary-green);
    color: #000;
    border-color: transparent;
}

.hero__age-btn--yes:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #444;
    color: #888;
}

.hero__age-btn--no {
    background: transparent;
    color: var(--text);
}

.hero__age-btn--no:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero__age-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.hero__age-disclaimer a {
    color: var(--text);
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================================
   Mobile Responsive Improvements
   ============================================================ */

/* Small phones (320px - 380px) */
@media (max-width: 380px) {
    .hero__age-content {
        padding: 16px 12px;
        max-width: 100%;
    }

    .hero__age-text {
        font-size: 1rem;
    }

    .hero__age-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 70px;
    }

    .hero__age-disclaimer {
        font-size: 0.7rem;
    }

    /* Turnstile widget can overflow on very small screens */
    .turnstile-container {
        transform: scale(0.9);
        transform-origin: center;
    }
}

/* Standard mobile (up to 480px) */
@media (max-width: 480px) {
    .hero__age-content {
        padding: 18px 14px;
    }

    .hero__age-buttons {
        flex-wrap: wrap;
    }

    .hero__age-btn {
        flex: 1;
        min-width: 0;
    }
}

/* ============================================================
   Companion Selection Mobile Improvements
   ============================================================ */

/* Ensure companion selection works within widget bounds */
.hero__companion-selection-content {
    box-sizing: border-box;
}

/* Mobile: Make companion selection fullscreen modal */
@media (max-width: 768px) {
    /* When companion selection is shown, allow the CTA panel to grow */
    .hero__cta-panel:has(.hero__companion-selection:not([hidden])) {
        aspect-ratio: unset;
        min-height: auto;
    }

    /* CRITICAL: Force fullscreen modal on mobile */
    .hero__companion-selection,
    .hero__companion-selection:not([hidden]) {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important; /* Dynamic viewport height for mobile browsers */
        border-radius: 0 !important;
        z-index: 9999 !important;
        padding: env(safe-area-inset-top, 20px) 20px env(safe-area-inset-bottom, 20px);
        background: rgba(10, 10, 16, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .hero__companion-selection-content {
        max-width: 360px;
        width: 90%;
        padding: 2.5rem 2rem;
        background: rgba(20, 20, 30, 0.8);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero__companion-selection-title {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 2rem;
        color: #fff;
    }

    .hero__companion-selection-buttons {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero__companion-select-btn {
        padding: 1.5rem 2rem;
        min-width: 140px;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .hero__companion-select-label {
        font-size: 1.4rem;
        font-weight: 600;
    }

    .hero__companion-select-subtitle {
        font-size: 0.85rem;
        opacity: 0.9;
    }

    .hero__companion-selection-terms {
        font-size: 0.8rem;
        margin-top: 2rem;
        max-width: 320px;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.6);
    }

    .hero__mic-hint {
        font-size: 0.9rem !important;
        margin: 1.25rem 0 !important;
        color: rgba(255, 255, 255, 0.8) !important;
    }
}

/* Small phones - stack buttons vertically */
@media (max-width: 380px) {
    .hero__companion-selection-content {
        padding: 2rem 1.25rem;
        max-width: 100%;
        width: 95%;
    }

    .hero__companion-selection-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .hero__companion-selection-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero__companion-select-btn {
        width: 100%;
        min-width: 0;
        padding: 1.25rem 1rem;
    }

    .hero__companion-select-label {
        font-size: 1.25rem;
    }

    .hero__companion-select-subtitle {
        font-size: 0.8rem;
    }

    .hero__companion-selection-terms {
        font-size: 0.75rem;
        margin-top: 1.5rem;
        max-width: 100%;
    }

    /* Microphone hint */
    .hero__mic-hint {
        font-size: 0.8rem !important;
    }
}

/* Standard mobile (480px) - refine spacing */
@media (max-width: 480px) and (min-width: 381px) {
    .hero__companion-selection-content {
        padding: 1.75rem 1.25rem;
    }

    .hero__companion-selection-buttons {
        gap: 0.85rem;
    }

    .hero__companion-select-btn {
        padding: 1.1rem 1.25rem;
        min-width: 110px;
    }

    .hero__companion-selection-terms {
        font-size: 0.75rem;
    }
}

/* ============================================================
   Call Ended & Usage Limit - Desktop (keep inside widget)
   ============================================================ */

/* Desktop: Keep overlays contained within the widget panel - ultra-compact sizing */
@media (min-width: 769px) {
    .hero__call-ended,
    .hero__usage-limit {
        position: absolute !important;
        inset: 0 !important;
        border-radius: var(--radius-md) !important;
    }

    .hero__call-ended-content,
    .hero__usage-limit-content {
        max-width: 220px !important;
        padding: 0.5rem 0.6rem !important;
    }

    .hero__call-ended-icon,
    .hero__usage-limit-icon {
        width: 24px !important;
        height: 24px !important;
        padding: 4px !important;
        margin: 0 auto 0.25rem !important;
    }

    .hero__call-ended-title,
    .hero__usage-limit-title {
        font-size: 0.8rem !important;
        margin-bottom: 0.15rem !important;
    }

    .hero__call-ended-duration {
        font-size: 0.65rem !important;
        margin-bottom: 0.35rem !important;
    }

    .hero__call-ended-btn,
    .hero__usage-limit-btn {
        padding: 0.3rem 0.75rem !important;
        font-size: 0.7rem !important;
    }

    .hero__call-ended-hint,
    .hero__usage-limit-hint {
        font-size: 0.55rem !important;
        margin-top: 0.3rem !important;
    }

    .hero__usage-limit-message {
        font-size: 0.6rem !important;
        margin-bottom: 0.35rem !important;
        line-height: 1.3 !important;
    }

    .hero__usage-limit-cta {
        gap: 0.35rem !important;
    }
}

/* ============================================================
   Call Ended & Usage Limit Mobile Improvements
   ============================================================ */

/* Mobile: Fullscreen modal with centered glassmorphism card */
@media (max-width: 768px) {
    .hero__call-ended,
    .hero__usage-limit {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        z-index: 9999 !important;
        padding: env(safe-area-inset-top, 20px) 20px env(safe-area-inset-bottom, 20px);
        background: rgba(10, 10, 16, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .hero__call-ended-content,
    .hero__usage-limit-content {
        max-width: 340px;
        width: 90%;
        padding: 2rem 1.5rem;
        background: rgba(20, 20, 30, 0.8);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero__call-ended-icon,
    .hero__usage-limit-icon {
        width: 56px;
        height: 56px;
        padding: 14px;
        margin: 0 auto 1rem;
    }

    .hero__call-ended-title,
    .hero__usage-limit-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .hero__call-ended-duration {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }

    .hero__call-ended-btn,
    .hero__usage-limit-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .hero__call-ended-hint,
    .hero__usage-limit-hint {
        font-size: 0.8rem;
        margin-top: 1rem;
        color: rgba(255, 255, 255, 0.6);
    }

    .hero__usage-limit-message {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        color: rgba(255, 255, 255, 0.8);
    }
}

/* Small phones - adjust spacing */
@media (max-width: 380px) {
    .hero__call-ended-content,
    .hero__usage-limit-content {
        padding: 1.5rem 1.25rem;
        width: 95%;
    }

    .hero__call-ended-icon,
    .hero__usage-limit-icon {
        width: 48px;
        height: 48px;
        padding: 12px;
    }

    .hero__call-ended-title,
    .hero__usage-limit-title {
        font-size: 1.25rem;
    }

    .hero__call-ended-btn,
    .hero__usage-limit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero__usage-limit-message {
        font-size: 0.85rem;
    }

    .hero__call-ended-hint,
    .hero__usage-limit-hint {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero__usage-limit-actions {
        width: 100%;
    }

    .hero__usage-limit-cta {
        width: 100%;
    }

    .hero__usage-limit-btn {
        width: 100%;
        justify-content: center;
    }
}
