/* Symbol search dialog (app/symbol-search.js) */

.ss-back {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 6vh 16px 16px;
    background: rgba(0, 0, 0, 0.5);
}

.ss-dialog {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: 84vh;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.ss-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 14px 20px;
    border-bottom: 1px solid var(--border);
}
.ss-icon { flex: none; width: 22px; height: 22px; color: var(--text-muted); }
.ss-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: none;
    color: var(--text);
    font: 500 20px/1.3 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
    text-transform: uppercase;
}
.ss-input::placeholder { color: var(--text-muted); text-transform: none; font-weight: 400; font-size: 16px; }
.ss-clear, .ss-close {
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
}
.ss-clear { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); }
.ss-clear svg { width: 12px; height: 12px; }
.ss-close { width: 32px; height: 32px; border-radius: 8px; }
.ss-close svg { width: 18px; height: 18px; }
.ss-clear:hover, .ss-close:hover { color: var(--text); }

/* Header, tabs and note keep their height; only the result list shrinks and scrolls. (A row that scrolls
   sideways may otherwise be squashed by the flex column when the list is long.) */
.ss-head, .ss-tabs, .ss-note, .ss-modes, .ss-current { flex: none; }

/* Compare mode: how to add the symbol, and the ones already on the chart */
.ss-modes { display: flex; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.ss-mode {
    padding: 12px 0 10px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-muted);
    font: 600 14px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
    cursor: pointer;
}
.ss-mode[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.ss-current { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.ss-current[hidden] { display: none; }
.ss-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.ss-chip-kind { color: var(--text-muted); font-size: 11px; font-weight: 600; }
.ss-chip-x { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: var(--text-muted); cursor: pointer; }
.ss-chip-x svg { width: 11px; height: 11px; }
.ss-chip-x:hover { background: var(--border); color: var(--text); }
.ss-tabs { display: flex; gap: 8px; padding: 12px 20px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.ss-tabs::-webkit-scrollbar { display: none; }
.ss-tab {
    flex: none;
    padding: 7px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font: 500 14px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
    cursor: pointer;
}
.ss-tab:hover { filter: brightness(1.15); }
.ss-tab[aria-selected="true"] { background: var(--text); color: var(--surface); }
.ss-tab.is-off { opacity: .55; }

.ss-list { flex: 1; min-height: 0; margin: 0; padding: 6px 0; overflow-y: auto; list-style: none; }
.ss-caption { padding: 8px 20px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.ss-empty { padding: 28px 20px; text-align: center; color: var(--text-muted); }

.ss-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    cursor: pointer;
}
.ss-row.is-selected { background: var(--surface-2); }

.ss-row .ql-badge { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.ss-badge {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font: 700 13px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
    letter-spacing: -.02em;
}
.ss-badge.is-long { font-size: 11px; }

.ss-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ss-symbol { font-size: 17px; font-weight: 600; color: var(--accent); }
.ss-symbol mark { background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ss-desc { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--text); }
.ss-desc-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-type {
    flex: none;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
}
.ss-row.is-selected .ss-type { background: var(--border); }
.ss-type.is-recent { color: var(--accent); }

.ss-exchange { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.ss-exchange-name { font-size: 13px; font-weight: 600; }
.ss-exchange-market { font-size: 11.5px; color: var(--text-muted); }

.ss-note:empty { display: none; }
.ss-note { padding: 10px 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }

@media (max-width: 600px) {
    .ss-back { padding: 0; }
    .ss-dialog { max-height: 100vh; height: 100%; border-radius: 0; }
    .ss-exchange-market { display: none; }
}
