/*
 * Project overrides on top of the HotFlix theme (assets/css/main.css).
 * Kept separate so the vendor theme stays untouched and upgradeable.
 */

/* The theme puts a data-bg photo behind section titles with no overlay, so a
   bright photo leaves the white title unreadable. */
.section--bg,
.section--details,
.page-404 {
    position: relative;
    isolation: isolate;
}

.section--bg::before,
.section--details::before,
.page-404::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(26, 25, 31, 0.9), rgba(26, 25, 31, 0.65));
}

/* Details: smaller page title (theme uses 36px at >=1200px) */
.section--details .section__title {
    font-size: 22px;
}

@media (min-width: 576px) {
    .section--details .section__title {
        font-size: 26px;
    }
}

@media (min-width: 1200px) {
    .section--details .section__title {
        font-size: 30px;
    }
}

/* Keep the detail cover and player balanced on smaller screens. */
.details__video video,
.details__video iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.video-embed {
    overflow: hidden;
    background: #16151b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.video-embed__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 14px;
    background: linear-gradient(90deg, #24232b, #1b1a20);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.video-embed__live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-weight: 600;
}

.video-embed__live span {
    width: 7px;
    height: 7px;
    background: #e85d75;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(232, 93, 117, 0.14);
}

.video-embed__source {
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-embed__frame {
    background: #000;
}

.video-embed__frame iframe {
    aspect-ratio: 16 / 9;
}

.details__video video {
    height: auto;
}

.paginator__item--disabled span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.5);
}

.form__error {
    display: block;
    margin: -12px 0 15px;
    color: #eb5757;
    font-size: 13px;
}

.form__hint {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.comments {
    overflow-anchor: none;
}

.header__search {
    position: relative;
}

.header__search-input {
    min-width: 0;
}

.header__search-results {
    max-height: min(420px, calc(100vh - 90px));
    overflow-y: auto;
}

@media (max-width: 1199.98px) {
    .header__search {
        position: fixed;
        right: 0;
        left: 0;
        width: 100vw;
    }

    .header__search-input {
        width: calc(100% - 35px);
    }
}

@media (min-width: 576px) and (max-width: 1199.98px) {
    .header__search {
        padding-right: 25px;
        padding-left: 25px;
    }

    .header__search-results {
        right: 25px;
        left: 25px;
        width: auto;
    }

    .header__search-input {
        width: calc(100% - 50px);
    }

    .header__search-button {
        right: 85px;
    }
}

@media (max-width: 575.98px) {
    .header__search {
        padding-right: 15px;
        padding-left: 15px;
    }

    .header__search-results {
        right: 15px;
        left: 15px;
        width: auto;
    }

    .header__search-input {
        width: calc(100% - 35px);
        font-size: 15px;
        padding-right: 42px;
        padding-left: 15px;
    }
}

@media (min-width: 1200px) {
    .header__search {
        width: clamp(280px, 26vw, 420px);
    }

    .header__search-input {
        width: 100%;
    }

    .header__search-button {
        right: 20px;
    }
}

.header__search-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, 90vw);
    padding: 6px;
    background: #28272d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.header__search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    color: #fff;
}

.header__search-result:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.header__search-result img {
    width: 38px;
    height: 52px;
    object-fit: cover;
    border-radius: 3px;
}

.header__search-empty {
    padding: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

@media (min-width: 576px) and (max-width: 1199.98px) {
    .header__search-results {
        right: 75px;
        width: auto;
    }
}

@media (max-width: 575.98px) {
    .header__search-results {
        right: 50px;
        width: auto;
    }
}

@media (max-width: 575.98px) {
    .video-embed__bar {
        min-height: 38px;
        padding: 0 11px;
        font-size: 10px;
    }

    .card--details .details__cover {
        max-width: 130px;
        margin-inline: auto;
    }

    .details__video video,
    .details__video iframe {
        min-height: 0;
    }
}

@media (min-width: 576px) and (max-width: 1199.98px) {
    .details__cover-column {
        display: none;
    }

    .card--details .details__cover {
        max-width: 170px;
        margin-inline: auto;
    }

    .details__video video,
    .details__video iframe {
        min-height: 0;
    }
}

@media (max-width: 575.98px) {
    .details__cover-column {
        display: none;
    }
}
