/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    /* Removed shadow variables to avoid conflicts with neumorphic design system */
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-md);
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-title i {
    font-size: 2rem;
}

.app-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Progress Bar */
.progress-container {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: var(--border);
    z-index: 1;
}

/* Progress Steps */
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.progress-step:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.progress-step.active:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.progress-step.completed:hover {
    background-color: rgba(34, 197, 94, 0.1);
}

.progress-step:before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}

.progress-step:first-child:before {
    display: none;
}

.progress-step.active:before,
.progress-step.completed:before {
    background: #3b82f6;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #3b82f6;
    color: white;
}

.progress-step.completed .step-number {
    background: #22c55e;
    color: white;
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #3b82f6;
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: #22c55e;
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.step-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.step-content.active {
    display: block;
}

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

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 0 1.5rem 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--surface);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569;
    transform: translateY(-1px);
}

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

.btn i {
    font-size: 0.875rem;
}

/* Upload Zones */
.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Single upload container for audio */
.audio-upload-container {
    grid-template-columns: 1fr !important;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.upload-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: rgb(37 99 235 / 0.02);
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgb(37 99 235 / 0.05);
}

.upload-zone.uploaded {
    border-color: var(--success-color);
    background: rgb(5 150 105 / 0.05);
}

.upload-content i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-content p {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.875rem !important;
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.upload-status.waiting {
    color: var(--text-secondary);
}

.upload-status.uploading {
    color: var(--warning-color);
}

.upload-status.success {
    color: var(--success-color);
}

.upload-status.error {
    color: var(--error-color);
}

.upload-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--border-light);
    border-radius: var(--radius);
}

.upload-info h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item label {
    font-weight: 500;
    color: var(--text-secondary);
}

.info-item span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Loading & Success States */
.loading-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgb(37 99 235 / 0.1);
    margin-bottom: 1rem;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgb(5 150 105 / 0.1);
    margin-bottom: 1rem;
}

.success-icon i {
    font-size: 2rem;
    color: var(--success-color);
}

.text-center {
    text-align: center;
}

/* Mapping Interface */
.selection-summary-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.selection-summary {
    display: flex;
    justify-content: center;
    align-items: center;
}

