/* =========================================================
   OTP TV SEARCH + VIDEO TAXONOMY — v0.8.6
   Fully scoped so search styling cannot leak into the header.
   Uses Elementor Global Typography variables when available.
   ========================================================= */

.otp-search-page {
    --otp-gold: #e9b94f;
    --otp-gold-light: #f3cc70;
    --otp-bg: #080809;
    --otp-surface: #121214;
    --otp-border: rgba(255,255,255,.10);
    --otp-muted: rgba(255,255,255,.60);

    /* Elementor Site Settings / Global Fonts, with safe fallbacks. */
    --otp-font-primary: var(--e-global-typography-primary-font-family, inherit);
    --otp-font-secondary: var(--e-global-typography-secondary-font-family, var(--otp-font-primary));
    --otp-font-text: var(--e-global-typography-text-font-family, var(--otp-font-primary));
    --otp-font-accent: var(--e-global-typography-accent-font-family, var(--otp-font-primary));
    --otp-weight-primary: var(--e-global-typography-primary-font-weight, 700);
    --otp-weight-secondary: var(--e-global-typography-secondary-font-weight, 600);
    --otp-weight-text: var(--e-global-typography-text-font-weight, 400);
    --otp-weight-accent: var(--e-global-typography-accent-font-weight, 600);

    min-height: 70vh;
    background: var(--otp-bg);
    color: #fff;
    font-family: var(--otp-font-text);
    font-weight: var(--otp-weight-text);
}

.otp-search-page *,
.otp-search-page *::before,
.otp-search-page *::after {
    box-sizing: border-box;
}

.otp-search-page .otp-search-shell {
    width: min(calc(100% - 64px), 1600px);
    margin: 0 auto;
    padding: 58px 0 86px;
}

.otp-search-page .otp-search-header {
    max-width: 920px;
    margin-bottom: 26px;
}

.otp-search-page .otp-search-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--otp-gold);
    font-family: var(--otp-font-accent);
    font-size: 11px;
    font-weight: var(--otp-weight-accent);
    letter-spacing: .24em;
    text-transform: uppercase;
}

.otp-search-page .otp-search-title {
    margin: 0;
    color: #fff;
    font-family: var(--otp-font-primary);
    font-size: clamp(34px, 4vw, 58px);
    font-weight: var(--otp-weight-primary);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.otp-search-page .otp-search-summary {
    margin: 11px 0 0;
    color: rgba(255,255,255,.68);
    font-family: var(--otp-font-text);
    font-size: 15px;
    font-weight: var(--otp-weight-text);
    line-height: 1.5;
}

/* Search field */
.otp-search-page .otp-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 58px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 7px;
    background: #111113;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.otp-search-page .otp-search-form:focus-within {
    border-color: var(--otp-gold);
    background: #151517;
    box-shadow: 0 0 0 1px rgba(233,185,79,.14);
}

.otp-search-page .otp-search-form__icon {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-left: 20px;
    margin-right: 13px;
    border: 1.8px solid rgba(255,255,255,.88);
    border-radius: 50%;
}

.otp-search-page .otp-search-form__icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 7px;
    height: 2px;
    border-radius: 2px;
    background: rgba(255,255,255,.88);
    transform: rotate(45deg);
    transform-origin: center;
}

.otp-search-page .otp-search-form__input,
.otp-search-page .otp-search-form__input[type="search"] {
    min-width: 0;
    flex: 1 1 auto;
    width: auto;
    height: 56px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    color: #fff;
    font-family: var(--otp-font-text);
    font-size: 15px;
    font-weight: var(--otp-weight-text);
    line-height: 56px;
    -webkit-appearance: none;
    appearance: none;
}

.otp-search-page .otp-search-form__input::placeholder {
    color: rgba(255,255,255,.42);
    font-family: inherit;
}

.otp-search-page .otp-search-form__input::-webkit-search-cancel-button {
    display: none;
}

.otp-search-page .otp-search-form__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-family: var(--otp-font-text);
    font-size: 25px;
    font-weight: 300;
    line-height: 1;
}

