/* Search page + autocomplete dropdown */

.nt-search {
    padding-top: 8px;
}

.nt-search-head {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 28px;
}

.nt-search-query {
    color: var(--nt-accent-hover, #ff0a54);
}

.nt-search-title-rest {
    color: var(--nt-text);
    font-weight: 600;
}

.nt-search-form-wrap {
    max-width: 720px;
    width: 100%;
}

/* Hero search bar on /szukaj */
.nt-search .nt-search-form form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
    background: var(--nt-elevated, #141418);
    border: 1px solid var(--nt-border, rgba(255, 255, 255, 0.1));
    border-radius: 999px;
    padding: 6px 6px 6px 22px;
    min-height: 52px;
    margin: 0;
    box-shadow: var(--nt-softshadow, 0 8px 24px rgba(0, 0, 0, 0.25));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nt-search .nt-search-form form:focus-within {
    border-color: color-mix(in oklab, var(--nt-accent, #ff0a54) 42%, var(--nt-border, rgba(255, 255, 255, 0.1)));
    box-shadow: 0 0 0 3px var(--nt-accent-soft, rgba(255, 10, 84, 0.15));
}

.nt-search .nt-search-form form input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--nt-text, #fff) !important;
    font-size: 15px;
    font-weight: 500;
    height: 40px;
    padding: 0 8px 0 0 !important;
    border-radius: 0 !important;
    appearance: none;
}

.nt-search .nt-search-form form input::placeholder {
    color: var(--nt-muted, rgba(255, 255, 255, 0.45));
    font-weight: 500;
}

.nt-search .nt-search-form form input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.nt-search .nt-search-form form button {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--nt-accent-soft, rgba(255, 10, 84, 0.15));
    color: var(--nt-accent, #ff0a54);
    border: 0;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nt-search .nt-search-form form button:hover {
    background: color-mix(in oklab, var(--nt-accent, #ff0a54) 28%, transparent);
    color: var(--nt-accent-hover, #ff3d73);
    transform: scale(1.04);
}

.nt-search .nt-search-form form button::before {
    display: none !important;
    content: none !important;
}

.nt-search .nt-search-form form button svg {
    width: 18px;
    height: 18px;
    display: block;
}

.nt-search-trending {
    margin-top: 0.25rem;
    padding: 16px 18px;
    border-radius: var(--nt-radius-lg, 14px);
    background: color-mix(in oklab, var(--nt-elevated, #141418) 72%, transparent);
    border: 1px solid var(--nt-border, rgba(255, 255, 255, 0.1));
}

.nt-search-trending-label {
    margin: 0 0 0.75rem;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nt-muted, rgba(255, 255, 255, 0.55));
    font-weight: 700;
}

.nt-search-section {
    margin-top: 2.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid color-mix(in oklab, var(--nt-border, rgba(255, 255, 255, 0.1)) 70%, transparent);
}

.nt-search-section:first-of-type {
    margin-top: 0.5rem;
    padding-top: 0;
    border-top: 0;
}

.nt-search-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 1.25rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--nt-text, rgba(255, 255, 255, 0.92));
}

.nt-search-section-title::before {
    content: "";
    flex: 0 0 4px;
    width: 4px;
    height: 1.05em;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--nt-accent, #ff0a54), color-mix(in oklab, var(--nt-accent, #ff0a54) 55%, #000));
}

.nt-movies-grid--ph {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.nt-search .nt-movies-empty {
    margin-top: 1.5rem;
    text-align: center;
    padding: 2rem 1.5rem;
}

/* Autocomplete dropdown */
.nt-search-suggest {
    position: relative;
}

.nt-search-suggest form {
    position: relative;
}

.nt-search-suggest-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1200;
    max-height: 360px;
    overflow-y: auto;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: rgba(12, 12, 16, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nt-search-suggest-dropdown[hidden] {
    display: none !important;
}

.nt-search-suggest-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    transition: background 0.15s ease;
}

.nt-search-suggest-item:hover,
.nt-search-suggest-item.is-active {
    background: rgba(208, 0, 64, 0.18);
}

.nt-search-suggest-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.nt-search-suggest-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nt-search-suggest-title {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nt-search-suggest-type {
    flex: 0 0 auto;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.nt-search-suggest-status {
    padding: 0.65rem 0.75rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

.menu-area .footer-search.nt-search-suggest .nt-search-suggest-dropdown {
    min-width: 320px;
}

.menu-area .footer-search.nt-search-suggest,
.menu-nav .navbar-wrap,
.menu-nav .navigation {
    overflow: visible;
}

@media (max-width: 767px) {
    .nt-search-head {
        gap: 1rem;
    }

    .nt-search .nt-search-form form {
        min-height: 48px;
        padding-left: 16px;
    }

    .nt-search .nt-search-form form input {
        font-size: 16px;
    }

    .nt-search-trending {
        padding: 14px;
    }

    .nt-search-suggest-dropdown {
        max-height: 50vh;
    }
}

/* Mobile search overlay (< xl — icon instead of inline bar) */
body.nt-search-mobile-open {
    overflow: hidden;
}

.nt-search-mobile {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    flex-direction: column;
}

.nt-search-mobile[hidden] {
    display: none !important;
}

.nt-search-mobile-backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(8, 8, 12, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.nt-search-mobile-panel {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    max-height: min(88vh, 640px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: max(10px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #121218 0%, #0c0c10 100%);
    border-bottom: 1px solid var(--nt-border, rgba(255, 255, 255, 0.1));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.nt-search-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.nt-search-mobile-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--nt-text, rgba(255, 255, 255, 0.92));
}

.nt-search-mobile-close {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--nt-border, rgba(255, 255, 255, 0.12));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--nt-text, rgba(255, 255, 255, 0.88));
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nt-search-mobile-close:hover,
.nt-search-mobile-close:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: color-mix(in oklab, var(--nt-accent, #ff0a54) 35%, var(--nt-border, rgba(255, 255, 255, 0.12)));
    color: var(--nt-text, #fff);
    outline: none;
}

.nt-search-mobile-close svg {
    width: 20px;
    height: 20px;
}

.nt-search-mobile-body {
    padding-top: 0;
}

.nt-search-mobile-body .nt-search-form-wrap {
    max-width: none;
}

.nt-search-mobile-body .nt-search-form form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
    background: var(--nt-elevated, #141418);
    border: 1px solid var(--nt-border, rgba(255, 255, 255, 0.1));
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
    min-height: 50px;
    margin: 0;
    box-shadow: var(--nt-softshadow, 0 8px 24px rgba(0, 0, 0, 0.25));
}

.nt-search-mobile-body .nt-search-form form:focus-within {
    border-color: color-mix(in oklab, var(--nt-accent, #ff0a54) 42%, var(--nt-border, rgba(255, 255, 255, 0.1)));
    box-shadow: 0 0 0 3px var(--nt-accent-soft, rgba(255, 10, 84, 0.15));
}

.nt-search-mobile-body .nt-search-form form input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--nt-text, #fff) !important;
    font-size: 16px;
    font-weight: 500;
    height: 40px;
    padding: 0 8px 0 0 !important;
    border-radius: 0 !important;
}

.nt-search-mobile-body .nt-search-form form button {
    position: static !important;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--nt-accent-soft, rgba(255, 10, 84, 0.15));
    color: var(--nt-accent, #ff0a54);
    border: 0;
    padding: 0;
    cursor: pointer;
}

.nt-search-mobile-body .nt-search-form form button::before {
    display: none !important;
    content: none !important;
}

.nt-search-mobile-body .nt-search-suggest-dropdown {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    margin-top: 8px;
    max-height: min(42vh, 320px);
}

.nt-search-mobile-trending {
    margin-top: 14px;
}

.nt-search-mobile-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nt-search-mobile-chips::-webkit-scrollbar {
    display: none;
}

.nt-search-mobile-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--nt-border, rgba(255, 255, 255, 0.12));
    background: rgba(255, 255, 255, 0.04);
    color: var(--nt-muted, rgba(255, 255, 255, 0.72));
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nt-search-mobile-chip:hover,
.nt-search-mobile-chip:focus-visible {
    color: var(--nt-text, #fff);
    border-color: color-mix(in oklab, var(--nt-accent, #ff0a54) 40%, var(--nt-border, rgba(255, 255, 255, 0.12)));
    background: var(--nt-accent-soft, rgba(255, 10, 84, 0.15));
    outline: none;
}

@media (min-width: 1200px) {
    .nt-search-mobile {
        display: none !important;
    }
}
