/* ==========================================================
   Adamas Support Portal — Search Bar
   Design language: an academic "catalog lookup" —
   underline query bar, paper-toned result card, index tags.
   ========================================================== */

.support-search {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: 36px auto 0;
    font-family: "Open Sans", sans-serif;
}

/* ---- Query bar ---- */
.support-search__box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 22px 6px 22px 6px;
    padding: 16px 20px;
    backdrop-filter: blur(6px);
    transition: border-color .25s ease, background .25s ease;
}

.support-search__box::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0;
    height: 2px;
    background: #f39c12;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}

.support-search__box:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(243, 156, 18, 0.55);
}

.support-search__box:focus-within::after {
    transform: scaleX(1);
}

.support-search__icon {
    color: #f39c12;
    font-size: 16px;
    flex-shrink: 0;
}

.support-search__input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    letter-spacing: .01em;
    color: #ffffff;
    background: transparent;
}

.support-search__input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

/* Keyboard-shortcut hint badge — shown until the user starts typing */
.support-search__hint {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 3px 7px;
    font-family: "Poppins", sans-serif;
    transition: opacity .15s ease;
}

.support-search__hint.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.support-search__clear {
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 15px;
    cursor: pointer;
    display: none;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.support-search__clear.is-visible {
    display: inline-block;
}

.support-search__clear:hover {
    color: #f39c12;
}

/* ---- Loading rail (replaces a generic spinner) ---- */
.support-search__loader {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: -1px;
    height: 2px;
    overflow: hidden;
    border-radius: 2px;
    opacity: 0;
    transition: opacity .15s ease;
}

.support-search__loader.is-active {
    opacity: 1;
}

.support-search__loader::before {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: #f39c12;
    animation: support-search-rail 1.1s ease-in-out infinite;
}

@keyframes support-search-rail {
    0%   { left: -40%; }
    60%  { left: 100%; }
    100% { left: 100%; }
}

/* ---- Results card ("catalog drawer") ---- */
.support-search__dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    background: #fcfaf5;
    border-radius: 6px 22px 6px 22px;
    box-shadow: 0 20px 48px rgba(15, 14, 40, 0.35);
    overflow: hidden;
    z-index: 50;
    max-height: 440px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.support-search__dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.support-search__group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Raleway", sans-serif;
    font-style: italic;
    font-size: 12px;
    color: #9a8f6f;
    padding: 14px 22px 6px;
}

.support-search__group-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(38, 37, 93, 0.12);
}

.support-search__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 22px 11px 18px;
    text-decoration: none;
    color: #26255d;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .15s ease, border-color .15s ease;
}

.support-search__item:hover,
.support-search__item.is-active {
    background: rgba(38, 37, 93, 0.05);
    border-left-color: #26255d;
}

.support-search__item--topic:hover,
.support-search__item--topic.is-active {
    border-left-color: #f39c12;
}

.support-search__item-tag {
    flex-shrink: 0;
    width: 40px;
    font-family: "Poppins", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #26255d;
    opacity: .45;
}

.support-search__item--topic .support-search__item-tag {
    color: #f39c12;
    opacity: .8;
}

.support-search__item-text {
    min-width: 0;
}

.support-search__item-title {
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-search__item-title mark {
    background: rgba(243, 156, 18, 0.28);
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}

.support-search__item-sub {
    font-size: 12px;
    color: #9a8f6f;
    margin-top: 1px;
}

.support-search__empty {
    padding: 30px 22px;
    text-align: center;
    color: #9a8f6f;
    font-family: "Raleway", sans-serif;
    font-style: italic;
    font-size: 14px;
}

@media (max-width: 576px) {
    .support-search__box {
        padding: 13px 16px;
    }

    .support-search__hint {
        display: none;
    }
}