.rating-search-panel {
    margin: 20px 0 26px;
}

.cup-global-search {
    position: relative;
    z-index: 30;
    margin: 0 0 8px;
}

.rating-search-shell {
    border: 1px solid rgba(255, 215, 0, 0.28);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(18, 18, 18, 0.92) 46%, rgba(0, 0, 0, 0.96) 100%);
    padding: 18px;
    border-radius: 8px;
}

.cup-global-search .rating-search-shell {
    position: relative;
    overflow: visible;
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.cup-global-search .rating-search-input-row {
    max-width: 760px;
}

.rating-search-input-row {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.rating-search-input {
    width: 100%;
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid rgba(255, 215, 0, 0.42);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(22, 22, 18, 0.98) 0%, rgba(7, 7, 7, 0.98) 100%);
    color: #f1f1f1;
    font-size: 16px;
    line-height: 1.35;
    caret-color: #FFD700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 215, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rating-search-input-row.has-value .rating-search-input {
    padding-right: 52px;
}

.rating-search-input:hover {
    border-color: rgba(255, 215, 0, 0.62);
    background: linear-gradient(180deg, rgba(26, 24, 17, 0.98) 0%, rgba(9, 9, 9, 0.98) 100%);
}

.rating-search-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 3px rgba(255, 215, 0, 0.13), 0 16px 36px rgba(0, 0, 0, 0.42);
    background: linear-gradient(180deg, rgba(31, 28, 18, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
}

.rating-search-input::placeholder {
    color: #777;
}

.rating-search-clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 215, 0, 0.42);
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.18) 0%, rgba(255, 215, 0, 0.08) 100%);
    color: #FFD700;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.36);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.rating-search-clear.visible {
    display: inline-flex;
}

.rating-search-clear:hover {
    border-color: rgba(255, 215, 0, 0.72);
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.26) 0%, rgba(255, 215, 0, 0.12) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px rgba(0, 0, 0, 0.42);
}

.rating-search-clear:focus-visible {
    outline: none;
    border-color: #FFD700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 3px rgba(255, 215, 0, 0.18), 0 10px 22px rgba(0, 0, 0, 0.42);
}

.rating-search-clear:active {
    transform: translateY(-50%) scale(0.96);
}

.rating-search-results-info {
    min-height: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-top: 12px;
}

.cup-global-search .rating-search-results-info:empty {
    min-height: 0;
    margin-top: 0;
}

.search-container.rating-search-panel .rating-search-results-info:empty {
    min-height: 0;
    margin-top: 0;
}

.cup-global-search + .text-center .links-container {
    margin-top: 14px;
    margin-bottom: 24px;
}

.cup-global-search-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 45;
    max-height: min(62vh, 560px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.58) rgba(255, 215, 0, 0.08);
    scrollbar-gutter: stable;
    margin-top: 0;
    padding: 14px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    background: rgba(4, 4, 4, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 215, 0, 0.08);
}

.cup-global-search-results::-webkit-scrollbar {
    width: 9px;
}

.cup-global-search-results::-webkit-scrollbar-track {
    background: rgba(255, 215, 0, 0.06);
    border-radius: 8px;
}

.cup-global-search-results::-webkit-scrollbar-thumb {
    min-height: 36px;
    border: 2px solid rgba(4, 4, 4, 0.98);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.76) 0%, rgba(181, 135, 0, 0.72) 100%);
}

.cup-global-search-results::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.94) 0%, rgba(218, 164, 0, 0.86) 100%);
}

.cup-global-search-results[hidden],
.rating-search-group[hidden],
.rating-search-empty[hidden] {
    display: none;
}

.rating-search-mobile-tabs {
    display: none;
}

.rating-search-mobile-tab {
    border: 1px solid rgba(255, 215, 0, 0.24);
    border-radius: 6px;
    background: rgba(255, 215, 0, 0.08);
    color: #cfcfcf;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    justify-content: center;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 800;
}

