/**
 * MingleET — minimal custom styles.
 * Tailwind handles layout; use this file for app-specific tweaks only.
 */

/* Safe area insets for notched mobile devices */
body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Smoother touch interactions */
.touch-manipulation {
    touch-action: manipulation;
}

/* Prevent iOS zoom on form focus (16px minimum) */
input,
select,
textarea,
button {
    font-size: max(16px, 1rem);
}

@media (max-width: 640px) {
    #message-input,
    #report-reason {
        font-size: 16px;
    }
}

/* Prevent horizontal page overflow on narrow viewports */
html,
body {
    overflow-x: hidden;
}

/* Subtle focus ring for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Hide scrollbar in chat areas while keeping scroll */
.scroll-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-hidden::-webkit-scrollbar {
    display: none;
}

/* Lobby CAPTCHA widget layout */
#lobby-wizard img.captcha {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

#lobby-wizard input[name="captcha_1"] {
    margin-top: 0.75rem;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #18181f;
    padding: 0.75rem 1rem;
    color: #f3f4f6;
}

#lobby-wizard input[name="captcha_1"]:focus {
    border-color: rgba(99, 102, 241, 0.5);
    outline: none;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5);
}

/* Video feed fullscreen (native API + CSS fallback for blocked Fullscreen API) */
#video-feed:fullscreen,
#video-feed:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
    background: #000;
}

/* CSS-only maximize fallback (desktop production where Fullscreen API is blocked) */
#video-feed.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 60;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: none;
    background: #000;
}

#video-feed:fullscreen .aspect-video,
#video-feed:-webkit-full-screen .aspect-video,
#video-feed.is-fullscreen .aspect-video {
    aspect-ratio: auto;
    height: 100%;
}

#video-feed:fullscreen #remote-video,
#video-feed:-webkit-full-screen #remote-video,
#video-feed:fullscreen .aspect-video video,
#video-feed:-webkit-full-screen .aspect-video video,
#video-feed.is-fullscreen #remote-video,
#video-feed.is-fullscreen .aspect-video video {
    object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