.otp-search-page .otp-search-form__clear:hover {
    color: #fff;
}

.otp-search-page .otp-search-form__button {
    align-self: stretch;
    min-width: 112px;
    margin: -1px -1px -1px 0;
    padding: 0 22px;
    border: 1px solid var(--otp-gold);
    border-radius: 0 7px 7px 0;
    background: var(--otp-gold);
    color: #080809;
    font-family: var(--otp-font-accent);
    font-size: 13px;
    font-weight: var(--otp-weight-accent);
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.otp-search-page .otp-search-form__button:hover {
    background: var(--otp-gold-light);
    border-color: var(--otp-gold-light);
    color: #080809;
}

/* Filters */
.otp-search-page .otp-search-filters {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 30px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.otp-search-page .otp-search-filters::-webkit-scrollbar {
    display: none;
}

.otp-search-page .otp-search-filter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: transparent;
    color: rgba(255,255,255,.72);
    text-decoration: none;
    font-family: var(--otp-font-accent);
    font-size: 12px;
    font-weight: var(--otp-weight-accent);
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.otp-search-page .otp-search-filter span {
    color: rgba(255,255,255,.42);
    font-size: 10px;
}

.otp-search-page .otp-search-filter:hover {
    border-color: rgba(233,185,79,.72);
    color: #fff;
}

.otp-search-page .otp-search-filter.is-active {
    border-color: var(--otp-gold);
    background: var(--otp-gold);
    color: #080809;
}

.otp-search-page .otp-search-filter.is-active span {
    color: rgba(8,8,9,.62);
}

/* Results grid */
.otp-search-page .otp-search-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 16px;
}

/* Search cards are defined here instead of importing the carousel stylesheet.
   This keeps search CSS completely isolated from the site header/navigation. */
.otp-search-page .otp-tv-card,
.otp-search-page .otp-search-card {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 7px;
    background: #171717;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0,0,0,.28);
    transform: translateY(0);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.otp-search-page .otp-tv-card:hover,
.otp-search-page .otp-search-card:hover {
    transform: translateY(-4px);
    border-color: var(--otp-gold);
    box-shadow: 0 0 0 1px rgba(233,185,79,.22), 0 15px 34px rgba(0,0,0,.46);
}

.otp-search-page .otp-tv-card__media,
.otp-search-page .otp-tv-card__media img,
.otp-search-page .otp-tv-card__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.otp-search-page .otp-tv-card__media img {
    display: block;
    object-fit: cover;
    transition: transform .45s ease;
}

.otp-search-page .otp-tv-card:hover .otp-tv-card__media img {
    transform: scale(1.045);
}

.otp-search-page .otp-tv-card__overlay {
    background: linear-gradient(0deg, rgba(0,0,0,.96) 0%, rgba(0,0,0,.66) 30%, rgba(0,0,0,.06) 72%);
}

.otp-search-page .otp-tv-card__content {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    bottom: 12px;
}

.otp-search-page .otp-tv-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    color: #fff;
    font-family: var(--otp-font-secondary);
    font-size: 14px;
    font-weight: var(--otp-weight-secondary);
    line-height: 1.22;
    letter-spacing: -.015em;
}

.otp-search-page .otp-tv-card__meta {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.68);
    font-family: var(--otp-font-text);
    font-size: 10px;
    font-weight: var(--otp-weight-text);
    line-height: 1.2;
}

.otp-search-page .otp-search-card__play {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 50%;
    background: rgba(0,0,0,.46);
    opacity: 0;
    transform: scale(.86);
    backdrop-filter: blur(7px);
    transition: opacity .22s ease, transform .22s ease, border-color .22s ease, background .22s ease;
}

.otp-search-page .otp-search-card__play i {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
}

.otp-search-page .otp-search-card:hover .otp-search-card__play {
    opacity: 1;
    transform: scale(1);
    border-color: var(--otp-gold);
    background: rgba(0,0,0,.70);
}

