/* ==========================================================
   在线音频提取（视频转 MP3）专属样式
   ========================================================== */

.audio-tool {
    width: 100%;
}

.audio-tool [hidden] {
    display: none !important;
}

.audio-tool > .zt-api-cta {
    margin-top: 16px;
}

.audio-card {
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--dd-line);
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(15, 118, 110, .05);
}

.audio-intro {
    margin: 0 0 18px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--dd-ink-3);
}

.audio-intro-limit {
    margin-left: 8px;
    color: var(--dd-brand);
    font-weight: 600;
}

/* ---------- 拖放区 ---------- */
.audio-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 184px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, #f8fdfc 0%, #f6f9fb 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.audio-drop:hover,
.audio-drop.is-dragover {
    background: #f0fbf9;
    border-color: var(--dd-brand);
    transform: translateY(-1px);
}

.audio-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.audio-drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    color: var(--dd-brand);
    background: #fff;
    border: 1px solid #d8eee9;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(15, 118, 110, .08);
}

.audio-drop-icon svg {
    width: 24px;
    height: 24px;
}

.audio-drop-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dd-ink);
}

.audio-drop-sub {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--dd-ink-3);
}

/* ---------- 已选文件 ---------- */
.audio-file {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--dd-line);
    border-radius: 9px;
}

.audio-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    color: var(--dd-brand);
    background: #e6f7f4;
    border-radius: 8px;
}

.audio-file-icon svg {
    width: 18px;
    height: 18px;
}

.audio-file-main {
    flex: 1 1 auto;
    min-width: 0;
}

.audio-file-name {
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dd-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-file-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--dd-ink-3);
}

.audio-text-btn {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dd-brand);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.audio-text-btn:hover {
    background: #e6f7f4;
}

/* ---------- 进度 ---------- */
.audio-progress {
    margin-top: 16px;
}

.audio-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 12.5px;
    color: var(--dd-ink-2);
}

.audio-progress-percent {
    font-weight: 700;
    color: var(--dd-brand);
}

.audio-progress-track {
    height: 8px;
    overflow: hidden;
    background: #edf2f4;
    border-radius: 999px;
}

.audio-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2dd4bf, #0f766e);
    border-radius: 999px;
    transition: width .2s ease;
}

/* ---------- 按钮与状态 ---------- */
.audio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--dd-line);
}

.audio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--dd-ink-2);
    background: #f6f8f9;
    border: 1px solid var(--dd-line);
    border-radius: 7px;
    cursor: pointer;
    outline: none !important;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, opacity .18s ease;
}

.audio-btn svg {
    width: 15px;
    height: 15px;
}

.audio-btn:hover:not(:disabled) {
    border-color: var(--dd-brand);
    color: var(--dd-brand);
}

.audio-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.audio-btn-primary {
    color: #fff;
    background: var(--dd-brand);
    border-color: var(--dd-brand);
}

.audio-btn-primary:hover:not(:disabled) {
    color: #fff;
    background: var(--dd-brand-dark);
    border-color: var(--dd-brand-dark);
}

.audio-btn-success {
    color: #fff;
    background: #16a34a;
    border-color: #16a34a;
}

.audio-btn-success:hover:not(:disabled) {
    color: #fff;
    background: #15803d;
    border-color: #15803d;
}

.audio-btn-ghost {
    background: #fff;
}

.audio-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.6;
    border-radius: 7px;
}

.audio-status-dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
}

.audio-status.is-loading {
    color: #9a5a00;
    background: #fff8e8;
    border: 1px solid #f7dfae;
}

.audio-status.is-success {
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #b7e8df;
}

.audio-status.is-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

/* ---------- 信息 / 日志面板 ---------- */
.audio-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.audio-panel {
    min-width: 0;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--dd-line);
    border-radius: 12px;
}

.audio-panel h3 {
    margin: 0 0 14px;
    padding-left: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--dd-ink);
    border-left: 3px solid var(--dd-brand);
}

.audio-info-list {
    margin: 0;
}

.audio-info-list > div {
    display: flex;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #edf0f2;
}

.audio-info-list > div:last-child {
    border-bottom: 0;
}

.audio-info-list dt {
    flex: 0 0 52px;
    font-size: 12.5px;
    color: var(--dd-ink-3);
}

.audio-info-list dd {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dd-ink-2);
}

.audio-log {
    max-height: 168px;
    overflow-y: auto;
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.8;
    color: var(--dd-ink-2);
    background: #f8fafc;
    border: 1px solid var(--dd-line);
    border-radius: 8px;
}

.audio-log-line + .audio-log-line {
    border-top: 1px dashed #e8edf1;
}

.audio-log-time {
    margin-right: 7px;
    color: #94a3b8;
}

/* ---------- 响应式 ---------- */
@media (max-width: 767.98px) {
    .audio-card {
        padding: 16px;
    }

    .audio-drop {
        min-height: 156px;
        padding: 22px 16px;
    }

    .audio-panels {
        grid-template-columns: minmax(0, 1fr);
    }

    .audio-actions .audio-btn {
        flex: 1 1 44%;
    }
}