.rating-search-mobile-tab[aria-selected="true"] {
    border-color: rgba(255, 215, 0, 0.68);
    background: rgba(255, 215, 0, 0.18);
    color: #FFD700;
}

.rating-search-mobile-tab-count {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.34);
    color: #f0f0f0;
    font-size: 11px;
    line-height: 1.4;
}

.rating-search-group {
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: 8px;
    background: rgba(8, 8, 8, 0.72);
    overflow: hidden;
}

.rating-search-group-title {
    padding: 12px 14px;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.09);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.rating-search-list {
    display: flex;
    flex-direction: column;
}

.rating-search-result {
    padding: 14px;
    color: #e8e8e8;
    text-decoration: none;
    border-top: 1px solid rgba(255, 215, 0, 0.11);
}

.rating-search-result:first-child {
    border-top: none;
}

.rating-search-result:hover,
.rating-search-result:focus-visible {
    background: rgba(255, 215, 0, 0.08);
    outline: none;
}

.rating-search-result-title {
    display: block;
    color: #FFD700;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.rating-search-result-meta,
.rating-search-result-subtitle {
    margin-top: 5px;
    color: #aaa;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.rating-search-result-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.rating-search-result-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 215, 0, 0.28);
    border-radius: 6px;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.08);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.rating-search-result-link:hover,
.rating-search-result-link:focus-visible {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.16);
    outline: none;
}

.rating-search-show-more {
    width: 100%;
    border: none;
    border-top: 1px solid rgba(255, 215, 0, 0.11);
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    padding: 11px 14px;
    cursor: pointer;
    font-weight: 800;
}

.rating-search-show-more:hover,
.rating-search-show-more:focus-visible {
    background: rgba(255, 215, 0, 0.18);
    outline: none;
}

.rating-search-empty {
    margin-top: 18px;
    padding: 28px 18px;
    border: 1px dashed rgba(255, 215, 0, 0.32);
    border-radius: 8px;
    text-align: center;
    color: #999;
}

.cup-global-search .rating-search-empty {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 45;
    margin-top: 0;
    background: rgba(4, 4, 4, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62);
}

.rating-search-empty-title {
    color: #FFD700;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.rating-table tbody tr.search-hidden,
.rating-card-item.search-hidden {
    display: none !important;
}

.search-container .rating-search-input-row {
    max-width: 500px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .cup-global-search-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rating-search-shell {
        padding: 14px;
    }

    .rating-search-input {
        min-height: 46px;
        font-size: 15px;
    }

    .cup-global-search-results {
        gap: 8px;
        top: calc(100% + 8px);
        padding: 10px;
        scrollbar-color: rgba(255, 215, 0, 0.62) rgba(255, 215, 0, 0.06);
    }

    .cup-global-search-results::-webkit-scrollbar {
        width: 7px;
    }

    .cup-global-search + .text-center .links-container {
        margin-top: 12px;
        margin-bottom: 20px;
    }

    .rating-search-mobile-tabs:not([hidden]) {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .rating-search-mobile-tab {
        display: inline-flex;
        flex: 1 0 auto;
    }

    .rating-search-group-mobile-hidden {
        display: none;
    }

    .rating-search-group-title {
        padding: 8px 10px;
        font-size: 12px;
    }

    .rating-search-result {
        padding: 9px 10px;
    }

    .rating-search-result-title {
        font-size: 14px;
        line-height: 1.22;
    }

    .rating-search-result-meta,
    .rating-search-result-subtitle {
        margin-top: 3px;
        font-size: 12px;
        line-height: 1.25;
    }

    .rating-search-result-links {
        gap: 5px;
        margin-top: 6px;
    }

    .rating-search-result-link {
        min-height: 24px;
        padding: 3px 7px;
        font-size: 11px;
    }

    .rating-search-show-more {
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cup-global-search + .text-center .links-container {
        margin-bottom: 18px;
    }
}
