/* public/css/transcription.css */

.transcription-app {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.transcription-card {
    width: 100%;
    max-width: 768px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 🎤 マイクボタンとステータス表示 */
.mic-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-mic {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background-color: #2a5298; /* 通常時：青 */
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-mic:hover {
    background-color: #1e3c72;
    transform: scale(1.05);
}

.btn-mic.disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

/* 💡 録音中状態：赤に変更＋パルスアニメーション */
.btn-mic.is-recording {
    background-color: #ef4444; /* 録音中：赤 */
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.status-label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #64748b;
}

.status-label.recording {
    color: #ef4444;
}

/* 📜 テキスト表示エリア（一定範囲固定・自動追従スクロール） */
.transcript-container {
    height: 380px;
    max-height: 50vh;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.transcript-placeholder {
    color: #94a3b8;
    text-align: center;
    margin-auto: auto;
    font-style: italic;
    font-size: 0.95rem;
    padding-top: 140px;
}

.transcript-line {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.6;
    word-break: break-all;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.transcript-line.interim {
    background: #f1f5f9;
    border-left: 4px solid #2a5298;
    color: #64748b;
    font-style: italic;
}

/* 💡 アクションバー（テキスト領域の下に固定配置） */
.action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.action-left {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-copy {
    background-color: #2a5298;
    color: #fff;
}
.btn-copy:hover {
    background-color: #1e3c72;
}

.btn-clear {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.btn-clear:hover {
    background-color: #e2e8f0;
}

/* 💡 [hidden] 指定要素の表示抑制 */
.transcript-placeholder[hidden],
[hidden] {
    display: none !important;
}

/* モバイル対応 */
@media (max-width: 600px) {
    .transcription-card {
        padding: 18px;
    }
    .transcript-container {
        height: 300px;
    }
    .btn-mic {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }
    .action-bar {
        justify-content: center;
    }
    .action-left {
        width: 100%;
    }
    .btn-action {
        flex: 1;
        justify-content: center;
    }
}