/* RDM Autodiscover modal (KL-22, extracted to features/ in KL-132).
   Mirrors the Fixtures Add/Edit modal structure — same
   modal-overlay/dialog scaffolding, just a wider grid for the
   per-fixture review rows. */
@layer features {

/* RDM Autodiscover modal (KL-22). Mirrors the Fixtures Add/Edit modal
   structure — same modal-overlay/dialog scaffolding, just a wider grid
   for the per-fixture review rows. */
.fx-discover-status {
    padding: 0.6rem 0.8rem;
    margin: 0.5rem 0;
    background: var(--surface-2);
    border-left: 3px solid var(--accent);
    color: var(--text);
    font-size: 0.85rem;
}
.fx-discover-status.is-busy::after {
    content: ' …';
    opacity: 0.7;
    animation: discover-pulse 1.2s ease-in-out infinite;
}
@keyframes discover-pulse { 50% { opacity: 0.3; } }
.fx-discover-empty {
    padding: 0.8rem;
    background: var(--surface-2);
    border-radius: 0.4rem;
    margin-top: 0.5rem;
}
.fx-discover-empty p { margin: 0 0 0.5rem; font-size: 0.85rem; }
.fx-discover-empty p:last-child { margin-bottom: 0; }

/* KL-159: collapsible "Why didn't anything show up?" expander. Native
   <details>/<summary> — no JS, keyboard a11y for free. Sits inside
   the empty-state card; default-collapsed so the wall of explanation
   only appears when the user opts in. */
.fx-discover-troubleshoot {
    margin-top: 0.65rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}
.fx-discover-troubleshoot summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    list-style: none;            /* hide default disclosure triangle on Chromium */
    user-select: none;
}
.fx-discover-troubleshoot summary::-webkit-details-marker { display: none; }
.fx-discover-troubleshoot summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 0.4rem;
    transition: transform 0.15s;
}
.fx-discover-troubleshoot[open] summary::before {
    transform: rotate(90deg);
}
.fx-discover-troubleshoot summary:hover { filter: brightness(1.15); }
.fx-discover-troubleshoot p {
    margin-top: 0.55rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.fx-discover-troubleshoot p strong { color: var(--text); }
.fx-discover-troubleshoot a {
    color: var(--accent);
    text-decoration: underline;
}
.fx-discover-troubleshoot a:hover { filter: brightness(1.2); }
.fx-discover-results {
    margin-top: 0.6rem;
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
}
.fx-discover-row {
    display: grid;
    grid-template-columns: 50px 1fr 170px 1fr 130px;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}
.fx-discover-row:last-child { border-bottom: 0; }
.fx-discover-header {
    font-weight: 700;
    color: var(--text-dim);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--surface-2);
    position: sticky;
    top: 0;
    z-index: 1;
}
.fx-discover-row .fx-d-keep { text-align: center; }
.fx-discover-row .fx-d-name { font-size: 0.85rem; margin-bottom: 0.15rem; }
.fx-discover-row .fx-d-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
    word-break: break-all;
}
.fx-discover-row .fx-d-addr {
    font-family: monospace;
    color: var(--accent);
    font-size: 0.78rem;
}
.fx-discover-row select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 0.3rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.78rem;
    font-family: inherit;
    width: 100%;
}

/* KL-162: destructive-action banner above the results table.
   Borrowed from the existing modal-warning treatment but tighter
   margin so it sits flush above the row grid. */
.fx-discover-overlap-banner {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.45;
}

/* KL-162: row that's about to overwrite something gets an amber
   left-stripe (matches the toast "warn" treatment) so the destructive
   intent is scannable down the list edge. */
.fx-discover-row.fx-discover-row-overwrite {
    border-left: 3px solid var(--flash, #f5a623);
    padding-left: calc(0.8rem - 3px);
}

/* KL-162: per-row overwrite detail block. Sits inside the .fx-d-info
   column under the fixture name+meta, indented slightly so the toggle
   is clearly subordinate to the row's primary controls. */
.fx-d-overwrite {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--border);
    font-size: 0.72rem;
    color: var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}
.fx-d-overwrite-warning {
    color: var(--flash, #f5a623);
}
.fx-d-overwrite-warning strong {
    color: var(--text);
}
.fx-d-overwrite-skipped {
    color: var(--text-dim);
    font-style: italic;
}
.fx-d-overwrite-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    user-select: none;
    color: var(--text);
    font-size: 0.72rem;
}
.fx-d-overwrite-toggle input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

} /* end @layer features */
