/* BayDisplay Plugin Styles */

/* Pool summary */
#baydisplay-pools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.bd-pool-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a1a2e !important;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85em;
}

.bd-pool-name  { font-weight: bold; color: #5bc0de !important; }

.bd-pool-state {
    padding: 1px 8px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.85em;
}
.bd-pool-online   { background: #1a3a1a !important; color: #4caf50 !important; }
.bd-pool-degraded { background: #3a2a00 !important; color: #ffcc00 !important; }

.bd-pool-scan  { color: #888 !important; font-size: 0.9em; }
.bd-scrub-ok   { color: #4caf50 !important; }
.bd-scrub-warn { color: #ffcc00 !important; }
.bd-scrub-old  { color: #ff7043 !important; }

/* Grid rows */
.bd-row-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

/* Slot card */
.bd-slot {
    border: 1px solid #444 !important;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.78em;
    line-height: 1.6;
    min-height: 150px;
    position: relative;
    background: #1e1e2e !important;
    transition: border-color 0.2s;
}

.bd-slot.bd-empty {
    background: #161622 !important;
    border-color: #2a2a2a !important;
    color: #444 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    min-height: 80px;
}

.bd-slot:hover {
    background: rgba(255,255,255,0.04) !important;
    transition: background 0.15s;
}

.bd-slot.bd-zfs-online   { border-color: #2a6e3f !important; }
.bd-slot.bd-zfs-degraded { border-color: #b08000 !important; background: #1e1a00 !important; }
.bd-slot.bd-zfs-faulted  { border-color: #8b1a1a !important; background: #1e0000 !important; }
.bd-slot.bd-zfs-offline  { border-color: #555 !important; }
.bd-slot.bd-zfs-none     { border-color: #444 !important; }
.bd-slot.bd-smart-failed { border-color: #ff4444 !important; }
.bd-slot.bd-smart-warn   { border-color: #cc8800 !important; }

.bd-slot-id {
    position: absolute;
    top: 5px; right: 8px;
    font-size: 0.85em;
    color: #555 !important;
    font-weight: bold;
}

.bd-dev    { font-weight: bold; color: #5bc0de !important; font-size: 0.95em; margin-bottom: 1px; }
.bd-model  { color: #ccc !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90%; }
.bd-serial { color: #555 !important; font-size: 0.82em; margin-bottom: 3px; font-family: monospace; }

.bd-info-row {
    display: flex;
    gap: 4px;
    color: #aaa !important;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.bd-info-row span { color: #ccc !important; }

/* Power-on hours age colors */
.bd-age-new { color: #4caf50 !important; }
.bd-age-mid { color: #ffcc00 !important; }
.bd-age-old { color: #ff7043 !important; }

/* SMART stats row - always visible */
.bd-stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.bd-stat { display: flex; gap: 3px; align-items: baseline; }

.bd-stat-label {
    font-size: 0.8em;
    color: #666 !important;
}

.bd-val-ok   { color: #4caf50 !important; font-weight: bold; }
.bd-val-warn { color: #ffaa00 !important; font-weight: bold; }
.bd-val-crit { color: #ff4444 !important; font-weight: bold; }

/* Status row */
.bd-status-row {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #aaa !important;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.bd-extras-row { margin-top: 3px; display: flex; gap: 4px; flex-wrap: wrap; }

.bd-pool-label { font-size: 0.8em; color: #5bc0de !important; margin-left: 4px; }

/* Badges */
.bd-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: bold;
}

.bd-badge-ok      { background: #1a3a1a !important; color: #4caf50 !important; }
.bd-badge-fail    { background: #3a1a1a !important; color: #f44336 !important; }
.bd-badge-warn    { background: #3a2a00 !important; color: #ffaa00 !important; }
.bd-badge-neutral { background: #222 !important;    color: #999 !important; }
.bd-badge-online  { background: #1a2a1a !important; color: #66bb6a !important; }
.bd-badge-degraded{ background: #2a2a00 !important; color: #ffcc00 !important; }
.bd-badge-faulted { background: #2a0000 !important; color: #ff5555 !important; }
.bd-badge-none    { background: #222 !important;    color: #888 !important; }
.bd-badge-unknown { background: #222 !important;    color: #888 !important; }
