/* Reusing core variables from chat.css */
@import url('chat.css');

body, .app-layout {
    height: 100dvh;
    overflow: hidden;
}

/* Specific Transcribe Overrides */

.transcribe-container {
    flex: 1;
    overflow-y: auto;
    /* Match chat.css centering logic */
    padding: var(--spacing) max(1rem, calc((100% - 900px) / 2));
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .transcribe-container {
        padding: var(--spacing) 1rem;
    }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Tabs */
.source-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    opacity: 0.6;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    opacity: 1;
    border-bottom-color: var(--accent);
    color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* Drag Drop Zone */
.file-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}

.file-drop-zone:hover, .file-drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--surface-hover);
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.sub-text {
    font-size: 0.85rem;
    opacity: 0.6;
}

.file-info {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-top: 1rem;
    gap: 0.5rem;
}

.file-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.full-width-audio {
    width: 100%;
    margin-top: 0.5rem;
    height: 40px;
}

.hidden { display: none !important; }

/* Mic Controls */
.mic-controls-container {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.mic-visualizer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.mic-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.mic-circle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.1);
}

.mic-circle.recording {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    animation: pulse-ring 2s infinite;
}

.mic-status {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}

.mic-timer {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--danger);
    background: rgba(220, 38, 38, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

#audio-preview {
    width: 100%;
    margin-top: 1rem;
}

/* Workflow State */
.audio-section.completed {
    display: none;
}

/* Output Area */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.output-text {
    min-height: 200px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    white-space: pre-wrap;
    line-height: 1.6;
    font-family: var(--font-sans);
}

.output-text:empty::before {
    content: attr(placeholder);
    color: var(--text);
    opacity: 0.4;
}

/* Karaoke Highlight */
.word {
    transition: background-color 0.2s, color 0.2s;
    border-radius: 2px;
    padding: 0 1px;
}

.word.highlight {
    background-color: var(--accent);
    color: var(--accent-text);
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

/* Sidebar Nav styles removed to use shared chat.css styles */

/* Session List Styles */
.chat-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-preview {
    font-size: 0.75rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon-btn-sm {
    padding: 4px;
    border-radius: 4px;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s;
}

.icon-btn-sm:hover {
    background: var(--surface-hover);
    opacity: 1;
    color: var(--accent);
}

.icon-btn-sm.delete-btn:hover {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.1);
}

/* Progress Dialog */
.progress-dialog {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 0;
    width: 90%;
    max-width: 400px;
    text-align: left;
    overflow: hidden;
}

.progress-dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.progress-content {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.progress-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.progress-label { 
    margin-bottom: 0.5rem; 
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    white-space: pre-wrap;
    max-width: 100%;
    word-break: break-word;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: var(--surface-hover);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.2s ease;
}

/* Mobile Toggles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    
    .right-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    .right-sidebar.open {
        transform: translateX(0);
    }

    /* Better mobile spacing */
    .transcribe-container {
        padding: 0.5rem;
        min-height: 0;
    }
}
