/**
 * 句子音频查看器样式
 * @version 1.0.0
 */

/* 容器 */
.sentence-audio-viewer {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    max-height: 600px;
    overflow-y: auto;
}

/* 头部 */
.sentence-audio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 12px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
}

.title-icon {
    font-size: 20px;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.stat-item {
    padding: 4px 8px;
    border-radius: 4px;
    background: #f0f0f0;
}

.stat-item.total {
    background: #e3f2fd;
    color: #1565c0;
}

.stat-item.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.stat-item.error {
    background: #ffebee;
    color: #c62828;
}

.stat-item.pending {
    background: #fff3e0;
    color: #ef6c00;
}

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

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #1976d2;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #1565c0;
}

.action-btn:disabled {
    background: #90caf9;
    cursor: not-allowed;
}

/* 句子列表 */
.sentence-audio-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 句子卡片 */
.sentence-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #e0e0e0;
    transition: box-shadow 0.2s;
}

.sentence-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sentence-card.success {
    border-left-color: #4caf50;
}

.sentence-card.error {
    border-left-color: #f44336;
}

.sentence-card.pending {
    border-left-color: #ff9800;
}

/* 卡片头部 */
.card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.sentence-index {
    font-weight: 600;
    color: #1976d2;
    min-width: 32px;
}

.status-icon {
    font-size: 16px;
}

.sentence-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
}

/* 播放器区域 */
.card-player {
    margin-top: 8px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-btn,
.download-btn {
    padding: 8px;
    border: none;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.play-btn:hover,
.download-btn:hover {
    background: #e0e0e0;
}

.player-container {
    flex: 1;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.player-placeholder {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.audio-player {
    width: 100%;
    height: 40px;
}

.player-info {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 加载状态 */
.loading {
    color: #1976d2;
    font-style: italic;
}

/* 错误区域 */
.card-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #ffebee;
    border-radius: 4px;
    margin-top: 8px;
}

.error-message {
    color: #c62828;
    font-size: 13px;
}

.retry-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #f44336;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.retry-btn:hover {
    background: #d32f2f;
}

/* 待处理状态 */
.card-pending {
    padding: 12px;
    background: #fff3e0;
    border-radius: 4px;
    margin-top: 8px;
}

.pending-message {
    color: #ef6c00;
    font-size: 13px;
}

/* 空消息 */
.empty-message {
    text-align: center;
    color: #999;
    padding: 32px;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .sentence-audio-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-stats {
        flex-wrap: wrap;
    }

    .player-controls {
        flex-wrap: wrap;
    }

    .player-container {
        width: 100%;
        order: 3;
    }
}
