/*
 * LumiCode — Admin Shared Styles v1.5.6
 * Loaded on all LumiCode admin pages.
 * Scoped to #lc-wrap to avoid WP conflicts.
 */

/* ── Outer wrap ──────────────────────────────────────────── */
.lc-outer-wrap {
    margin: 30px 30px 30px 0 !important;
    max-width: 1200px !important;
    padding: 0 !important;
}

/* ── App shell ───────────────────────────────────────────── */
#lc-wrap {
    background: #0d0f18;
    color: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 4px 16px rgba(0,0,0,0.3),
        0 20px 60px rgba(0,0,0,0.4);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

#lc-wrap *, #lc-wrap *::before, #lc-wrap *::after { box-sizing: border-box; }

/* Reset WP heading injection */
#lc-wrap h1, #lc-wrap h2, #lc-wrap h3, #lc-wrap h4 { all: unset; display: block; }
#lc-wrap p   { margin: 0; padding: 0; }
#lc-wrap ul  { margin: 0; padding: 0; list-style: none; }
#lc-wrap a   { text-decoration: none; }

/* ── Topbar ──────────────────────────────────────────────── */
.lc-topbar {
    display: flex; align-items: center;
    height: 54px; padding: 0 20px;
    background: rgba(0,0,0,0.32);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    gap: 4px;
    transition: background 0.2s, border-color 0.2s;
}

.lc-logo {
    display: inline-flex; align-items: center; gap: 9px;
    color: #e2e8f0; font-size: 15px; font-weight: 700;
    letter-spacing: -0.01em; margin-right: 20px;
    flex-shrink: 0; text-decoration: none;
    transition: color 0.2s;
}

.lc-logo-icon {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(167,139,250,0.4);
    color: #09090f;
}

.lc-topbar-nav { display: flex; gap: 2px; flex: 1; }

