/* ==========================================================================
   Indie Signal & Scout — Tool-Specific Styles (Layered on /styles.css)
   ========================================================================== */

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fullscreen-link {
    display: none;
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.fullscreen-link:hover {
    text-decoration: underline;
    color: #ffffff;
}

.hidden {
    display: none !important;
}

/* Guide panel layout (safe fallback alongside root styles.css) */
.guide-panel {
    margin-bottom: 1.75rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.guide-why p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: 0.65rem;
}

.guide-subhead {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
}

.walkthrough-steps {
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Seed Controls Deck */
.control-deck {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.presets-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.sample-presets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preset-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 700;
}

.search-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.control-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.search-mode-toggle {
    display: inline-flex;
    background: var(--surface-subtle);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 0.18rem;
    gap: 0.2rem;
}

.mode-pill {
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.mode-pill.active {
    background: var(--accent);
    color: #ffffff;
}

.search-box-wrapper {
    position: relative;
}

#seedInput {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    z-index: 60;
    max-height: 270px;
    overflow-y: auto;
}

.autocomplete-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--surface-subtle);
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.autocomplete-item:hover,
.autocomplete-item:focus-visible {
    background: var(--surface-subtle);
}

.autocomplete-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.autocomplete-status {
    padding: 0.65rem 1rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.seed-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2rem;
    align-items: center;
}

.seed-empty-hint {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.seed-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.seed-chip-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
}

.seed-chip button {
    background: none;
    border: none;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.seed-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.seed-limit-note {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.seed-btn-group {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.btn-primary:disabled,
.btn-ghost:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Banner */
.status-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    border-radius: 8px;
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-banner.is-error {
    background: var(--fail-bg);
    border-color: #fecaca;
    color: var(--fail-text);
}

/* Results Toolbar */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toolbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.lens-switcher {
    display: inline-flex;
    background: var(--surface-subtle);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.lens-btn {
    background: transparent;
    border: none;
    padding: 0.48rem 1rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 6px;
}

.lens-btn.active {
    background: var(--card-bg);
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.scout-mode .lens-btn.active {
    background: #312e81;
    color: #ffffff;
}

.toolbar-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.backing-pills {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    background: var(--surface-subtle);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.filter-pill.active {
    background: var(--text-primary);
    color: #ffffff;
    border-color: var(--text-primary);
}

.lens-summary-copy {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.toolbar-right-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.results-count {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-muted);
}

.score-explainer {
    font-size: 0.8rem;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.38rem 0.7rem;
    max-width: 360px;
}

.score-explainer summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent);
}

.score-explainer p {
    margin-top: 0.45rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Artist Cards Grid (Max 2 Columns) */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (max-width: 820px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
}

.artist-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.scout-mode .artist-card.breakout-highlight {
    border: 2px solid #16a34a;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
}

.artist-header {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.artist-thumb {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-subtle);
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.artist-thumb-fallback {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--surface-subtle);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.artist-thumb-fallback svg {
    width: 26px;
    height: 26px;
}

.artist-meta h3 {
    font-size: 1.15rem;
    line-height: 1.25;
    margin-bottom: 0.15rem;
}

.artist-subline {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.overlap-pill {
    background: #f1f5f9;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.08rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
}

.badges-row {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.24rem 0.65rem;
    border-radius: 999px;
}

.badge-major { background: var(--fail-bg); color: var(--fail-text); }
.badge-distributed { background: var(--warn-bg); color: var(--warn-text); }
.badge-indie { background: var(--pass-bg); color: var(--pass-text); }
.badge-self { background: #f1f5f9; color: #334155; border: 1px solid var(--border-strong); }
.badge-nicheness { background: #e0e7ff; color: #3730a3; }

/* Expandable Label Receipt */
.label-receipt-details {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.label-receipt-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

.receipt-list {
    margin-top: 0.5rem;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* A&R Scout Signal Box */
.scout-metrics {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-left: 4px solid #4338ca;
    border-radius: 6px;
    padding: 0.75rem 0.85rem;
    font-size: 0.83rem;
    color: #1e1b4b;
    display: none;
}

.scout-mode .scout-metrics {
    display: block;
}

.scout-metrics.is-breakout {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left-color: #16a34a;
    color: #14532d;
}

.scout-stats-row {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    font-size: 0.76rem;
    font-weight: 700;
    margin-top: 0.4rem;
    opacity: 0.9;
}

/* Tracks & Previews */
.track-list-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.track-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.track-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-subtle);
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    font-size: 0.84rem;
    gap: 0.75rem;
}

.track-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: break-word;
}

.track-actions {
    display: flex;
    gap: 0.28rem;
    flex-shrink: 0;
    align-items: center;
}

.audio-preview-btn {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    width: 25px;
    height: 25px;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.audio-preview-btn.is-playing {
    background: #dc2626;
}

.listen-link {
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    padding: 0.18rem 0.4rem;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--card-bg);
}

.listen-link:hover {
    background: var(--border);
}


.empty-filter-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Clean iframe embed mode (?embed=true) */
body.embed-mode .lab-nav,
body.embed-mode .tool-header,
body.embed-mode .framing-grid,
body.embed-mode .guide-panel,
body.embed-mode footer {
    display: none;
}

body.embed-mode .fullscreen-link {
    display: inline;
}

/* ==========================================================================
   Minimum Nicheness Score Filter Control
   ========================================================================== */

.niche-control-box {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.niche-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.niche-value-badge {
    font-size: 0.78rem;
    font-weight: 700;
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
}

.niche-slider-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#nicheRangeInput {
    flex: 1;
    accent-color: var(--accent);
    cursor: pointer;
}

.niche-axis-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.niche-presets-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.niche-preset-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 0.24rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 600;
}

.niche-preset-btn:hover {
    background: var(--border);
}

.niche-preset-btn.active {
    background: #3730a3;
    border-color: #3730a3;
    color: #ffffff;
}

.btn-primary.needs-research {
    background: #3730a3;
    box-shadow: 0 0 0 3px rgba(55, 48, 163, 0.2);
}

.results-counts-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.niche-scan-meta {
    font-size: 0.76rem;
    color: var(--accent);
    font-weight: 600;
}