/* Pagination */
.otp-search-page .otp-search-pagination {
    margin-top: 44px;
}

.otp-search-page .otp-search-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.otp-search-page .otp-search-pagination .page-numbers li {
    margin: 0;
    padding: 0;
}

.otp-search-page .otp-search-pagination a.page-numbers,
.otp-search-page .otp-search-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    background: #111113;
    color: rgba(255,255,255,.76);
    text-decoration: none;
    font-family: var(--otp-font-accent);
    font-size: 12px;
    font-weight: var(--otp-weight-accent);
}

.otp-search-page .otp-search-pagination a.page-numbers:hover {
    border-color: var(--otp-gold);
    color: #fff;
}

.otp-search-page .otp-search-pagination span.page-numbers.current {
    border-color: var(--otp-gold);
    background: var(--otp-gold);
    color: #080809;
}

/* Empty state */
.otp-search-page .otp-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    padding: 48px 24px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: #0d0d0f;
    text-align: center;
}

.otp-search-page .otp-search-empty__icon {
    position: relative;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border: 2px solid var(--otp-gold);
    border-radius: 50%;
}

.otp-search-page .otp-search-empty__icon::after {
    content: "";
    position: absolute;
    right: -10px;
    bottom: -5px;
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: var(--otp-gold);
    transform: rotate(45deg);
}

.otp-search-page .otp-search-empty h2 {
    margin: 0 0 8px;
    color: #fff;
    font-family: var(--otp-font-primary);
    font-size: 24px;
    font-weight: var(--otp-weight-primary);
}

.otp-search-page .otp-search-empty p {
    margin: 0;
    color: rgba(255,255,255,.58);
    font-family: var(--otp-font-text);
    font-size: 14px;
    font-weight: var(--otp-weight-text);
}

.otp-search-page .otp-search-empty__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 20px;
    padding: 0 18px;
    border: 1px solid var(--otp-gold);
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
    font-family: var(--otp-font-accent);
    font-size: 12px;
    font-weight: var(--otp-weight-accent);
}

.otp-search-page .otp-search-empty__button:hover {
    background: rgba(233,185,79,.12);
    color: #fff;
}

/* Taxonomy archive additions */
.otp-search-page.otp-taxonomy-page .otp-taxonomy-header {
    margin-bottom: 26px;
}

.otp-search-page.otp-taxonomy-page .otp-taxonomy-search {
    max-width: 920px;
    margin-bottom: 34px;
}

.otp-search-page.otp-taxonomy-page .otp-taxonomy-grid {
    margin-top: 0;
}

.otp-search-page.otp-taxonomy-page .otp-taxonomy-empty__play {
    position: relative;
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    border: 2px solid var(--otp-gold);
    border-radius: 50%;
}

.otp-search-page.otp-taxonomy-page .otp-taxonomy-empty__play::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    margin: -8px 0 0 -4px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid var(--otp-gold);
}

@media (max-width: 1250px) {
    .otp-search-page .otp-search-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .otp-search-page .otp-search-shell {
        width: min(calc(100% - 44px), 1600px);
        padding-top: 44px;
    }

    .otp-search-page .otp-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }
}

@media (max-width: 600px) {
    .otp-search-page .otp-search-shell {
        width: calc(100% - 30px);
        padding: 34px 0 58px;
    }

    .otp-search-page .otp-search-title {
        font-size: 34px;
    }

    .otp-search-page .otp-search-form {
        min-height: 52px;
    }

    .otp-search-page .otp-search-form__input,
    .otp-search-page .otp-search-form__input[type="search"] {
        height: 50px;
        line-height: 50px;
        font-size: 14px;
    }

    .otp-search-page .otp-search-form__button {
        min-width: 78px;
        padding: 0 13px;
        font-size: 11px;
    }

    .otp-search-page .otp-search-form__icon {
        margin-left: 15px;
        margin-right: 8px;
    }

    .otp-search-page .otp-search-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .otp-search-page *,
    .otp-search-page *::before,
    .otp-search-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