.lc-nav {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 14px; height: 32px; border-radius: 7px;
    font-size: 13px; font-weight: 500;
    color: rgba(148,163,184,0.45);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border: none; background: none; cursor: pointer; font-family: inherit;
}
.lc-nav:hover           { background: rgba(255,255,255,0.06); color: #e2e8f0; }
.lc-nav.is-active       { background: rgba(167,139,250,0.14); color: #a78bfa; }
.lc-nav.is-active:hover { background: rgba(167,139,250,0.20); }

.lc-topbar-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.lc-version-badge {
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
    background: rgba(167,139,250,0.12);
    color: #a78bfa;
    border: 1px solid rgba(167,139,250,0.20);
    font-family: ui-monospace, monospace; letter-spacing: 0.04em;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lc-ext-link {
    font-size: 11px; color: rgba(148,163,184,0.38);
    text-decoration: none; transition: color 0.15s;
}
.lc-ext-link:hover { color: rgba(148,163,184,0.72); }

/* ── Page body ───────────────────────────────────────────── */
.lc-body { padding: 24px 24px 40px; transition: background 0.2s; }

/* ── Cards ───────────────────────────────────────────────── */
.lc-card {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 20px; margin-bottom: 16px;
    transition: background 0.2s, border-color 0.2s;
}
.lc-card:last-child { margin-bottom: 0; }

.lc-card-hd {
    display: flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: rgba(148,163,184,0.42);
    padding-bottom: 14px; margin-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.2s, border-color 0.2s;
}

/* ── Phosphor Icons — standalone, decoupled from parent font-size ── */
/*
 * i.ph icons have their OWN explicit font-size.
 * They do NOT inherit from .lc-nav, .lc-card-hd, .lc-btn etc.
 * To resize an icon in a specific context, target i.ph directly in that context.
 */
i.ph {
    font-size: 16px !important;   /* standalone default — overrides inheritance */
    line-height: 1 !important;
    flex-shrink: 0;
    vertical-align: middle;
    font-family: "Phosphor" !important;
    display: inline-block;
}
/* Context-specific icon sizes — all explicit, none inherited */
.lc-logo-icon i.ph                  { font-size: 16px !important; }
.lc-card-hd i.ph                    { font-size: 15px !important; }
.lc-btn i.ph                        { font-size: 15px !important; }
.lc-btn-sm i.ph                     { font-size: 14px !important; }
.lc-nav i.ph                        { font-size: 15px !important; }
.lc-info-icon i.ph                  { font-size: 22px !important; }
.lc-placeholder-overlay-icon i.ph   { font-size: 28px !important; }
.lc-dismiss-btn i.ph                { font-size: 14px !important; }

/* ── Form elements ───────────────────────────────────────── */
.lc-field { margin-bottom: 18px; }
.lc-field:last-child { margin-bottom: 0; }

.lc-lbl {
    display: block; font-size: 12px; font-weight: 600;
    color: rgba(148,163,184,0.65); margin-bottom: 7px;
    transition: color 0.2s;
}

#lc-wrap input[type="text"],
#lc-wrap input[type="number"] {
    display: block; width: 100%; padding: 9px 12px;
    background: rgba(0,0,0,0.38);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px; color: #e2e8f0;
    font-size: 13px; font-family: inherit; outline: none;
    box-shadow: none; -webkit-appearance: none; appearance: none;
    line-height: 1.4; height: auto;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
#lc-wrap input[type="number"] { width: 90px; }

#lc-wrap input[type="text"]:focus,
#lc-wrap input[type="number"]:focus {
    border-color: rgba(167,139,250,0.55);
    box-shadow: 0 0 0 3px rgba(167,139,250,0.09);
    background: rgba(167,139,250,0.04);
}

#lc-wrap select {
    display: block; width: 100%; padding: 9px 32px 9px 12px;
    background: rgba(0,0,0,0.38);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px; color: #e2e8f0;
    font-size: 13px; font-family: inherit; outline: none;
    box-shadow: none; -webkit-appearance: none; appearance: none;
    cursor: pointer; line-height: 1.4; height: auto;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='rgba(148,163,184,0.4)' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
#lc-wrap select:focus {
    border-color: rgba(167,139,250,0.55);
    box-shadow: 0 0 0 3px rgba(167,139,250,0.09);
}
#lc-wrap select option { background: #1a1d2e; color: #e2e8f0; }

.lc-unit  { font-size: 12px; color: rgba(148,163,184,0.35); transition: color 0.2s; }
.lc-hint  { font-size: 11px; color: rgba(148,163,184,0.36); margin-top: 5px; line-height: 1.5; transition: color 0.2s; }
.lc-hint code { font-family: ui-monospace, monospace; color: rgba(167,139,250,0.75); font-size: 10.5px; }

/* ── Toggle switches ─────────────────────────────────────── */
.lc-toggle {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border-radius: 8px; cursor: pointer; gap: 14px;
    -webkit-user-select: none; user-select: none;
    border: none; background: none; width: 100%; text-align: left;
    transition: background 0.15s;
}
.lc-toggle:hover { background: rgba(255,255,255,0.04); }

.lc-toggle input[type="checkbox"] {
    position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}

.lc-toggle-info { flex: 1; }
.lc-toggle-name { display: block; font-size: 13px; font-weight: 600; color: #e2e8f0; margin-bottom: 2px; transition: color 0.2s; }
.lc-toggle-desc { display: block; font-size: 11px; color: rgba(148,163,184,0.40); line-height: 1.4; transition: color 0.2s; }

.lc-switch {
    width: 38px; height: 22px; border-radius: 11px;
    background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.07);
    position: relative; flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s; display: block;
}
.lc-thumb {
    display: block; position: absolute; top: 3px; left: 3px;
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(255,255,255,0.28);
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    transition: transform 0.18s cubic-bezier(.4,0,.2,1), background 0.18s;
}
.lc-toggle.is-on .lc-switch { background: rgba(167,139,250,0.65); border-color: rgba(167,139,250,0.35); }
.lc-toggle.is-on .lc-thumb  { transform: translateX(16px); background: #ffffff; }

/* ── Buttons ─────────────────────────────────────────────── */
.lc-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 20px; border-radius: 8px; border: none;
    font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    line-height: 1;
    transition: opacity 0.15s, transform 0.1s, background 0.15s, color 0.15s, border-color 0.15s;
}
.lc-btn:active { transform: scale(0.97); }
.lc-btn:focus  { outline: none; box-shadow: none; }
.lc-btn:disabled { opacity: 0.35; cursor: default; pointer-events: none; }

.lc-btn-primary {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    color: #09090f;
    box-shadow: 0 3px 10px rgba(167,139,250,0.25);
}
.lc-btn-primary:hover { opacity: 0.88; color: #09090f; }

.lc-btn-ghost {
    background: rgba(255,255,255,0.07);
    color: rgba(226,232,240,0.65);
    border: 1px solid rgba(255,255,255,0.10);
}
.lc-btn-ghost:hover { background: rgba(255,255,255,0.12); color: #e2e8f0; }

.lc-btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 7px; }

/* ═══════════════════════════════════════════════════════════
   ADMIN LIGHT MODE
   Applied when #lc-wrap has class .lc-theme-light
   All rules use #lc-wrap.lc-theme-light prefix for specificity.
   ═══════════════════════════════════════════════════════════ */

#lc-wrap.lc-theme-light {
    background: #f4f5f9 !important;
    color: #1e1e2e !important;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.10),
        0 4px 16px rgba(0,0,0,0.08),
        0 20px 60px rgba(0,0,0,0.06);
}

/* Topbar */
#lc-wrap.lc-theme-light .lc-topbar {
    background: #ffffff !important;
    border-bottom-color: rgba(0,0,0,0.08) !important;
}
#lc-wrap.lc-theme-light .lc-logo { color: #1e1e2e !important; }
#lc-wrap.lc-theme-light .lc-nav { color: rgba(30,30,46,0.45) !important; }
#lc-wrap.lc-theme-light .lc-nav:hover { background: rgba(0,0,0,0.05) !important; color: #1e1e2e !important; }
#lc-wrap.lc-theme-light .lc-nav.is-active { background: rgba(167,139,250,0.12) !important; color: #7c3aed !important; }
#lc-wrap.lc-theme-light .lc-version-badge { background: rgba(167,139,250,0.10) !important; border-color: rgba(167,139,250,0.22) !important; }
#lc-wrap.lc-theme-light .lc-ext-link { color: rgba(30,30,46,0.35) !important; }

