@import "tailwindcss";
@source "*.html";

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --surface: #1f1f21;
    --surface-high: #2a2a2c;
    --surface-highest: #353437;
    --surface-lowest: #0e0e10;
    --on-surface: #e4e2e4;
    --on-surface-variant: #c7c6ca;
    --outline: #919094;
    --outline-variant: #46464a;
    --tertiary: #00dbe9;
    --on-tertiary: #002022;
    --error: #ef4444;
    --background: #131315;
}

/* ============================================
   Material Icons
   ============================================ */

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

/* ============================================
   Glass Panel Component
   ============================================ */

.glass-panel {
    background: rgba(26, 26, 28, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--outline-variant);
}

/* ============================================
   Sonic Glow Effect
   ============================================ */

.sonic-glow {
    box-shadow: 0 0 16px rgba(0, 219, 233, 0.3);
}

/* ============================================
   Recessed Button
   ============================================ */

.recessed-button {
    background: linear-gradient(to bottom, #2A2A2C, #1A1A1C);
    border: 1px solid #444446;
}

.recessed-button:active {
    transform: scale(0.98);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Tab Navigation
   ============================================ */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LED Status Indicators
   ============================================ */

.led-segment {
    width: 4px;
    height: 12px;
    background: #454747;
    margin-right: 2px;
}

.led-segment.active {
    background: #00dbe9;
    box-shadow: 0 0 4px #00dbe9;
}

.led-segment.warning {
    background: #ffb4ab;
}

/* ============================================
   Chat Messages Container
   ============================================ */

.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #46464a #1f1f21;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #1f1f21;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #46464a;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #00dbe9;
}

/* ============================================
   Message Bubbles
   ============================================ */

.message {
    display: flex;
    max-width: 100%;
    animation: fadeIn 0.3s ease;
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.bot-message {
    align-self: flex-start;
}

.message-content {
    background: var(--surface-high);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--outline-variant);
    max-width: 70%;
}

.bot-message .message-content p {
    font-size: 0.9375rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #f6d84a;
    text-align: left;
}

.user-message .message-content p {
    font-size: 0.9375rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--on-surface);
    text-align: right;
}

.user-message .message-content {
    background: var(--surface-highest);
}

.message-content p.error {
    color: var(--error);
}

/* ============================================
   Thinking Indicator
   ============================================ */

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface-high);
    border-radius: 0.5rem;
    width: fit-content;
    margin-bottom: 1rem;
    border: 1px solid var(--outline-variant);
}

.thinking-indicator span {
    color: var(--tertiary);
    font-style: italic;
}

/* ============================================
   Send Button
   ============================================ */

.send-button {
    background: var(--tertiary);
    color: var(--on-tertiary);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.send-button:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow: 0 0 12px rgba(0, 219, 233, 0.4);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Chat Input
   ============================================ */

#chat-input {
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: 0.125rem;
    padding: 0.75rem 1rem;
    color: var(--on-surface);
    font-family: inherit;
    font-size: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

#chat-input:focus {
    border-color: var(--tertiary);
}

#chat-input::placeholder {
    color: var(--on-surface-variant);
}

#chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Prose Styles (Documentation)
   ============================================ */

.prose-invert {
    color: var(--on-surface-variant);
}

.prose-invert h2 {
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--on-surface);
    margin-bottom: 1.5rem;
}

.prose-invert p {
    font-size: 18px;
    line-height: 1.625;
    margin-bottom: 2rem;
}

/* ============================================
   Utility Classes
   ============================================ */

.opacity-60 {
    opacity: 0.6;
}

.text-2xl {
    font-size: 1.5rem;
}
