/**
 * Debug Panel Styles
 * Styles for the debug information panel
 */

/* ==========================================================================
   Debug Panel Container
   ========================================================================== */
.debug-panel {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: transparent;
    color: #ffffff;
    border-radius: 8px;
    padding: 0;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 99999;
}

.debug-panel[open] {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.debug-panel summary {
    padding: 10px 15px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    background: transparent;
    border-radius: 8px 8px 0 0;
    outline: none;
    color: transparent;
    min-height: 30px;
    min-width: 30px;
}

.debug-panel summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.debug-panel[open] summary {
    border-radius: 8px 8px 0 0;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.debug-content {
    padding: 15px;
}

/* ==========================================================================
   Debug Sections
   ========================================================================== */
.debug-section-title {
    font-weight: 600;
    color: #60a5fa;
    margin-top: 15px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.debug-section-title:first-child {
    margin-top: 0;
}

/* ==========================================================================
   Debug Grid Layout
   ========================================================================== */
.debug-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.debug-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.debug-label {
    color: #9ca3af;
    font-size: 11px;
}

.debug-value {
    font-weight: 500;
    color: #ffffff;
}

.debug-value.active {
    color: #22c55e;
}

/* ==========================================================================
   Probability Bars
   ========================================================================== */
.prob-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.prob-label {
    width: 120px;
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
}

.prob-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.prob-fill {
    height: 100%;
    background: #6b7280;
    border-radius: 4px;
    transition: width 100ms ease, background 200ms ease;
}

.prob-fill.active {
    background: #22c55e;
}

.prob-value {
    width: 40px;
    text-align: right;
    font-size: 11px;
    font-weight: 500;
}

/* ==========================================================================
   Buffer Display
   ========================================================================== */
.debug-buffer {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 11px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    word-break: break-all;
}

/* ==========================================================================
   Class Colors
   ========================================================================== */
.debug-class-1 { color: #6b7280; }
.debug-class-2 { color: #3b82f6; }
.debug-class-3 { color: #22c55e; }
.debug-class-4 { color: #f59e0b; }

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */
.debug-panel::-webkit-scrollbar {
    width: 6px;
}

.debug-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.debug-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.debug-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .debug-panel {
        bottom: 5px;
        right: 5px;
        left: 5px;
        max-width: none;
        font-size: 11px;
    }
    
    .debug-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Debug Audio Test Buttons
   ========================================================================== */
.debug-audio-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.debug-btn {
    padding: 6px 10px;
    font-size: 11px;
    background: rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.debug-btn:hover {
    background: rgba(59, 130, 246, 0.5);
    border-color: rgba(59, 130, 246, 0.8);
}

.debug-btn:active {
    background: rgba(59, 130, 246, 0.7);
    transform: scale(0.95);
}

/* Simulation buttons - initially disabled */
.sim-btn {
    opacity: 0.5;
    pointer-events: none;
    background: rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.5);
}

.sim-btn:hover {
    background: rgba(168, 85, 247, 0.5);
    border-color: rgba(168, 85, 247, 0.8);
}

/* Simulation mode checkbox styling */
#debug-simulation-mode {
    margin-right: 8px;
    transform: scale(1.2);
}

#debug-simulation-mode:checked + .debug-label {
    color: #a855f7;
    font-weight: 600;
}

/* ==========================================================================
   Gesture Test Mode
   ========================================================================== */
#debug-gesture-test-mode {
    margin-right: 8px;
    transform: scale(1.2);
}

#debug-gesture-test-mode:checked + .debug-label {
    color: #f59e0b;
    font-weight: 600;
}

.gesture-test-result {
    margin-top: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.gesture-test-icon {
    font-size: 64px;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.gesture-test-icon.thumbs-up {
    color: #22c55e;
    animation: pulse-green 0.5s ease infinite;
}

.gesture-test-icon.thumbs-down {
    color: #ef4444;
    animation: pulse-red 0.5s ease infinite;
}

.gesture-test-label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

@keyframes pulse-green {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); text-shadow: 0 0 20px rgba(34, 197, 94, 0.8); }
}

@keyframes pulse-red {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); text-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}