/* Body + Cards */
#lc-wrap.lc-theme-light .lc-body { background: #f4f5f9 !important; }
#lc-wrap.lc-theme-light .lc-card { background: #ffffff !important; border-color: rgba(0,0,0,0.07) !important; }
#lc-wrap.lc-theme-light .lc-card-hd { color: rgba(30,30,46,0.4) !important; border-bottom-color: rgba(0,0,0,0.06) !important; }

/* Labels, hints, units */
#lc-wrap.lc-theme-light .lc-lbl  { color: rgba(30,30,46,0.55) !important; }
#lc-wrap.lc-theme-light .lc-hint { color: rgba(30,30,46,0.38) !important; }
#lc-wrap.lc-theme-light .lc-unit { color: rgba(30,30,46,0.32) !important; }

/* Form inputs + selects */
#lc-wrap.lc-theme-light input[type="text"],
#lc-wrap.lc-theme-light input[type="number"],
#lc-wrap.lc-theme-light select {
    background: #f0f1f7 !important;
    border-color: rgba(0,0,0,0.12) !important;
    color: #1e1e2e !important;
}
#lc-wrap.lc-theme-light input[type="text"]:focus,
#lc-wrap.lc-theme-light input[type="number"]:focus,
#lc-wrap.lc-theme-light select:focus {
    border-color: rgba(124,58,237,0.45) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.08) !important;
    background: rgba(124,58,237,0.03) !important;
}

/* Toggles */
#lc-wrap.lc-theme-light .lc-toggle-name { color: #1e1e2e !important; }
#lc-wrap.lc-theme-light .lc-toggle-desc { color: rgba(30,30,46,0.4) !important; }
#lc-wrap.lc-theme-light .lc-toggle:hover { background: rgba(0,0,0,0.04) !important; }
#lc-wrap.lc-theme-light .lc-switch { background: rgba(0,0,0,0.10) !important; border-color: rgba(0,0,0,0.07) !important; }
#lc-wrap.lc-theme-light .lc-thumb { background: rgba(0,0,0,0.25) !important; }
#lc-wrap.lc-theme-light .lc-toggle.is-on .lc-switch { background: rgba(124,58,237,0.6) !important; border-color: rgba(124,58,237,0.3) !important; }
#lc-wrap.lc-theme-light .lc-toggle.is-on .lc-thumb  { background: #fff !important; }

/* Buttons */
#lc-wrap.lc-theme-light .lc-btn-ghost {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.10) !important;
    color: rgba(30,30,46,0.55) !important;
}
#lc-wrap.lc-theme-light .lc-btn-ghost:hover {
    background: rgba(0,0,0,0.09) !important;
    color: #1e1e2e !important;
}

/* ── Settings page light overrides ──────────────────────── */
#lc-wrap.lc-theme-light .lc-save-row { border-top-color: rgba(0,0,0,0.07) !important; }
#lc-wrap.lc-theme-light .lc-ref-pre {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.08) !important;
    color: rgba(30,30,46,0.6) !important;
}
#lc-wrap.lc-theme-light .lc-ref-table td { color: rgba(30,30,46,0.55) !important; }
#lc-wrap.lc-theme-light .lc-ref-table tr { border-bottom-color: rgba(0,0,0,0.06) !important; }

/* ── Scanner page light overrides ───────────────────────── */
#lc-wrap.lc-theme-light .lc-info-card {
    background: rgba(0,0,0,0.03) !important;
    border-color: rgba(0,0,0,0.07) !important;
}
#lc-wrap.lc-theme-light .lc-info-card strong { color: #1e1e2e !important; }
#lc-wrap.lc-theme-light .lc-info-card span   { color: rgba(30,30,46,0.45) !important; }

