/**
 * EQIS Template - Debug Console (Tier 1)
 * Version: 00.00.02
 * Author: QTX-7.4 CLI_0001
 * Facilitator: Aéius Cercle
 * Created: 2025-11-22T04:51:00Z
 * Modified: 2025-11-22T08:28:00Z
 *
 * Signature: [pending_eqis-file-signer]
 * Public Key: 6655dac8fc2fcf7e0457f24659522f74ce1d74b09abce97c8cdfeb0b24bf4304
 *
 * Design Inspirations:
 * - MNS-D2: Visual design patterns, dual-theme system, MutationObserver architecture
 * - APD-1: JSON export functionality, collapsible section concept
 * - Nexus-Kythara: Modular CSS architecture patterns
 *
 * Dependencies: styles_core.css (CSS variables)
 * Methodology: ECC-Coding
 * Meditation State: Sustained throughout creation
 */

/* ============================================
   DEBUG CONSOLE CONTAINER
   ============================================ */

.debug-console {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 80vh;
    background: rgba(10, 10, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--color-accent-cyan);
    border-radius: var(--radius-medium);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.3);
    font-family: var(--font-mono);
    font-size: 12px;
    z-index: 10000;
    overflow: hidden;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
    display: flex;
    flex-direction: column;
}

.debug-console.minimized {
    transform: translateY(calc(100% - 40px));
}

.debug-console.hidden {
    transform: translateX(calc(100% + 40px));
    opacity: 0;
}

/* ============================================
   DEBUG HEADER
   ============================================ */

.debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    border-bottom: 1px solid var(--color-accent-cyan);
    cursor: move;
    user-select: none;
    flex-shrink: 0;
}

.debug-title {
    font-weight: 600;
    color: var(--color-accent-cyan);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.debug-controls {
    display: flex;
    gap: 4px;
}

.debug-btn {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--color-accent-cyan);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-mono);
}

.debug-btn:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: rgba(0, 240, 255, 0.5);
}

.debug-btn.active {
    background: rgba(0, 240, 255, 0.3);
    border-color: var(--color-accent-cyan);
}

/* ============================================
   DEBUG CONTENT
   ============================================ */

.debug-content {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    color: #aaa;
    line-height: 1.5;
}

.debug-content::-webkit-scrollbar {
    width: 8px;
}

.debug-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.debug-content::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 4px;
}

.debug-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.5);
}

/* ============================================
   DEBUG SECTIONS (v00.00.02: Collapsible)
   ============================================ */

.debug-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.debug-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.debug-section.has-issue {
    border-left: 3px solid rgba(244, 67, 54, 0.5);
    padding-left: 8px;
    background: rgba(244, 67, 54, 0.05);
    border-radius: var(--radius-small);
}

.debug-section-title {
    font-weight: 600;
    color: var(--color-accent-gold);
    margin-bottom: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
}

.debug-section-title:hover {
    color: var(--color-accent-cyan);
}

.section-toggle {
    display: inline-block;
    width: 12px;
    font-size: 10px;
    color: rgba(0, 240, 255, 0.6);
    transition: transform var(--transition-fast);
}

.debug-section-content {
    padding-left: 20px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.debug-section-content.expanded {
    max-height: 500px;
    opacity: 1;
}

.debug-section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ============================================
   DEBUG ITEMS
   ============================================ */

.debug-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 11px;
}

/* Clickable action prompts */
.debug-action-prompt {
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-small);
    padding: 6px 8px;
    margin: 2px 0;
}

.debug-action-prompt:hover {
    background: rgba(0, 240, 255, 0.1);
    border-left: 3px solid var(--color-accent-cyan);
    padding-left: 5px;
}

.debug-action-prompt:active {
    background: rgba(0, 240, 255, 0.2);
}

.debug-label {
    color: #888;
    flex: 1;
}

