/* =====================================================
   ðŸ”Ž SEARCH PAGE
===================================================== */

.search-page {
    padding: 0;
}



/* =====================================================
   ðŸ”¥ TRENDING
===================================================== */

.search-trending {
    margin-bottom: 20px;
    padding: 16px 16px 0 16px;
}



.search-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* GRID RESPONSIVO */
.search-trending-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.search-genres {
    padding: 0 16px 0 16px;  
}



/* ðŸ’» DESKTOP */
@media (min-width: 768px) {
    .search-page {
        max-width: 900px;
        margin: 0 auto;
    }

    .search-trending-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =====================================================
   🎬 CARD DE FILME
===================================================== */

.search-movie-card {
    position: relative;
    display: block;

    border-radius: 12px;
    overflow: hidden;

    background-color: var(--color-poster-placeholder, #161717);
}

/* POSTER */
.search-movie-card img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

/* ðŸŽ­ OVERLAY PROFISSIONAL */
.search-movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;

    background: linear-gradient(
        180deg,
        rgba(15, 15, 15, 0) 0%,
        rgba(15, 15, 15, 0.74) 100%
    );
}

/* â­ RATING */
.search-movie-rating {
    position: absolute;
    bottom: 8px;
    right: 10px;

    display: flex;
    align-items: center;
    gap: 4px;

    font-size: 13px;
    font-weight: 500;
    color: #fff;
}

.search-movie-rating img {
    width: 15px;
    height: 15px;
}

.search-movie-rating-icon {
    filter: invert(72%) sepia(93%) saturate(1740%) hue-rotate(360deg) brightness(104%) contrast(104%);
}

/* =====================================================
   ðŸŽ¬ GÃŠNEROS
===================================================== */

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1px;
}

.search-see-all {
    font-size: 15px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

/* SCROLL HORIZONTAL */
.search-genres-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;

    /* remove scrollbar feia */
    scrollbar-width: none;
}

.search-genres-scroll::-webkit-scrollbar {
    display: none;
}

/* CARD */
.search-genre-card {
    position: relative;
    min-width: 140px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

/* IMAGEM */
.search-genre-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* OVERLAY */
.search-genre-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.2) 0%,
        rgba(0,0,0,0.7) 100%
    );
}

/* TEXTO */
.search-genre-name {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}









/* ========================================
SPINNER SEARCH
======================================== */

.search-spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 30px 0;
}




/* =====================================================
   🎬 SEARCH RESULT ITEM — MOVIE CARD
===================================================== */


.search-results-state {
    padding: 25px 16px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 12px;
    margin-bottom: 10px;

    border-radius: 12px;

    background-color: #1a1a1a;

    color: inherit;
    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.08s ease;
}

/* 🖥️ HOVER DESKTOP */
.search-result-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* 📱 FEEDBACK DE TOQUE */
.search-result-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.06);
}


/* =====================================================
   🎞️ SEARCH RESULT POSTER
===================================================== */

.search-result-poster {
    width: 50px;
    height: 72px;

    flex-shrink: 0;

    border-radius: 8px;
    overflow: hidden;

    background-color: var(--color-poster-placeholder, #161717);
}

.search-result-poster img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* =====================================================
   📄 SEARCH RESULT INFO
===================================================== */

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 0; /* essencial para ellipsis funcionar */
}


/* =====================================================
   🎬 SEARCH RESULT TITLE
===================================================== */

.search-result-title {
    display: flex;
    align-items: baseline;
    gap: 6px;

    margin: 0;

    min-width: 0;
}


/* 🎬 NOME DO FILME */
.search-result-title {
    font-size: 14px;
    font-weight: 600;

    color: var(--color-text-primary);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 📅 ANO */
.search-result-meta {
    font-size: 13px;
    font-weight: 400;

    color: var(--color-text-secondary);

    flex-shrink: 0;
}


/* =====================================================
   🎭 SEARCH RESULT CAST
===================================================== */

.search-result-cast {
    font-size: 12.5px;
    line-height: 1.4;

    color: var(--color-text-secondary);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-actor {
    color: inherit;
}