#lc-wrap.lc-theme-light .lc-row {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.07) !important;
}
#lc-wrap.lc-theme-light .lc-row-title { color: #1e1e2e !important; }
#lc-wrap.lc-theme-light .lc-row-hd { border-bottom-color: rgba(0,0,0,0.05) !important; }
#lc-wrap.lc-theme-light .lc-row-view { color: rgba(30,30,46,0.45) !important; border-color: rgba(0,0,0,0.12) !important; }
#lc-wrap.lc-theme-light .lc-row-view:hover { color: #7c3aed !important; border-color: rgba(124,58,237,0.3) !important; }
#lc-wrap.lc-theme-light .lc-scan-status { color: rgba(30,30,46,0.45) !important; }
#lc-wrap.lc-theme-light .lc-snippet-pre {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.08) !important;
    color: rgba(30,30,46,0.65) !important;
}
#lc-wrap.lc-theme-light .lc-snippet-label { color: rgba(30,30,46,0.28) !important; }
#lc-wrap.lc-theme-light .lc-summary-bar {
    background: rgba(0,0,0,0.04) !important;
    border-color: rgba(0,0,0,0.08) !important;
}
#lc-wrap.lc-theme-light .lc-chip {
    background: rgba(0,0,0,0.06) !important;
    border-color: rgba(0,0,0,0.10) !important;
    color: rgba(30,30,46,0.55) !important;
}
#lc-wrap.lc-theme-light .lc-chip.is-active {
    background: rgba(124,58,237,0.12) !important;
    border-color: rgba(124,58,237,0.25) !important;
    color: #7c3aed !important;
}
#lc-wrap.lc-theme-light .lc-toolbar-sep { background: rgba(0,0,0,0.10) !important; }
#lc-wrap.lc-theme-light .lc-dismiss-btn { color: rgba(30,30,46,0.35) !important; }
#lc-wrap.lc-theme-light .lc-dismiss-btn:hover { color: rgba(30,30,46,0.7) !important; }
#lc-wrap.lc-theme-light .lc-apply-btn { /* primary stays same */ }

/* Placeholder/ghost rows */
#lc-wrap.lc-theme-light .lc-results-placeholder { /* no change needed */ }
#lc-wrap.lc-theme-light .lc-placeholder-row-ghost {
    background: rgba(0,0,0,0.03) !important;
    border-color: rgba(0,0,0,0.07) !important;
}
#lc-wrap.lc-theme-light .lc-placeholder-ghost-bar {
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.04) 0%,
        rgba(0,0,0,0.09) 50%,
        rgba(0,0,0,0.04) 100%
    ) !important;
}
#lc-wrap.lc-theme-light .lc-placeholder-overlay {
    background: rgba(240,241,249,0.88) !important;
    border-color: rgba(167,139,250,0.2) !important;
}
#lc-wrap.lc-theme-light .lc-placeholder-overlay-title { color: rgba(30,30,46,0.7) !important; }
#lc-wrap.lc-theme-light .lc-placeholder-overlay-sub   { color: rgba(30,30,46,0.45) !important; }

/* ── Preview box in settings — light overrides ───────────── */
#lc-wrap.lc-theme-light .lc-pw { border-color: rgba(0,0,0,0.12) !important; box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important; }
#lc-wrap.lc-theme-light .lc-pw-titlebar { background: #f0f1f7 !important; border-bottom-color: rgba(0,0,0,0.09) !important; }
#lc-wrap.lc-theme-light .lc-pw-statusbar { background: #f0f1f7 !important; border-top-color: rgba(0,0,0,0.09) !important; }
#lc-wrap.lc-theme-light .lc-pw-code pre { background: #f7f7fb !important; }
#lc-wrap.lc-theme-light .lc-pw-filename { color: rgba(0,0,0,0.42) !important; }
#lc-wrap.lc-theme-light .lc-pw-status-left span { color: rgba(0,0,0,0.38) !important; }
#lc-wrap.lc-theme-light .lc-pw-status-right { color: #7c3aed !important; }
#lc-wrap.lc-theme-light .lc-pw-line-numbers { background: #eeeef6 !important; border-right-color: rgba(0,0,0,0.09) !important; color: rgba(0,0,0,0.28) !important; }
#lc-wrap.lc-theme-light .lc-pw-copybtn { border-color: rgba(0,0,0,0.28) !important; color: rgba(0,0,0,0.48) !important; }
#lc-wrap.lc-theme-light .lc-expand-overlay {
    background: linear-gradient(to bottom, rgba(247,247,251,0) 0%, rgba(247,247,251,0.9) 60%, rgba(247,247,251,1) 100%) !important;
}
#lc-wrap.lc-theme-light .lc-expand-btn { background: rgba(255,255,255,0.9) !important; border-color: rgba(0,0,0,0.13) !important; color: #1e1e2e !important; }
#lc-wrap.lc-theme-light .lc-collapse-bar { background: #eeeef8 !important; border-top-color: rgba(0,0,0,0.09) !important; }
#lc-wrap.lc-theme-light .lc-collapse-btn { color: rgba(0,0,0,0.42) !important; }
