/*********************************************
    SEARCH OVERLAY
**********************************************/

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 5000;
    overflow-y: auto;
    padding: 40px 20px;
}

    .search-overlay.open {
        display: flex;
    }


/*********************************************
    WINDOW
**********************************************/
/*
.search-window {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0,0,0,.25);
    overflow: hidden;
}
*/
.search-window {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
/*********************************************
    HEADER
**********************************************/

.search-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 14px 0 14px;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid #ececec;
}

.search-header input {
    flex: 1;
    padding: 12px 16px;
    font-size: 18px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    outline: none;
}

.search-header input:focus {
    border-color: #2c77ff;
}

.search-header select {
    width: 170px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #cccccc;
}

/*CONTEST*/

.search-award-header {
    padding: 16px 22px 14px 22px;
    border-bottom: 2px solid #e6e6e6;
    background: #fafafa;
}
.search-award-contest {
    font-size: 1.25rem;
    font-weight: 600;
}

.search-award-edition {
    margin-top: 2px;
    font-size: 1rem;
}

.search-award-dates {
    margin-top: 4px;
    color: #777;
    font-size: .88rem;
}

.search-award-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c88a00;
    font-size: 1.02rem;
    margin-bottom: 2px;
}

.search-award-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.search-award-winner {
    margin-left: 40px;
}

.search-award-empty {
    color: #999;
    font-style: italic;
}

.search-award-selects {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #ececec;
}

.search-award-selects select {
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    background: white;
    font-size: 1rem;
}

.search-award-selects select:first-child {
    flex: 2;
}

.search-award-selects select:last-child {
    flex: 1;
}

/*********************************************
    CLOSE BUTTON
**********************************************/

.search-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
}

/*********************************************
    SEARCH RESULTS
*********************************************/

/*
#search-results {
    min-height: 300px;
    max-height: 70vh;
    overflow-y: auto;
}
*/
#search-results {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.search-placeholder {
    padding: 40px;
    text-align: center;
    color: #888;
}

.search-results-list {
    display: flex;
    flex-direction: column;
}

.search-result {
    padding: 14px 18px;
    border-bottom: 1px solid #e6e6e6;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result:hover {
    background: #f7f7f7;
}

/*********************************************
    TITOLO PRINCIPALE
*********************************************/

.search-result-first {
    margin-left: 14px;
    margin-bottom: 6px;
    font-size: 1.15rem;
    line-height: 1.30;
}

.search-result-year {
    margin-left: 6px;
    color: #777;
    font-size: .92rem;
    white-space: nowrap;
}

/*********************************************
    TITOLI SECONDARI
*********************************************/

.search-result-others {
    margin-left: 34px;
}

.search-result-subtitle {
    display: flex;
    align-items: flex-start;
    margin-top: 2px;
    line-height: 1.25;
    font-size: .90rem;
    color: #666;
}

.search-label {
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 10px;
    color: #999;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.search-subtitle-text {
    flex: 1;
}

/*********************************************
    SEARCH ENTITY (PERSON, CHARACTER)
*********************************************/

.search-entity {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.search-entity-image {
    width: 58px;
    flex-shrink: 0;
}

.search-entity-image img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.search-entity-data {
    flex: 1;
    min-width: 0;
}

.search-serie-image {
    width: 90px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
    background: #f8f8f8;
}

.search-serie-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/*********************************************
    EVIDENZIAZIONE
*********************************************/

.search-match {
    font-weight: bold;
    color: #c0392b;
    background: #fff4a8;
    border-radius: 2px;
    padding: 0 1px;
}

/*********************************************
    NESSUN RISULTATO
*********************************************/

.search-no-results {
    text-align: center;
    padding: 30px;
    color: #777;
    font-style: italic;
}
/*********************************************
    MOBILE
**********************************************/

@media (max-width:700px) {

    .search-overlay {
        padding: 0;
        align-items: stretch;
    }

    .search-window {
        border-radius: 0;
        max-width: none;
        min-height: 100vh;
    }

    .search-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 18px;
    }

    .search-header input {
        width: 100%;
        font-size: 1.1rem;
    }

    .search-header select {
        width: 100%;
    }

    #search-results {
        flex: 1;
        min-height: 0;
    }

    .search-award-selects {
        flex-direction: column;
        gap: 10px;
    }

    .search-award-selects select {
        width: 100%;
    }
}
