/**
 * WS40 Database Info block — [ws40_db_info]
 *
 * Minimal, theme-proof styling. Colours follow CSS custom properties set by
 * ws40-armour.css so the block adapts to light/dark Consolle themes.
 */

.ws40-dbinfo-widget {
    max-width: 440px;
}

.ws40-dbinfo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05em;
    color: var(--ws40-text-primary, #1e293b);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--ws40-border, #e2e8f0);
}

.ws40-dbinfo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.ws40-dbinfo-table tr + tr td {
    border-top: 1px solid var(--ws40-border-light, #f8fafc);
}

.ws40-dbinfo-label {
    padding: 7px 0;
    color: var(--ws40-text-muted, #64748b);
}

.ws40-dbinfo-value {
    text-align: right;
    padding: 7px 0;
    font-weight: 600;
    color: var(--ws40-text-primary, #0f172a);
}

/* ── Sensors accordion ─────────────────────────────────────── */

.ws40-dbinfo-sensors {
    margin-top: 14px;
}

.ws40-dbinfo-sensors summary {
    cursor: pointer;
    font-size: 0.88em;
    font-weight: 600;
    color: var(--ws40-accent, #0d9488);
    user-select: none;
    list-style: none;
}
.ws40-dbinfo-sensors summary::-webkit-details-marker { display: none; }
.ws40-dbinfo-sensors summary::before {
    content: '▶ ';
    font-size: 0.75em;
    transition: transform 0.2s;
    display: inline-block;
}
.ws40-dbinfo-sensors[open] summary::before {
    transform: rotate(90deg);
}

.ws40-dbinfo-sensors-body {
    margin-top: 12px;
}

.ws40-dbinfo-group-label {
    font-size: 0.78em;
    color: var(--ws40-text-subtle, #94a3b8);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ws40-dbinfo-group-label--opt {
    margin-top: 12px;
}

.ws40-dbinfo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ws40-dbinfo-tag {
    background: var(--ws40-tag-bg, #f1f5f9);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.8em;
    color: var(--ws40-tag-text, #334155);
}

.ws40-dbinfo-tag--opt {
    background: var(--ws40-tag-opt-bg, #ccfbf1);
    color: var(--ws40-tag-opt-text, #0f766e);
    font-weight: 500;
}

@media (max-width: 480px) {
    .ws40-dbinfo-widget { max-width: 100%; }
}
