/* Live search do cabeçalho. O campo existente continua intacto; somente o dropdown é acrescentado. */
#ajm-search.ajm-live-search-ready,
.ajm-search.ajm-live-search-ready {
    overflow: visible;
    z-index: 110;
}

.ajm-live-search-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(410px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: #121518;
    box-shadow: 0 18px 55px rgba(0,0,0,.42);
    color: #e9eaec;
    text-align: left;
}

.ajm-live-search-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: #838a92;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ajm-live-search-head strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 20px;
    background: rgba(255,255,255,.06);
    color: #b9bec4;
    font-size: 10px;
}

.ajm-live-search-results {
    max-height: 440px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}

.ajm-live-search-item {
    display: grid;
    grid-template-columns: 52px minmax(0,1fr) 20px;
    align-items: center;
    gap: 11px;
    min-height: 78px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255,255,255,.055);
    color: inherit;
    text-decoration: none;
    transition: background .16s ease;
}

.ajm-live-search-item:hover,
.ajm-live-search-item.is-active {
    background: rgba(255,255,255,.05);
    color: #fff;
}

.ajm-live-search-poster {
    display: block;
    width: 52px;
    height: 62px;
    overflow: hidden;
    border-radius: 7px;
    background: #202429;
}

.ajm-live-search-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ajm-live-search-no-poster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #596068;
    font-size: 17px;
}

.ajm-live-search-info {
    display: block;
    min-width: 0;
}

.ajm-live-search-title,
.ajm-live-search-alt {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ajm-live-search-title {
    margin-bottom: 3px;
    color: #f1f2f3;
    font-size: 13px;
    font-weight: 600;
}

.ajm-live-search-alt {
    margin-bottom: 7px;
    color: #777f88;
    font-size: 10px;
}

.ajm-live-search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ajm-live-search-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
    padding: 0 7px;
    border-radius: 20px;
    background: rgba(255,255,255,.055);
    color: #9ca2a9;
    font-size: 9px;
    line-height: 1;
}

.ajm-live-search-arrow {
    color: #555d65;
    font-size: 11px;
    transition: color .16s ease, transform .16s ease;
}

.ajm-live-search-item:hover .ajm-live-search-arrow,
.ajm-live-search-item.is-active .ajm-live-search-arrow {
    color: #ef1018;
    transform: translate(2px,-2px);
}

.ajm-live-search-all {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) 15px;
    align-items: center;
    gap: 6px;
    min-height: 46px;
    padding: 0 14px;
    background: #0e1113;
    color: #aeb3b8;
    font-size: 10px;
    text-decoration: none;
}

.ajm-live-search-all strong {
    overflow: hidden;
    color: #fff;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ajm-live-search-all i {
    color: #ef1018;
    text-align: right;
}

.ajm-live-search-all:hover {
    background: #161a1e;
    color: #fff;
}

.ajm-live-search-empty,
.ajm-live-search-state-label {
    color: #8c939b;
    font-size: 11px;
}

.ajm-live-search-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 95px;
    padding: 18px;
    text-align: center;
}

.ajm-live-search-empty i {
    color: #5b626a;
    font-size: 14px;
}

.ajm-live-search-empty.is-error i {
    color: #ef1018;
}

.ajm-live-search-state-label {
    display: block;
    padding: 12px 14px 5px;
}

.ajm-live-search-skeleton {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
}

.ajm-live-search-skeleton > span,
.ajm-live-search-skeleton i,
.ajm-live-search-skeleton b {
    display: block;
    border-radius: 6px;
    background: linear-gradient(90deg,rgba(255,255,255,.045),rgba(255,255,255,.085),rgba(255,255,255,.045));
    background-size: 220% 100%;
    animation: ajm-live-search-pulse 1.25s linear infinite;
}

.ajm-live-search-skeleton > span {
    width: 52px;
    height: 62px;
}

.ajm-live-search-skeleton i {
    width: 72%;
    height: 10px;
    margin-bottom: 10px;
}

.ajm-live-search-skeleton b {
    width: 44%;
    height: 8px;
}

@keyframes ajm-live-search-pulse {
    from { background-position: 100% 0; }
    to { background-position: -120% 0; }
}

@media (max-width: 620px) {
    #ajm-search.ajm-live-search-ready,
    .ajm-search.ajm-live-search-ready {
        z-index: 999;
    }

    .ajm-live-search-panel {
        position: fixed;
        top: 70px;
        right: 14px;
        left: 14px;
        width: auto;
        max-height: calc(100vh - 90px);
    }

    .ajm-live-search-results {
        max-height: calc(100vh - 220px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ajm-live-search-item,
    .ajm-live-search-arrow,
    .ajm-live-search-skeleton > span,
    .ajm-live-search-skeleton i,
    .ajm-live-search-skeleton b {
        transition: none;
        animation: none;
    }
}
