/* 음성 파일에서 텍스트 추출 전용 스타일 (파스텔톤) */

/* 업로드 영역 */
.upload-area {
    border: 3px dashed #b9dfd6;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    background: #f2fbf8;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #7fc4b3;
    background: #e6f6f0;
}

.upload-area.has-file {
    border-color: #7fc4b3;
    background: #e6f6f0;
}

.upload-area-compact {
    padding: 40px 30px;
}

.upload-area-compact .upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.upload-area-compact .upload-text {
    font-size: 1rem;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 0.85rem;
    color: #888;
}

/* 파일 정보 */
.file-info {
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.file-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eef2f0;
}

.file-info-row:last-child {
    border-bottom: none;
}

.file-info-label {
    color: #6b7d78;
    font-size: 0.9rem;
}

.file-info-value {
    font-weight: 600;
    color: #333;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 옵션 패널 */
.options-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-row-checkbox {
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
}

.option-label {
    min-width: 60px;
    font-size: 0.9rem;
    color: #4a5c58;
    font-weight: 500;
}

.option-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d0e5df;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
}

.option-select:hover {
    border-color: #7fc4b3;
}

.option-select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

#timestampsToggle {
    width: 16px;
    height: 16px;
    accent-color: #7fc4b3;
    cursor: pointer;
}

.option-hint {
    font-size: 0.8rem;
    color: #7d8f8a;
    line-height: 1.5;
    padding-top: 4px;
    border-top: 1px solid #eef4f2;
}

.option-hint.accel-hint {
    border-top: none;
    padding-top: 0;
    color: #5b7d75;
}

/* 결과 패널 */
.result-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b5ead7 0%, #a8dadc 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-icon:hover:not(:disabled) {
    opacity: 0.85;
}

.btn-icon:disabled {
    background: #d8d8d8;
    cursor: not-allowed;
}

.result-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #9ab0aa;
    text-align: center;
}

.result-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.result-placeholder-text {
    font-size: 1rem;
    line-height: 1.5;
}

.result-textarea {
    flex: 1;
    width: 100%;
    padding: 16px;
    border: 1px solid #d5eae4;
    border-radius: 10px;
    background: #fafcfb;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333;
    resize: none;
    min-height: 400px;
}

.result-textarea:focus {
    outline: none;
    border-color: #7fc4b3;
    background: white;
}

/* 변환 버튼 */
.convert-section {
    text-align: center;
    margin: 20px 0;
}

.btn-convert {
    padding: 14px 40px;
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #7fc4b3 0%, #8fb8d4 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(127, 196, 179, 0.35);
    transition: all 0.2s;
}

.btn-convert:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(127, 196, 179, 0.45);
}

.btn-convert:active:not(:disabled) {
    transform: translateY(0);
}

.btn-convert:disabled {
    background: #cdd6d3;
    cursor: not-allowed;
    box-shadow: none;
}

/* 2컬럼 레이아웃 */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
    min-height: 480px;
}

@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.right-column {
    display: flex;
    flex-direction: column;
}

.left-column .panel {
    margin-bottom: 0;
}

/* 처리 오버레이 (디코딩/무진행 구간용 스피너) */
.processing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(232, 234, 246, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.processing-overlay.show {
    display: flex;
}

.processing-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 32px 32px 28px;
    text-align: left;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    /* 진행률 문자열 길이 변화로 인한 좌우 흔들림 방지 위해 폭 고정 */
    width: 420px;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
}

.processing-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 18px;
    border: 4px solid #e6f6f0;
    border-top-color: #7fc4b3;
    border-radius: 50%;
    animation: processing-spin 0.9s linear infinite;
}

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

.processing-message {
    font-size: 1rem;
    font-weight: 600;
    color: #4a6b63;
    margin-bottom: 6px;
    text-align: left;
}

.processing-sub {
    font-size: 0.82rem;
    color: #7d8f8a;
    line-height: 1.5;
    min-height: 1.2em;
    text-align: left;
    /* 진행률 숫자가 바뀌어도 폭이 흔들리지 않도록 등폭 계열 지정 */
    font-variant-numeric: tabular-nums;
}

/* 다운로드 페이즈: 파일별 진행률 리스트 */
.processing-files {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.processing-file {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    color: #5f7b74;
}

.processing-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.processing-file-pct {
    color: #4a6b63;
    font-weight: 600;
    flex-shrink: 0;
}

.processing-file.done .processing-file-pct {
    color: #6da48f;
}

.processing-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #9ab0aa;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    padding: 0;
}

.processing-close:hover {
    background: #f2f6f4;
    color: #4a6b63;
}

.processing-close:active {
    background: #e3ebe8;
}
