/* Star Trek LCARS-inspired mobile-first design */

/* Base Styles */
:root {
    --lcars-orange: #FF9900;
    --lcars-purple: #CC99CC;
    --lcars-blue: #0066CC;
    --lcars-red: #CC0000;
    --lcars-pink: #FFCCCC;
    --lcars-brown: #CC9966;
    --lcars-yellow: #FFCC66;
    --lcars-light-blue: #99CCFF;
    --primary-radius: 1rem;
    --secondary-radius: 0.5rem;
}

body {
    font-family: 'Arial', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    /* Adjust card sizes for better mobile viewing */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Make buttons easier to tap */
    .btn {
        padding: 0.6rem 1rem;
        margin-bottom: 0.5rem;
    }
    
    /* Optimize form elements for touch */
    input, textarea, select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        margin-bottom: 1rem;
    }
    
    /* Full-width elements on mobile */
    .w-full-mobile {
        width: 100% !important;
    }
    
    /* Stack elements vertically on mobile */
    .flex-col-mobile {
        flex-direction: column !important;
    }
    
    /* Adjust spacing for mobile */
    .p-mobile-2 {
        padding: 0.5rem !important;
    }
    
    .m-mobile-2 {
        margin: 0.5rem !important;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
}

/* LCARS-inspired UI Components */
.lcars-header {
    background: linear-gradient(to right, var(--lcars-orange), var(--lcars-red));
    color: white;
    border-top-left-radius: var(--primary-radius);
    border-top-right-radius: var(--primary-radius);
    padding: 0.75rem 1rem;
    font-weight: bold;
    margin-bottom: 0;
}

.lcars-panel {
    border: 2px solid var(--lcars-blue);
    border-radius: var(--primary-radius);
    background-color: rgba(0, 10, 40, 0.95);
    overflow: hidden;
    margin-bottom: 1rem;
}

.lcars-button {
    background-color: var(--lcars-yellow);
    color: black;
    border: none;
    border-radius: var(--secondary-radius);
    padding: 0.6rem 1.2rem;
    font-weight: bold;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    min-height: 44px;
}

.lcars-button:active {
    transform: scale(0.97);
}

.lcars-button.primary {
    background-color: var(--lcars-blue);
    color: white;
}

.lcars-button.danger {
    background-color: var(--lcars-red);
    color: white;
}

/* Recording Animation */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.recording-indicator {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background-color: var(--lcars-red);
    margin-right: 0.5rem;
}

.recording .recording-indicator {
    animation: pulse 1.5s infinite;
}

/* Mobile bottom navigation */
.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--lcars-blue);
        padding: 0.5rem;
        z-index: 1000;
        justify-content: space-around;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
    
    .mobile-nav a {
        color: white;
        text-align: center;
        padding: 0.5rem;
        border-radius: 0.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 60px;
    }
    
    .mobile-nav a i {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-nav a span {
        font-size: 0.75rem;
    }
    
    .mobile-nav a.active {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    /* Add padding to main content to prevent overlap with mobile nav */
    .has-mobile-nav {
        padding-bottom: 5rem;
    }
}

/* Enhanced form elements */
.lcars-input {
    border: 2px solid var(--lcars-light-blue);
    border-radius: var(--secondary-radius);
    padding: 0.6rem;
    background-color: rgba(0, 0, 0, 0.1);
    color: white;
    transition: border-color 0.2s;
}

.lcars-input:focus {
    border-color: var(--lcars-yellow);
    outline: none;
}

/* Visual feedback for active elements */
.btn:active, a:active, .card:active {
    transform: scale(0.99);
}

/* Fix for iOS form elements */
input {
    border-radius: 0;
    -webkit-appearance: none;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 4rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--secondary-radius);
    z-index: 2000;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    max-width: 90%;
}

.toast.success {
    background-color: #2ecc71;
}

.toast.error {
    background-color: #e74c3c;
}

.toast i {
    margin-right: 0.5rem;
}

/* Add touch feedback to cards */
.card {
    transition: transform 0.1s, box-shadow 0.2s;
}

.card:active {
    transform: scale(0.99);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Improved accessibility for checkboxes */
input[type="checkbox"] {
    min-width: 24px;
    min-height: 24px;
    margin-right: 0.75rem;
}

/* Spacious content on mobile */
@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }
    
    h1, h2, h3 {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    p {
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    
    /* Add padding for iOS safe areas */
    .has-safe-area-bottom {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}

/* Markdown styling for outline */
.markdown {
    color: rgb(209, 213, 219);
    line-height: 1.6;
}

.markdown h1, .markdown h2, .markdown h3, .markdown h4 {
    color: rgb(243, 244, 246);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.markdown h1 {
    font-size: 1.5rem;
    color: #FFCC66; /* lcars-yellow */
}

.markdown h2 {
    font-size: 1.25rem;
    color: #99CCFF; /* lcars-light-blue */
}

.markdown h3 {
    font-size: 1.125rem;
    color: #99CCFF; /* lcars-light-blue */
}

.markdown ul, .markdown ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.markdown li {
    margin-bottom: 0.5rem;
}

.markdown ul li {
    list-style-type: disc;
}

.markdown ol li {
    list-style-type: decimal;
}

.markdown p {
    margin-bottom: 1rem;
}

.markdown strong {
    color: #99CCFF; /* lcars-light-blue */
    font-weight: 600;
}

.markdown em {
    font-style: italic;
}

/* Suggested Actions heading styling */
.markdown h3:last-of-type {
    color: #FF9900; /* lcars-orange */
    margin-top: 1.5rem;
}