/* Debug-specific styles — scoped to the Debug Log tab.
   Colours come from the hive tokens (css/hive-tokens.css). */

#debugStatusBadge {
    font-size: 0.75rem;
    animation: pulse 2s infinite;
}

#debugStatusBadge.bg-success {
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.debug-packet-critical {
    border-left: 4px solid var(--status-bad) !important;
    background-color: var(--danger-subtle);
}

.debug-packet-high {
    border-left: 4px solid var(--status-warn) !important;
    background-color: var(--warning-subtle);
}

.debug-packet-medium {
    border-left: 4px solid var(--text-secondary) !important;
}

/* Log entry highlighting */
#logs .log-critical {
    background-color: var(--danger-subtle);
    border-left: 3px solid var(--status-bad);
    padding-left: 5px;
}

#logs .log-warning {
    background-color: var(--warning-subtle);
    border-left: 3px solid var(--status-warn);
    padding-left: 5px;
}

#logs .log-motion {
    background-color: var(--danger-subtle);
    border-left: 3px solid var(--status-bad);
    padding-left: 5px;
    font-weight: bold;
}

/* Scrollbar styling for the log terminal */
#logs::-webkit-scrollbar {
    width: 8px;
}

#logs::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

#logs::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

/* Packet analysis panels (rendered by packet-analysis.js) */
.packet-analysis {
    background: var(--bg-surface-sunken);
    border-radius: 5px;
}

.tuya-details {
    background: var(--bg-surface-raised);
}

.dp-item {
    background: var(--bg-surface-sunken);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 3px;
}

.packet-analysis pre,
.tuya-details pre,
.dp-item pre {
    background: var(--bg-code);
    color: #9cdcfe;
    padding: 10px;
    border-radius: 3px;
}


@media (prefers-reduced-motion: reduce) {
    #debugStatusBadge,
    #debugStatusBadge.bg-success {
        animation: none;
    }
}
