/*
 * fire-stopping-settings.css
 * Fire Stopping — Settings → Workflow editor (#fs-options, "Capture vocabularies").
 *
 * A true 1:1 fork of the fire-door checklist modal's `.component-*` card styling
 * (settings-shell.css), renamed to `fss-opt-*` and scoped to `#fs-options` so the
 * FS module owns its own CSS instead of depending on the fire-door component layer.
 * Values are copied verbatim from the fire-door rules for a pixel-identical look;
 * bare `var()`s carry fallbacks. Loaded only on the Settings page in FS mode
 * (app/Views/layout/app.php, $headPage === 'settings' && $fsMode).
 */

/* ----- Card (fork of .component-settings-item) ----- */
#fs-options .fss-opt-item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), #fff);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

#fs-options .fss-opt-item__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

#fs-options .fss-opt-item__eyebrow {
    margin: 0 0 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #94a3b8;
}

#fs-options .fss-opt-item__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Count chip (fork of .component-flag neutral pill) */
#fs-options .fss-opt-count-chip {
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
    white-space: nowrap;
}

#fs-options .fss-opt-item__insights {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Insight pills (fork of .component-template-pills) */
#fs-options .fss-opt-pills {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

#fs-options .fss-opt-pills li {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    background: rgba(248, 250, 252, 0.9);
}

#fs-options .fss-opt-pills__more {
    border-style: dashed;
    color: #475569;
}

#fs-options .fss-opt-pills-empty {
    margin: 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

#fs-options .fss-opt-hint {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Expandable body (fork of .component-reasons) */
#fs-options .fss-opt-reasons {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    background: #fff;
}

#fs-options .fss-opt-reasons summary {
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

#fs-options .fss-opt-reasons summary::-webkit-details-marker {
    display: none;
}

#fs-options .fss-opt-reasons summary > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#fs-options .fss-opt-reasons__meta {
    font-size: 0.85rem;
    color: #6b7280;
}

#fs-options .fss-opt-reasons[open] summary {
    border-bottom: 1px solid var(--border, #e5e7eb);
}

#fs-options .fss-opt-reasons__body {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Item rows (fork of .component-reasons-list / -row) */
#fs-options .fss-opt-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#fs-options .fss-opt-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#fs-options .fss-opt-row input[type="text"] {
    flex: 1;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    font-size: 0.9rem;
}

/* Search no-match state (fork of .component-empty) */
#fs-options .fss-opt-empty {
    margin: 0;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* ----- Dark mode (fork of the html[data-theme="dark"] .component-* block) ----- */
html[data-theme="dark"] #fs-options .fss-opt-item {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] #fs-options .fss-opt-count-chip {
    background: rgba(148, 163, 184, 0.14);
    color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] #fs-options .fss-opt-pills li {
    background: rgba(2, 6, 23, 0.55);
    border-color: rgba(148, 163, 184, 0.22);
    color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] #fs-options .fss-opt-pills__more {
    color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] #fs-options .fss-opt-reasons {
    background: rgba(2, 6, 23, 0.62);
    border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] #fs-options .fss-opt-reasons[open] summary {
    border-bottom-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] #fs-options .fss-opt-reasons__meta,
html[data-theme="dark"] #fs-options .fss-opt-hint {
    color: rgba(148, 163, 184, 0.92);
}

html[data-theme="dark"] #fs-options .fss-opt-row input[type="text"] {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.28);
    color: var(--text, #e2e8f0);
}

/* ----- Responsive (project breakpoint 900px; fork of the @768 component block) ----- */
@media (max-width: 900px) {
    #fs-options .fss-opt-item__header {
        flex-direction: column;
    }
    #fs-options .fss-opt-item__actions {
        width: 100%;
        justify-content: space-between;
    }
    #fs-options .fss-opt-item__insights {
        flex-direction: column;
        align-items: flex-start;
    }
}
