/* ═══════════════════════════════════════
   SEARCH MODAL — Dark mode fixes + Light theme
   Fixes text visibility in dark mode and adds
   full light theme overrides for the search popup.
   ═══════════════════════════════════════ */

/* ── Dark mode fixes ── */
.sm-result-item,
.sm-result-link,
.sm-action {
    color: #fff;
}
.sm-result-name,
.sm-post-title {
    color: #fff;
}
.sm-result-seeall strong {
    color: #fff;
}
.sm-recent-btn {
    color: #fff;
}

/* ═══════════════════════════════════════
   LIGHT THEME OVERRIDES
   ═══════════════════════════════════════ */

/* Backdrop */
[data-theme="light"] .sm-backdrop {
    background: rgba(0,0,0,.25);
}

/* Modal */
[data-theme="light"] .sm-modal {
    background: linear-gradient(320deg, rgba(255,255,255,.97), rgba(248,248,250,.98));
    color: #111;
    border: 1px solid rgba(0,0,0,.1);
    box-shadow: 0 25px 80px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.05);
}
[data-theme="light"] .sm-modal::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.1);
}

/* Search bar */
[data-theme="light"] .sm-bar {
    border-bottom-color: rgba(0,0,0,.08);
}
[data-theme="light"] .sm-bar-icon {
    color: rgba(0,0,0,.35);
}
[data-theme="light"] .sm-input {
    color: #111;
}
[data-theme="light"] .sm-input::placeholder {
    color: rgba(0,0,0,.35);
}
[data-theme="light"] .sm-close-btn {
    color: rgba(0,0,0,.4);
}
[data-theme="light"] .sm-close-btn:hover {
    color: #111;
    background: rgba(0,0,0,.06);
}
[data-theme="light"] .sm-kbd {
    background: rgba(0,0,0,.06);
    color: rgba(0,0,0,.4);
}

/* Filter tags */
[data-theme="light"] .sm-tags {
    border-bottom-color: rgba(0,0,0,.08);
}
[data-theme="light"] .sm-tags-label {
    color: rgba(0,0,0,.4);
}
[data-theme="light"] .sm-tag {
    background: rgba(0,0,0,.04);
    color: rgba(0,0,0,.55);
}
[data-theme="light"] .sm-tag:hover {
    background: rgba(0,0,0,.08);
    color: #111;
}
[data-theme="light"] .sm-tag.active {
    background: var(--accent, #BFF932);
    color: #111;
}
[data-theme="light"] .sm-tag.active svg {
    stroke: #111;
}

/* Results */
[data-theme="light"] .sm-results {
    border-bottom-color: rgba(0,0,0,.06);
}
[data-theme="light"] .sm-results-header {
    color: rgba(0,0,0,.45);
}
[data-theme="light"] .sm-results-count {
    color: #111;
}
[data-theme="light"] .sm-result-item {
    color: #111;
}
[data-theme="light"] .sm-result-item:hover {
    background: rgba(0,0,0,.03);
}
[data-theme="light"] .sm-result-name {
    color: #111;
}
[data-theme="light"] .sm-result-meta {
    color: rgba(0,0,0,.45);
}
[data-theme="light"] .sm-result-arrow {
    color: rgba(0,0,0,.3);
}
[data-theme="light"] .sm-result-empty {
    color: rgba(0,0,0,.4);
}
[data-theme="light"] .sm-result-crest {
    background: rgba(0,0,0,.04);
    color: rgba(0,0,0,.5);
}
[data-theme="light"] .sm-result-crest.type-team {
    background: rgba(95,122,0,.08);
    color: var(--accent-alt, #5f7a00);
}
[data-theme="light"] .sm-result-crest.type-player {
    background: rgba(133,77,255,.08);
    color: #7a4dcc;
}
[data-theme="light"] .sm-result-crest.type-league {
    background: rgba(0,0,0,.04);
    color: rgba(0,0,0,.4);
}

/* Result links */
[data-theme="light"] .sm-result-link {
    color: #111;
}
[data-theme="light"] .sm-result-link:hover {
    background: rgba(0,0,0,.03);
}
[data-theme="light"] .sm-result-clock {
    background: rgba(0,0,0,.04);
    color: rgba(0,0,0,.35);
}

/* Recent searches */
[data-theme="light"] .sm-recent-btn {
    color: #111;
}
[data-theme="light"] .sm-recent-remove,
[data-theme="light"] .sm-recent-x {
    color: rgba(0,0,0,.3);
}
[data-theme="light"] .sm-recent-remove:hover,
[data-theme="light"] .sm-recent-x:hover {
    color: var(--danger, #d33);
}

/* Section labels */
[data-theme="light"] .sm-section-label {
    color: rgba(0,0,0,.35);
    border-top-color: rgba(0,0,0,.06);
}
[data-theme="light"] .sm-suggestions-header {
    color: rgba(0,0,0,.35);
    border-top-color: rgba(0,0,0,.06);
}

/* Highlight */
[data-theme="light"] .sm-highlight {
    color: var(--accent-alt, #5f7a00);
}

/* See all results */
[data-theme="light"] .sm-result-seeall {
    border-top-color: rgba(0,0,0,.06);
}
[data-theme="light"] .sm-result-seeall a {
    color: rgba(0,0,0,.45);
}
[data-theme="light"] .sm-result-seeall a:hover {
    color: var(--accent-alt, #5f7a00);
}
[data-theme="light"] .sm-result-seeall strong {
    color: #111;
}

/* Post items */
[data-theme="light"] .sm-post-link {
    color: #111;
}
[data-theme="light"] .sm-post-link:hover {
    background: rgba(0,0,0,.03);
}
[data-theme="light"] .sm-post-title {
    color: #111;
}
[data-theme="light"] .sm-post-meta {
    color: rgba(0,0,0,.4);
}
[data-theme="light"] .sm-post-cat {
    color: var(--accent-alt, #5f7a00);
}
[data-theme="light"] .sm-post-thumb {
    background: rgba(0,0,0,.04);
}
[data-theme="light"] .sm-post-nothumb {
    color: rgba(0,0,0,.2);
}

/* Quick actions */
[data-theme="light"] .sm-actions {
    border-top-color: rgba(0,0,0,.06);
}
[data-theme="light"] .sm-actions-header {
    color: rgba(0,0,0,.4);
}
[data-theme="light"] .sm-action {
    color: #111;
}
[data-theme="light"] .sm-action:hover {
    background: rgba(0,0,0,.03);
}
[data-theme="light"] .sm-action-icon {
    background: rgba(0,0,0,.06);
}
[data-theme="light"] .sm-action-icon svg {
    stroke: #333;
}
[data-theme="light"] .sm-action-label {
    color: #111;
}
[data-theme="light"] .sm-action-key {
    background: rgba(0,0,0,.05);
    color: rgba(0,0,0,.35);
}

/* Spinner */
[data-theme="light"] .sm-spinner {
    border-color: rgba(0,0,0,.1);
    border-top-color: var(--accent-alt, #5f7a00);
}
