
/* =========================================
   NUT TIM KIEM TREN THANH DIEU HUONG
========================================= */

#search-toggle {
    background: none;
    border: none;
    color: white;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    transition: color 0.25s ease;
}

#search-toggle:hover {
    color: #8fd3ff;
}


/* =========================================
   KHU VUC THANH TIM KIEM
========================================= */

.search-container {
    display: none;
    position: fixed;
    top: 85px;
    right: 5%;
    width: 420px;
    max-width: 90%;
    z-index: 50;
}


/* =========================================
   THANH NHAP TU KHOA
========================================= */

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 16px;

    background: rgba(8, 15, 35, 0.97);
    border: 1px solid rgba(100, 190, 255, 0.6);
    border-radius: 12px;

    box-shadow:
        0 0 20px rgba(0, 150, 255, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.35);

    backdrop-filter: blur(15px);
}


/* O NHAP NOI DUNG */

#search-input {
    flex: 1;
    min-width: 0;

    background: transparent;
    border: none;
    outline: none;

    color: white;
    font-size: 15px;
    font-family: inherit;
}

#search-input::placeholder {
    color: #9ba9bd;
}


/* NUT DONG */

#search-close {
    background: none;
    border: none;

    color: white;
    font-size: 24px;

    cursor: pointer;
    transition: color 0.2s ease;
}

#search-close:hover {
    color: #ff7777;
}


/* =========================================
   KHU VUC KET QUA TIM KIEM
========================================= */

#search-results {
    display: flex;
    flex-direction: column;

    margin-top: 8px;

    max-height: 420px;
    overflow-y: auto;

    background: rgba(8, 15, 35, 0.97);
    border: 1px solid rgba(100, 190, 255, 0.25);
    border-radius: 12px;

    color: white;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4);

    backdrop-filter: blur(15px);
}


/* =========================================
   TUNG KET QUA TIM KIEM
========================================= */

.search-result-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 12px;

    width: 100%;
    padding: 14px 16px;

    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    background: transparent;
    color: white;

    text-align: left;
    font-family: inherit;

    cursor: pointer;

    transition:
        background 0.25s ease,
        padding 0.25s ease;
}

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

.search-result-item:hover {
    background: rgba(80, 160, 255, 0.2);
    padding-left: 20px;
}


/* TEN THIEN THE */

.result-name {
    font-size: 15px;
    font-weight: bold;
    color: #ffffff;
}


/* LOAI THIEN THE */

.result-type {
    color: #8daac7;
    font-size: 12px;
    align-self: center;
}


/* MO TA KHOA HOC */

.result-description {
    grid-column: 1 / -1;

    color: #d0d9e8;
    font-size: 12px;
    line-height: 1.6;
}


/* Y NGHIA VA THAN THOAI */

.result-association {
    grid-column: 1 / -1;

    color: #8bb8ed;
    font-size: 12px;
    line-height: 1.6;
}


/* =========================================
   THANH CUON KET QUA
========================================= */

#search-results::-webkit-scrollbar {
    width: 5px;
}

#search-results::-webkit-scrollbar-track {
    background: transparent;
}

#search-results::-webkit-scrollbar-thumb {
    background: rgba(110, 160, 220, 0.5);
    border-radius: 10px;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 180, 255, 0.8);
}


/* =========================================
   GIAO DIEN DIEN THOAI
========================================= */

@media (max-width: 700px) {

    .search-container {
        top: 75px;
        right: 5%;
        width: 90%;
    }

    .search-box {
        padding: 10px 13px;
    }

    #search-input {
        font-size: 13px;
    }

    #search-results {
        max-height: 350px;
    }

    .search-result-item {
        padding: 12px;
    }

    .result-name {
        font-size: 13px;
    }

    .result-type {
        font-size: 10px;
    }

    .result-description,
    .result-association {
        font-size: 11px;
    }
}