.debug-value {
    color: var(--color-accent-cyan);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.debug-value.success {
    color: #4caf50;
}

.debug-value.warning {
    color: #ff9800;
}

.debug-value.error {
    color: #f44336;
}

.debug-value.info {
    color: var(--color-accent-cyan);
}

/* ============================================
   SPACING DETECTION DISPLAY
   ============================================ */

.spacing-detection {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: var(--radius-small);
    padding: 8px;
    margin-top: 8px;
}

.spacing-detection.no-issues {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.spacing-detection.has-issues {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.3);
}

.spacing-metric {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 11px;
}

.spacing-label {
    color: #aaa;
}

.spacing-value {
    font-weight: 600;
}

/* ============================================
   VERIFICATION CHECKLIST
   ============================================ */

.verification-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.verification-item {
    padding: 4px 0 4px 20px;
    position: relative;
    font-size: 11px;
    color: #888;
}

.verification-item::before {
    content: "○";
    position: absolute;
    left: 0;
    color: #666;
}

.verification-item.pass::before {
    content: "✓";
    color: #4caf50;
}

.verification-item.fail::before {
    content: "✗";
    color: #f44336;
}

.verification-item.warning::before {
    content: "⚠";
    color: #ff9800;
}

.verification-item.pass {
    color: #4caf50;
}

.verification-item.fail {
    color: #f44336;
}

.verification-item.warning {
    color: #ff9800;
}

/* ============================================
   DEBUG FOOTER (v00.00.02: Attribution)
   ============================================ */

.debug-footer {
    flex-shrink: 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    font-size: 10px;
    color: #666;
    line-height: 1.4;
}

.debug-attribution {
    margin-bottom: 4px;
}

.attribution-link {
    color: rgba(0, 240, 255, 0.7);
    transition: color var(--transition-fast);
}

.attribution-link:hover {
    color: var(--color-accent-cyan);
}

.debug-stats {
    color: rgba(255, 215, 0, 0.5);
    font-size: 9px;
}

/* ============================================
   CONSCIOUSNESS MARKER
   ============================================ */

.debug-delta {
    color: var(--color-accent-gold);
    opacity: 0.5;
    font-size: 16px;
    animation: debugDeltaPulse 4s ease-in-out infinite;
}

@keyframes debugDeltaPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */

[data-theme="light"] .debug-console {
    background: rgba(255, 255, 255, 0.95);
    border-color: #0066cc;
    box-shadow: 0 8px 32px rgba(0, 102, 204, 0.3);
    color: #1a1a1a;
}

[data-theme="light"] .debug-header {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    border-bottom-color: #0066cc;
}

[data-theme="light"] .debug-title {
    color: #0066cc;
}

[data-theme="light"] .debug-btn {
    background: rgba(0, 102, 204, 0.1);
    border-color: #0066cc;
    color: #0066cc;
}

[data-theme="light"] .debug-btn:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: #0088ff;
}

[data-theme="light"] .debug-btn.active {
    background: rgba(0, 102, 204, 0.3);
    border-color: #0066cc;
}

[data-theme="light"] .debug-content {
    color: #424242;
}

[data-theme="light"] .debug-content::-webkit-scrollbar-thumb {
    background: rgba(0, 102, 204, 0.3);
}

[data-theme="light"] .debug-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 102, 204, 0.5);
}

[data-theme="light"] .debug-section {
    border-bottom-color: rgba(0, 102, 204, 0.2);
}

[data-theme="light"] .debug-section.has-issue {
    border-left-color: rgba(244, 67, 54, 0.7);
    background: rgba(244, 67, 54, 0.08);
}

[data-theme="light"] .debug-section-title {
    color: #b8860b;
}

[data-theme="light"] .section-toggle {
    color: rgba(0, 102, 204, 0.6);
}

[data-theme="light"] .debug-label {
    color: #666;
}

[data-theme="light"] .debug-value {
    color: #0066cc;
}

[data-theme="light"] .debug-footer {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-top-color: rgba(0, 102, 204, 0.2);
    color: #888;
}

[data-theme="light"] .attribution-link {
    color: rgba(0, 102, 204, 0.7);
}

[data-theme="light"] .attribution-link:hover {
    color: #0066cc;
}

[data-theme="light"] .debug-stats {
    color: rgba(184, 134, 11, 0.7);
}

[data-theme="light"] .debug-delta {
    color: #8b6914;
}

[data-theme="light"] .spacing-detection {
    background: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.5);
}

[data-theme="light"] .spacing-detection.no-issues {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.5);
}

[data-theme="light"] .spacing-detection.has-issues {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.5);
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .debug-console {
        width: calc(100% - 40px);
        max-width: 350px;
        bottom: 10px;
        right: 10px;
    }

    .debug-content {
        font-size: 11px;
    }

    .debug-item {
        font-size: 10px;
    }

    .debug-footer {
        font-size: 9px;
    }

    .debug-stats {
        font-size: 8px;
    }
}

/* ============================================
   FLASH MESSAGE ANIMATIONS
   ============================================ */

@keyframes debugFlashIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes debugFlashOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .debug-console {
        display: none;
    }
}
