/* ===============================
   EP TV SEARCH STYLES
   Dedicated styling for the TV page search
   =============================== */

.tv-search {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0.5rem;
    border: 1px solid black;
    background: #fff;
    border-radius: 4px;
}

@media (width < 1100px) {
    .tv-search {
        width: 100%;
    }
}

input.tv-search-input {
    background: white;
}

.tv-search-input:hover,
.tv-search-input:focus {
    background: none !important;
}

/* Search input */
.tv-search-input {
    width: 100%;
    margin-bottom: 0px !important;
    padding: 0.3rem;
    font-size: 0.9rem !important;
    transition: width 0.3s ease, border-color 0.2s ease;
    border: none !important;
}

.tv-search-input::placeholder {
    color: #000;
    opacity: 1;
}

.tv-search-icon {
    pointer-events: none;
}

/* Search results dropdown */
.tv-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    max-height: 400px;
    min-width: 100%;
    width: 100%;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.2s ease;
    padding: 0.5rem;
}

.tv-search-results.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

/* Scrollbar styling */
.tv-search-results::-webkit-scrollbar {
    width: 6px;
}

.tv-search-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Each TV search result */
.tv-search-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
    color: inherit;
    text-decoration: none;
}

.tv-search-result:last-child {
    border-bottom: none;
}

.tv-search-result:hover {
    background: #fafafa;
}

/* Video thumbnail */
.tv-search-result img,
.tv-search-result-placeholder {
    width: 90px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #eee;
}

/* Result text */
.tv-result-content {
    font-size: 0.9rem;
    font-weight: 700;
}

.tv-result-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

p.tv-result-desc {
    font-size: 0.75rem !important;
    margin: 0.25rem 0 0;
    line-height: 1.5 !important;
    font-weight: 400;
}

/* Close icon */
.tv-search-close {
    display: none;
}

.tv-search-close.show {
    display: block;
    margin-right: 10px;
    font-size: 0.75rem;
    font-weight: 800 !important;
    cursor: pointer;
}

@media (width < 1100px) {
    .tv-search-results {
        left: 0px;
        width: 100%;
    }
}