/* Critical CSS - Nav instant, content fades in */
html {
    background-color: #ffffff;
}

html[data-theme="dark"] {
    background-color: #000000;
}

body {
    background-color: inherit;
    margin: 0;
}

/* Prompts page: honor shared modal scroll-lock classes from iOSScrollLock */
html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

body.ios-scroll-lock-fixed {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    top: var(--ios-scroll-lock-offset, 0px);
    overflow: hidden !important;
}

/* Content areas start hidden, fade in when ready */
.featured-banner:not(.featured-banner--visible) {
    display: none;
    /* Hidden until JS shows it */
}

.gallery-container {
    opacity: 0;
    transition: opacity 0.4s ease 0.1s;
}

html.prompts-gallery-pending .gallery-container .prompt-card:not(.prompt-card--skeleton) {
    opacity: 0 !important;
    visibility: hidden !important;
}

body.loaded .gallery-container {
    opacity: 1;
}

.prompts-announcement-banner-hidden,
.prompts-search-suggestions-hidden,
.prompts-comment-image-upload-hidden {
    display: none;
}

.prompts-support-link {
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.6;
}

.prompts-support-link-anchor {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.4);
}

.prompts-support-link-divider {
    margin: 0 10px;
    opacity: 0.4;
}

.visually-hidden-h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
    textarea,
    select {
        font-size: 16px !important;
        line-height: 1.35 !important;
    }

    .login-overlay.active:focus-within .login-card,
    .modal-overlay.active:focus-within .modal-content {
        transform: none !important;
    }
}
