/* AR Notes - Responsive Styles (Light Theme) */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }

    .file-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .file-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .transcription-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        z-index: 200;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 199;
    }

    .sidebar-overlay.visible {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    /* File header */
    .file-header {
        padding: 1rem;
        padding-left: 4rem; /* Space for mobile toggle */
    }

    .file-info h1 {
        font-size: 1rem;
    }

    .file-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .file-actions {
        gap: 0.25rem;
    }

    .file-actions .btn {
        flex: 1;
        min-width: 0;
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .file-actions .btn span {
        display: none;
    }

    /* Audio player */
    .audio-player {
        padding: 1rem;
    }

    #waveform {
        height: 60px;
    }

    .player-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .volume-control {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    /* Transcription */
    .transcription-section {
        padding: 1rem;
    }

    .segment {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .segment-speaker {
        min-width: 0;
    }

    .segment-actions {
        opacity: 1;
        justify-content: flex-end;
    }

    /* Legend */
    .transcription-legend {
        flex-wrap: wrap;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h2 {
        font-size: 1.25rem;
    }

    .upload-dropzone {
        padding: 1rem;
    }

    .upload-dropzone i {
        font-size: 1.5rem;
    }

    .upload-dropzone p {
        font-size: 0.875rem;
    }

    .toast {
        max-width: calc(100vw - 2rem);
    }

    .modal {
        padding: 1rem;
    }
}

/* Large Screen */
@media (min-width: 1440px) {
    :root {
        --sidebar-width: 340px;
    }

    .segment-speaker {
        min-width: 160px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .audio-player-section,
    .file-actions,
    .segment-actions,
    .loading-overlay,
    .toast-container {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .file-view {
        display: block;
    }

    .transcription-section {
        padding: 0;
        overflow: visible;
    }

    .transcription-content {
        overflow: visible;
    }

    .segment {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 0.5rem;
    }

    .segment.insurance {
        border-left: 4px solid #2563eb;
    }

    .segment.provider {
        border-left: 4px solid #16a34a;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #1e293b;
        --text-secondary: #334155;
        --text-muted: #475569;
    }

    .segment {
        border-width: 2px;
    }

    .btn {
        border: 2px solid currentColor;
    }
}
