/* ============================================
   CODIGO MORSE - Industrial Design System
   ============================================ */

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Selection */
::selection {
    background-color: #ff5f1f;
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #faf8ff; }
::-webkit-scrollbar-thumb { background: #ab3600; }

/* Utility: hide scrollbar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* Mono font utility */
.mono { font-family: 'Space Grotesk', monospace; }

/* Display font utility */
.display-font { font-family: 'Space Grotesk', sans-serif; }

/* Body base */
body {
    font-family: 'Inter', sans-serif;
    background-color: #faf8ff;
    color: #131b2e;
}

/* Glass overlay */
.glass-overlay {
    background: rgba(250, 248, 255, 0.8);
    backdrop-filter: blur(8px);
}

/* Grid pattern background */
.bg-grid-pattern {
    background-image: radial-gradient(circle, #dae2fd 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Dot grid pattern for Morse output */
.bg-dot-grid {
    background-image: radial-gradient(#131b2e 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Monolith gradient for CTAs */
.monolith-gradient {
    background: linear-gradient(135deg, #ab3600 0%, #ff5f1f 100%);
}

/* Signal bar animation */
@keyframes pulse-bar {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.signal-bar {
    animation: pulse-bar 2s ease-in-out infinite;
}
.signal-bar:nth-child(2) { animation-delay: 0.2s; }
.signal-bar:nth-child(3) { animation-delay: 0.4s; }
.signal-bar:nth-child(4) { animation-delay: 0.6s; }
.signal-bar:nth-child(5) { animation-delay: 0.8s; }
.signal-bar:nth-child(6) { animation-delay: 1.0s; }
.signal-bar:nth-child(7) { animation-delay: 1.2s; }

/* Morse play animation - blinking dot */
@keyframes morse-blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
.morse-playing {
    animation: morse-blink 0.3s ease-in-out infinite;
}

/* Active nav link */
.nav-active {
    color: #ab3600;
    border-bottom: 2px solid #ab3600;
    padding-bottom: 4px;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #131b2e;
    color: white;
    padding: 1rem 2rem;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(250, 248, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.mobile-menu-overlay.active {
    transform: translateX(0);
}

/* Form validation states */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-bottom-color: #ba1a1a !important;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-bottom-color: #00a86b !important;
}

/* Blog filter active chip */
.filter-chip.active {
    background-color: #ab3600;
    color: white;
}

/* Audio visualization for Morse playback */
.audio-indicator {
    width: 3px;
    height: 12px;
    background: #ab3600;
    display: inline-block;
    margin: 0 1px;
    transition: height 0.1s ease;
}
.audio-indicator.active {
    animation: audio-bounce 0.4s ease infinite alternate;
}
@keyframes audio-bounce {
    from { height: 4px; }
    to { height: 20px; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    .desktop-only {
        display: none;
    }
}
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none;
    }
    .mobile-only {
        display: none;
    }
}

/* Layout: sidebar & workbench heights */
.cm-sidebar-height,
.cm-workbench-height {
    height: calc(100vh - 4rem);
}

/* Signal bar heights */
.signal-bar-1 { height: 30%; }
.signal-bar-2 { height: 45%; }
.signal-bar-3 { height: 60%; }
.signal-bar-4 { height: 75%; }
.signal-bar-5 { height: 90%; }
.signal-bar-6 { height: 100%; }
.signal-bar-7 { height: 80%; }

/* Blog filter chip active state (WP) */
.filter-chip-active {
    background-color: #ab3600 !important;
    color: #ffffff !important;
    border-color: #ab3600 !important;
}

/* Print styles */
@media print {
    header, footer, nav, .no-print {
        display: none !important;
    }
}

/* Status page pulse animation */
.status-pulse {
    animation: status-pulse 2s ease-in-out infinite;
}
@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* API docs code blocks */
.api-code-block {
    font-family: 'Space Grotesk', monospace;
}
.api-code-block pre code {
    font-family: 'Space Grotesk', monospace;
}
