/* Accessibility: screen-reader-only text */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Layout-specific styles: modals, promo banner, search results */

/* Offer slider: skeleton to prevent layout jump while video loads */
.offer__video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
    overflow: hidden;
}

.offer__video-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #252525 0%, #2a2a2a 50%, #252525 100%);
    background-size: 200% 100%;
    animation: offer-skeleton-shimmer 1.2s ease-in-out infinite;
    z-index: 0;
}

.offer__video-wrap.is-loaded .offer__video-skeleton {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.offer__video-wrap .offer__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

@keyframes offer-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media screen and (max-width: 650px) {
    .offer__video-wrap {
        aspect-ratio: auto;
        height: 399px;
    }
}

/* Search block: column layout with form row + results below */
.search__block {
    flex-direction: column;
    align-items: stretch;
}

.search__block form {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 10px;
    align-items: center;
}

/* Search results container */
#searchResultsContainer {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    width: 100%;
    min-width: 280px;
    max-width: 460px;
    max-height: 300px;
    overflow-y: auto;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 8px;
    z-index: 1000;
}

.search-results-loading,
.search-results-empty {
    padding: 12px;
    color: #666;
    font-size: 14px;
}

/* Overlay & popup */
.overlay {
    display: none;
}

.overlay_active {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(229, 229, 229, 0.8) !important;
    width: 100vw;
    height: 120vh;
    z-index: 9;
}

.popup {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.popup_adults {
    background: rgba(255, 255, 255, 0.88);
    width: 60vw;
    padding: 60px 30px 20px 30px;
}

.popup_active {
    display: flex;
    position: fixed;
    transform: translate(-50%, -50%);
    top: 70px;
    left: 50%;
}

.header {
    z-index: 22;
}

.actor__popup,
.popup_adults {
    z-index: 10;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.actor__popup .popup__title,
.actor__popup p {
    color: #000;
}

.popup_adults p {
    color: black !important;
}

.popup__buttons {
    margin-top: 20px;
}

.popup__button {
    border-color: black;
    color: black;
}

.popup__logo {
    width: 200px;
}

.video-preview {
    overflow: hidden;
}

.actor-preview__image {
    position: relative;
}

.header__user {
    display: grid;
    margin-left: auto;
}

.header__logout {
    font-size: 11px;
    color: black;
    text-align: right;
}

.nav {
    align-items: center;
}

.video-preview__image {
    overflow: hidden;
}

/* Error modal */
.error-modal-window {
    position: fixed;
    background: #fff;
    color: #000;
    width: 450px;
    height: 195px;
    margin: auto;
    text-align: center;
    padding: 20px 26px;
    z-index: 100;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

.error-modal-window p {
    font-size: 27px !important;
    text-transform: none;
    margin: 0 0 10px;
    line-height: 30px;
}

.error-modal-window a {
    font-size: 16px;
    color: #ab4463;
    text-decoration: underline;
    text-transform: none;
    font-weight: 300;
}

.error-modal-window button {
    font-weight: 600;
    transition: 0.2s;
    letter-spacing: 0.3px;
    border: none;
    background: #ab4463;
    color: #fff;
    line-height: 46px;
    display: block;
    width: 100%;
    padding: 0;
    margin: 20px auto 0;
    max-width: 320px;
    font-size: 24px;
}

/* Cookies panel */
.cookies-panel {
    position: fixed;
    bottom: 11px;
    background: #fff;
    color: #000;
    width: 348px;
    height: 189px;
    margin: auto;
    text-align: center;
    padding: 20px 26px;
    z-index: 100;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: none;
    right: 12px;
}

.cookies-panel p {
    font-size: 16px !important;
    text-transform: none;
    margin: 0 0 10px;
    line-height: 18px;
}

.cookies-panel a {
    font-size: 16px;
    color: #ab4463;
    text-decoration: underline;
    text-transform: none;
    font-weight: 300;
}

.cookies-panel button {
    font-weight: 600;
    transition: 0.2s;
    letter-spacing: 0.3px;
    border: none;
    background: #ab4463;
    color: #fff;
    line-height: 46px;
    display: block;
    width: 100%;
    padding: 0;
    margin: 20px auto 0;
    max-width: 320px;
}

.is-visible {
    display: block;
}

.logo__img,
.popup__logo {
    filter: none !important;
}

.blur-target {
    filter: blur(7px);
}

/* Promo banner */
.promo-banner-wrap {
    padding-top: 70px;
}

.promo-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-bottom: 3px solid #e94560;
    padding: 14px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.promo-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.promo-banner .promo-banner__badge {
    display: inline-flex;
    align-items: center;
    background: #e94560;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    padding: 5px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.promo-banner .promo-banner__text {
    color: #eee;
    font-size: 15px;
    line-height: 1.4;
}

.promo-banner .promo-banner__text strong {
    color: #fff;
}

.promo-banner .promo-banner__link {
    color: #e94560;
    font-weight: 600;
    text-decoration: none;
}

.promo-banner .promo-banner__link:hover {
    text-decoration: underline;
}

.promo-banner .promo-banner__cta {
    display: inline-flex;
    align-items: center;
    background: #e94560;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.promo-banner .promo-banner__cta:hover {
    color: #fff;
    text-decoration: none;
}

@media screen and (max-width: 750px) {
    .popup_adults {
        width: 90vw;
    }

    .popup__button {
        margin-bottom: 16px;
    }

    .header__user {
        margin: 0;
    }

    .header__username {
        color: white;
    }

    .header__logout {
        color: white;
        text-align: center;
        font-size: 15px;
    }

    .actor__galleries {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }

    .gallery-preview {
        height: 220px !important;
    }

    .popup__access {
        width: 260px !important;
    }

    .photos {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }

    .photo {
        height: 240px !important;
    }

    .search__icon {
        fill: white !important;
    }

    .search__label {
        margin-bottom: 0 !important;
    }

    .error-modal-window {
        width: 367px;
        padding: 20px 12px;
        max-width: 90%;
    }

    .error-modal-window p {
        font-size: 24px !important;
        line-height: 28px;
    }
}

@media only screen and (max-width: 992px) {
    .cookies-panel {
        width: 100%;
        right: 0;
        bottom: 0;
    }
}

/* Accessibility: sufficient contrast for footer and cookies (WCAG AA, 4.5:1+) */
.footer .footer__title,
.footer .footer__copyright,
.footer .footer__copyright a {
    color: #404040;
}

.footer .footer__link {
    color: #404040;
}

.footer .footer__link:hover {
    color: #000;
}

.footer .footer__link:focus {
    color: #404040;
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.cookies-panel p {
    color: #1a1a1a;
}
