/* style.css - 100% Responsive Design */

/* Base responsive styles */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow: hidden;
    touch-action: manipulation;
}

/* Responsive text scaling */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
    }
    
    .text-responsive-lg {
        font-size: 1.75rem !important;
        line-height: 1.4 !important;
    }
    
    .p-responsive {
        padding: 1rem !important;
    }
    
    .gap-responsive {
        gap: 0.75rem !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .text-responsive {
        font-size: 1.75rem !important;
    }
    
    .text-responsive-lg {
        font-size: 2rem !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .text-responsive {
        font-size: 2rem !important;
    }
    
    .text-responsive-lg {
        font-size: 2.5rem !important;
    }
}

/* Touch-friendly interactions */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
}

.touch-target:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

/* Mobile-safe scroll */
.scroll-safe {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Prevent zoom on input focus on mobile */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .high-contrast {
        --primary: #000000;
        --background-light: #ffffff;
        --text-color: #000000;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .dark\:bg-background-dark {
        background-color: #0a0e17 !important;
    }
}

/* Landscape mode for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .h-screen {
        height: auto !important;
        min-height: 100vh !important;
    }
    
    #transcriptionCard {
        max-height: 50vh !important;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .min-w-\[200px\] {
        min-width: 160px !important;
    }
    
    .px-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Large screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1536px !important;
    }
}

/* Print styles */
@media print {
    #listenButton,
    #settingsButton,
    #settingsOverlay {
        display: none !important;
    }
    
    #transcriptionCard {
        border: none !important;
        box-shadow: none !important;
        height: auto !important;
        max-height: none !important;
    }
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 3px solid #1152d4 !important;
    outline-offset: 2px !important;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #1152d4;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error states */
.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.dark .error {
    background-color: #450a0a !important;
}

/* Success states */
.success {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}