/* =============================================================================
   📊 REGIME WATCHER — 4-state automaton panel CSS.
   Big state badge + phrase + advice + per-signal stress bars.
   ============================================================================= */

.panel-regime-watcher {
    background:
        radial-gradient(ellipse at top left, rgba(136,216,176,0.06), transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(255,123,157,0.05), transparent 60%),
        linear-gradient(180deg, rgba(28,20,55,0.94), rgba(10,8,24,0.97));
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 14px;
    padding: 22px 26px;
    margin-top: 18px;
    box-shadow:
        0 10px 32px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(212,175,55,0.10);
}

.rw-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    margin-top: 14px;
    margin-bottom: 16px;
    align-items: center;
}

/* ── BADGE (state + light) ─────────────────────────────────────────────── */

.rw-badge {
    /* per-state --rw-hue set inline */
    --rw-hue: #ddc88a;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 14px;
    background: linear-gradient(180deg,
                color-mix(in srgb, var(--rw-hue) 12%, transparent),
                rgba(10,8,24,0.55));
    border: 1px solid color-mix(in srgb, var(--rw-hue) 40%, rgba(212,175,55,0.18));
    border-radius: 12px;
    box-shadow:
        0 0 24px color-mix(in srgb, var(--rw-hue) 18%, transparent),
        inset 0 1px 0 color-mix(in srgb, var(--rw-hue) 18%, transparent);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.rw-badge-light {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
                color-mix(in srgb, var(--rw-hue) 85%, white) 0%,
                var(--rw-hue) 60%,
                color-mix(in srgb, var(--rw-hue) 40%, black) 100%);
    box-shadow:
        0 0 18px color-mix(in srgb, var(--rw-hue) 65%, transparent),
        inset 0 -4px 8px color-mix(in srgb, var(--rw-hue) 60%, black);
    animation: rwLightPulse 2.4s ease-in-out infinite;
}

@keyframes rwLightPulse {
    0%, 100% { transform: scale(1);    opacity: 0.92; }
    50%      { transform: scale(1.06); opacity: 1; }
}

.rw-badge-label {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--rw-hue);
    letter-spacing: 3px;
    text-shadow: 0 0 8px color-mix(in srgb, var(--rw-hue) 45%, transparent);
}

.rw-badge-stress {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #888aa0;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* ── META (phrase + advice + stress meter) ─────────────────────────────── */

.rw-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rw-phrase {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 18px;
    color: #ddc88a;
    font-style: italic;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.rw-advice {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 13px;
    color: #b095f5;
    line-height: 1.5;
    padding: 8px 12px;
    background: linear-gradient(90deg, rgba(176,149,245,0.08), transparent 80%);
    border-left: 2px solid rgba(176,149,245,0.40);
    border-radius: 0 6px 6px 0;
}

.rw-stress-meter {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.rw-stress-label {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #888aa0;
    font-style: italic;
    text-transform: lowercase;
    letter-spacing: 0.8px;
}

.rw-stress-bar {
    position: relative;
    height: 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(212,175,55,0.10);
}

.rw-stress-bar-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: linear-gradient(90deg, #88d8b0 0%, #ffd86b 50%, #ff7b9d 100%);
    border-radius: 5px;
    transition: width 0.7s cubic-bezier(0.25, 1.1, 0.4, 1);
}

.rw-stress-pct {
    text-align: right;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 13px;
    font-weight: 600;
    color: #ffd86b;
    font-variant-numeric: tabular-nums;
}

/* ── SIGNALS BREAKDOWN ─────────────────────────────────────────────────── */

.rw-signals {
    background: rgba(10,8,24,0.50);
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 10px;
    padding: 12px 16px;
}

.rw-signals-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888aa0;
    margin-bottom: 8px;
    font-style: italic;
}

.rw-signal-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rw-signal-item {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: 10px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11.5px;
}

.rw-signal-label {
    color: #ddc88a;
    font-style: italic;
    letter-spacing: 0.3px;
}

.rw-signal-bar {
    position: relative;
    height: 7px;
    background: rgba(255,255,255,0.04);
    border-radius: 3.5px;
    overflow: hidden;
}

.rw-signal-bar-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: linear-gradient(90deg,
                rgba(136,216,176,0.7) 0%,
                rgba(255,216,107,0.85) 60%,
                rgba(255,123,157,0.95) 100%);
    border-radius: 3.5px;
    transition: width 0.5s ease;
}

.rw-signal-pct {
    text-align: right;
    color: #ddc88a;
    font-variant-numeric: tabular-nums;
    font-size: 11px;
}

/* ── FOOTER ────────────────────────────────────────────────────────────── */

.rw-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(212,175,55,0.14);
}

.rw-refresh-btn {
    background: rgba(212,175,55,0.10);
    color: #ffd86b;
    border: 1px solid rgba(212,175,55,0.30);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.rw-refresh-btn:hover:not(:disabled) {
    background: rgba(212,175,55,0.18);
    transform: translateY(-1px);
}
.rw-refresh-btn:disabled { opacity: 0.55; cursor: progress; }

.rw-foot-note {
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 11px;
    color: #888aa0;
}

/* ── COCKPIT MINI-CHIP (small warning light on cockpit) ────────────────── */

.rw-cockpit-chip {
    --rw-hue: #88d8b0;

    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(180deg,
                color-mix(in srgb, var(--rw-hue) 12%, transparent),
                rgba(10,8,24,0.65));
    border: 1px solid color-mix(in srgb, var(--rw-hue) 35%, transparent);
    border-radius: 999px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: var(--rw-hue);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease;
    box-shadow: 0 0 10px color-mix(in srgb, var(--rw-hue) 18%, transparent);
}

.rw-cockpit-chip:hover {
    background: linear-gradient(180deg,
                color-mix(in srgb, var(--rw-hue) 22%, transparent),
                rgba(10,8,24,0.7));
    transform: translateY(-1px);
}

.rw-cockpit-chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
                color-mix(in srgb, var(--rw-hue) 85%, white) 0%,
                var(--rw-hue) 70%);
    box-shadow: 0 0 6px var(--rw-hue);
    animation: rwLightPulse 2.4s ease-in-out infinite;
}

/* ── RESPONSIVE ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .rw-row { grid-template-columns: 1fr; }
    .rw-badge { padding: 14px; }
    .rw-signal-item { grid-template-columns: 110px 1fr 50px; font-size: 11px; }
    .rw-stress-meter { grid-template-columns: 80px 1fr 50px; }
}