.summary-stats {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.mapping-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.mapping-controls {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.control-group {
    margin-bottom: 2rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.speaker-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.speaker-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.speaker-input label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.selection-controls {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.export-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.export-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.selection-info {
    padding: 0.75rem;
    background: var(--border-light);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
    color: var(--text-primary);
}

.export-controls .btn.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.export-controls .btn.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Square button style for compact controls */
.btn-square {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.btn-square i {
    margin: 0;
    font-size: 0.9rem;
}

/* Export raw controls */
.export-raw-controls {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.export-raw-controls .btn {
    justify-content: center;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.search-controls {
    display: flex;
    gap: 0.5rem;
}

.search-controls input {
    flex: 1;
}

/* Timeline removed for better UX with long content */

/* Hierarchical Sections */
.sections-container h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.sections-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Hierarchical Section Structure */
.hierarchical-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s ease;
}

.hierarchical-section:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.hierarchical-section.selected {
    border-color: var(--success-color);
    box-shadow: 0 0 0 1px var(--success-color), 0 2px 8px rgba(5, 150, 105, 0.15);
}

.hierarchical-section.selected .section-header {
    background: linear-gradient(135deg, rgb(5 150 105 / 0.06) 0%, rgb(5 150 105 / 0.02) 100%);
}

.hierarchical-section.partial {
    border-color: var(--warning-color);
    box-shadow: 0 0 0 1px var(--warning-color), 0 2px 8px rgba(217, 119, 6, 0.15);
}

.hierarchical-section.partial .section-header {
    background: linear-gradient(135deg, rgb(217 119 6 / 0.06) 0%, rgb(217 119 6 / 0.02) 100%);
}

/* Section Headers */
.section-header, .subsection-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.section-header[data-level="section"] {
    background: var(--surface);
    font-weight: 600;
}

.subsection-header[data-level="subsection"] {
    background: rgb(248 250 252);
    margin-left: 1rem;
    font-size: 0.95rem;
}

.section-header:hover, .subsection-header:hover {
    background: var(--border-light);
    cursor: pointer;
}

/* Section Controls */
.section-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.expand-btn, .select-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.expand-btn:hover {
    background: var(--border-light);
    color: var(--primary-color);
}

.select-btn {
    color: var(--text-secondary);
}

.select-btn:hover {
    color: var(--primary-color);
}

.select-btn.selected {
    color: var(--success-color);
}

.select-btn.partial {
    color: var(--warning-color);
}

.expand-btn i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.select-btn i {
    font-size: 0.875rem;
}

/* Section Info */
.section-info, .subsection-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title, .subsection-title {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.section-title {
    font-size: 1rem;
}

.subsection-title {
    font-size: 0.9rem;
}

.section-meta, .subsection-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    align-items: center;
}

.section-meta span, .subsection-meta span {
    white-space: nowrap;
}

/* Content Areas */
.section-content, .subsection-content {
    overflow: visible;
    opacity: 1;
}

.section-content.collapsed, .subsection-content.collapsed {
    display: none;
}

/* Subsections */
.subsections-container {
    background: rgb(249 250 251);
    border-top: 1px solid var(--border-light);
}

.subsection-item {
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.subsection-item:last-child {
    border-bottom: none;
}

.subsection-item.selected {
    background: linear-gradient(135deg, rgb(5 150 105 / 0.04) 0%, rgb(5 150 105 / 0.01) 100%);
    border-left: 3px solid var(--success-color);
}

.subsection-item.selected .subsection-header {
    background: linear-gradient(135deg, rgb(5 150 105 / 0.08) 0%, rgb(5 150 105 / 0.02) 100%);
}

.subsection-item.partial {
    background: linear-gradient(135deg, rgb(217 119 6 / 0.04) 0%, rgb(217 119 6 / 0.01) 100%);
    border-left: 3px solid var(--warning-color);
}

.subsection-item.partial .subsection-header {
    background: linear-gradient(135deg, rgb(217 119 6 / 0.08) 0%, rgb(217 119 6 / 0.02) 100%);
}

/* Empty Section State */
.empty-section {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    background: rgb(250 251 252);
}

/* Messages */
.messages-container {
    border-top: 1px solid var(--border-light);
    background: rgb(250 251 252);
    margin-left: 2rem;
}

/* Subsection messages need extra indentation */
.subsection-item .messages-container {
    margin-left: 3rem;
}

.messages-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgb(248 249 250);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}

.messages-header:hover {
    background: var(--border-light);
    cursor: pointer;
}

.messages-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.messages-list, .subsection-messages {
    overflow: visible;
    opacity: 1;
}

.messages-list.collapsed {
    display: none;
}

.message-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    background: white;
    transition: background-color 0.2s ease;
}

.message-item:hover {
    background: rgb(248 250 252);
    cursor: pointer;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item.selected {
    background: linear-gradient(135deg, rgb(5 150 105 / 0.06) 0%, rgb(5 150 105 / 0.02) 100%);
    border-left: 2px solid var(--success-color);
}

.message-speaker {
    font-weight: 500;
    color: var(--primary-color);
    min-width: 60px;
    font-size: 0.8rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 60px;
    font-family: monospace;
}

.message-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-meta, .subsection-meta {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-end;
    }
    
    .message-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .message-speaker, .message-time {
        min-width: auto;
    }

    /* Ensure square buttons remain accessible on mobile */
    .btn-square {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .btn-square i {
        font-size: 1rem;
    }
}

.section-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.section-messages {
    background: var(--border-light);
    border-radius: var(--radius);
    padding: 1rem;
}

.message-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.message-item:last-child {
    margin-bottom: 0;
}

.message-speaker {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 80px;
}

.message-time {
    color: var(--text-secondary);
    min-width: 60px;
}

.message-text {
    flex: 1;
    color: var(--text-primary);
}

/* Export Interface */
.export-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.export-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--border-light);
    border-radius: var(--radius);
}

.summary-item label {
    font-weight: 500;
    color: var(--text-secondary);
}

.summary-item span {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.marker-preview {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--border-light);
}

.marker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.marker-item:last-child {
    border-bottom: none;
}

.marker-type {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.marker-type.in {
    background: rgb(5 150 105 / 0.1);
    color: var(--success-color);
}

.marker-type.out {
    background: rgb(220 38 38 / 0.1);
    color: var(--error-color);
}

.marker-name {
    flex: 1;
    margin: 0 1rem;
    color: var(--text-primary);
}

.marker-timecode {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-weight: 500;
}

.export-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.export-instructions {
    background: var(--border-light);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.export-instructions h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.export-instructions ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.export-instructions li {
    margin-bottom: 0.5rem;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    margin: 1rem;
}

.loading-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

.notification.info {
    border-left-color: var(--primary-color);
}

.notification i {
    font-size: 1.25rem;
}

.notification.success i {
    color: var(--success-color);
}

.notification.error i {
    color: var(--error-color);
}

.notification.warning i {
    color: var(--warning-color);
}

.notification.info i {
    color: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Projects List */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.project-item:hover {
    background: var(--border-light);
    border-color: var(--primary-color);
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.delete-project-btn {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.delete-project-btn:hover {
    opacity: 1;
}

.project-item:hover .delete-project-btn {
    opacity: 1;
}

.project-info h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.project-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.project-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

/* Status-specific styling */
.project-status.created {
    background-color: #f3f4f6;
    color: #374151;
}

.project-status.files-uploaded {
    background-color: #dbeafe;
    color: #1e40af;
}

.project-status.ready-for-mapping {
    background-color: #fed7aa;
    color: #c2410c;
}

.project-status.mapping-ready {
    background-color: #dcfce7;
    color: #166534;
}

.project-status.editing-complete {
    background-color: #e0e7ff;
    color: #4338ca;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }
    
    .app-title i {
        font-size: 1.5rem;
    }
    
    .progress-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .progress-bar::before {
        display: none;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .upload-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .audio-upload-container {
        max-width: 100%;
    }
    
    .mapping-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mapping-controls {
        position: static;
    }
    
    .summary-stats {
        gap: 2rem;
    }
    
    .stat .stat-value {
        font-size: 1.25rem;
    }
    
    .export-actions {
        flex-direction: column;
    }
    
    .step-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .notification {
        min-width: calc(100vw - 2rem);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .app-header {
        padding: 1.5rem 0;
    }
    
    .app-title {
        font-size: 1.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .card-header,
    .card-body {
        padding: 1rem;
    }
    
    .upload-zone {
        padding: 1.5rem 0.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .section-meta {
        align-items: flex-start;
    }
} 

/* MP3 Upload and Transcription Styles */
.or-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.or-divider span {
    background: var(--background);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.transcription-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--border-light);
    border-radius: var(--radius);
}

.stat-item {
    text-align: center;
}

.stat-item label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-item span {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}



/* Transcription step visibility */
.progress-step[data-step="2-5"] {
    display: none;
}

.progress-step[data-step="2-5"].active {
    display: flex;
}

/* Responsive adjustments for transcription step */
@media (max-width: 768px) {
    .transcription-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .or-divider {
        margin: 1.5rem 0;
    }
    
    .progress-step[data-step="2-5"] .step-number {
        font-size: 0.875rem;
    }
} 

/* Selection details list */
.selection-details {
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.selection-details .detail-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #ddd;
    padding: 4px 0;
}

.selection-details .detail-type {
    font-weight: 600;
    margin-right: 0.5rem;
}

.selection-details .detail-time {
    font-family: monospace;
}

/* Header Layout */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-main {
    flex: 1;
}

.header-controls {
    display: flex;
    gap: 0.5rem;
}

.debug-toggle {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.debug-toggle:hover {
    opacity: 1;
}

/* Debug Panel */
.debug-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background: var(--card-background);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--background-secondary);
    border-radius: 12px 12px 0 0;
}

.debug-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.debug-header .btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.debug-header .btn:hover {
    background: var(--background-hover);
}

.debug-content {
    padding: 1rem;
}

.debug-section {
    margin-bottom: 1rem;
}

.debug-section:last-child {
    margin-bottom: 0;
}

.debug-section label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.debug-section select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.debug-section .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.debug-section code {
    display: block;
    background: var(--background-secondary);
    padding: 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    word-break: break-all;
    margin-top: 0.25rem;
}

/* Editing Strategy Controls */
.editing-strategy-controls {
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
}

.editing-strategy-controls h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editing-strategy-controls h5::before {
    content: '';
    width: 3px;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 2px;
}

.editing-strategy-controls .form-group {
    margin-bottom: 1rem;
}

.editing-strategy-controls .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.editing-strategy-controls textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.editing-strategy-controls input[type="number"] {
    width: 120px;
}

#suggest-editing-strategy {
    width: 100%;
    font-weight: 500;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    border: none;
    transition: all 0.3s ease;
}

#suggest-editing-strategy:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#suggest-editing-strategy:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#suggest-editing-strategy i {
    margin-right: 0.5rem;
}

/* Confirmation Dialog */
.confirmation-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.confirmation-dialog {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
}

.confirmation-dialog .dialog-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.confirmation-dialog .dialog-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.confirmation-dialog .dialog-header h3 i {
    color: var(--warning-color);
    margin-right: 0.5rem;
}

.confirmation-dialog .dialog-body {
    padding: 1.5rem;
}

.confirmation-dialog .dialog-body p {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.confirmation-dialog .dialog-body p:last-child {
    margin-bottom: 0;
}

.confirmation-dialog .warning-text {
    color: var(--warning-color);
    font-size: 0.9rem;
    background: rgba(234, 179, 8, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--warning-color);
}

.confirmation-dialog .warning-text i {
    margin-right: 0.5rem;
}

.confirmation-dialog .dialog-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--border-light);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.confirmation-dialog .dialog-actions .btn {
    min-width: 100px;
}

/* Responsive Design for Confirmation Dialog */
@media (max-width: 768px) {
    .confirmation-dialog {
        margin: 1rem;
        width: auto;
    }
    
    .confirmation-dialog .dialog-actions {
        flex-direction: column;
    }
    
    .confirmation-dialog .dialog-actions .btn {
        width: 100%;
    }
}