/* audio.css - Corporate Brutalist UI for Audio Tools */

.audio-tool-app {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 20px 0;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

@media (min-width: 992px) {
    .audio-tool-app {
        flex-direction: row;
        align-items: stretch;
        min-height: 550px;
    }
}

/* Left Panel: Preview & Upload */
.app-left {
    flex: 1 1 50%;
    background: var(--bg-alt);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid var(--border);
}

.preview-container {
    flex-grow: 1;
    min-height: 250px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #fff;
    padding: 20px;
    transition: 0.2s ease;
}

.preview-container.dragover {
    border-color: var(--primary);
    background-color: rgba(0, 82, 204, 0.05);
}

.upload-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.upload-placeholder h3 { margin-bottom: 8px; color: var(--text-main); font-size: 1.2rem;}
.upload-placeholder p { font-size: 0.9rem; margin-bottom: 15px; }

.file-input-wrapper input[type="file"] { display: none; }

#playerContainer {
    display: none;
    width: 100%;
    text-align: center;
}

.audio-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary);
}

#fileDetails {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
    word-break: break-all;
}

#audioPlayer {
    width: 100%;
    height: 40px;
    outline: none;
}

/* Right Panel: Controls */
.app-right {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
}

.tab-btn {
    flex: 1;
    padding: 16px 10px;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}

.tab-btn:last-child { border-right: none; }
.tab-btn:hover { color: var(--text-main); background: #eaeaea; }
.tab-btn.active { background: var(--bg-light); color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }

.tab-content-wrapper {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
}

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

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

/* Form Controls */
.panel-section { margin-bottom: 24px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 12px; font-weight: 700; }

.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.input-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;}
.input-group label { font-size: 13px; font-weight: 600; color: var(--text-main); }

input[type="number"], select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-light);
    transition: 0.2s;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.help-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Action Footer */
.action-footer {
    padding: 24px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}

.btn-primary, .btn-success, .btn-outline {
    display: inline-block;
    padding: 12px 20px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: 0.2s;
    border: none;
    width: 100%;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-primary:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

.btn-success { background: #0b875b; color: #fff; text-decoration: none; margin-top: 15px; display: none; }
.btn-success:hover { background: #096a47; color: #fff; }

.btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--border); width: auto;}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-alt); }

.status-bar { margin-bottom: 15px; }
progress {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    border: none;
    background: var(--border);
    margin-bottom: 8px;
}
progress::-webkit-progress-bar { background: var(--border); border-radius: 4px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 4px; transition: width 0.3s; }
#statusText { font-size: 13px; color: var(--text-muted); font-weight: 500; display: block; text-align: center;}