/* ── TTS Blog Reader – tts.css ─────────────────────────────────────────────── */

.tts-player {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 50px;
    padding: 10px 18px 10px 10px;
    margin: 20px 0 28px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    max-width: 420px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: box-shadow 0.2s ease;
}

.tts-player:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.11);
}

/* ── Play button ── */
.tts-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: #1a73e8;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    padding: 0;
}

.tts-btn:hover  { background: #1558c0; transform: scale(1.06); }
.tts-btn:active { transform: scale(0.97); }

/* ── Waveform ── */
.tts-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 28px;
}

.tts-waveform span {
    display: block;
    width: 3px;
    border-radius: 3px;
    background: #1a73e8;
    height: 6px;
    opacity: 0.35;
}

.tts-player.playing .tts-waveform span { opacity: 1; }

.tts-player.playing .tts-waveform span:nth-child(1)  { animation: wave 1.0s ease-in-out infinite 0.00s; }
.tts-player.playing .tts-waveform span:nth-child(2)  { animation: wave 1.0s ease-in-out infinite 0.08s; }
.tts-player.playing .tts-waveform span:nth-child(3)  { animation: wave 1.0s ease-in-out infinite 0.16s; }
.tts-player.playing .tts-waveform span:nth-child(4)  { animation: wave 1.0s ease-in-out infinite 0.24s; }
.tts-player.playing .tts-waveform span:nth-child(5)  { animation: wave 1.0s ease-in-out infinite 0.32s; }
.tts-player.playing .tts-waveform span:nth-child(6)  { animation: wave 1.0s ease-in-out infinite 0.40s; }
.tts-player.playing .tts-waveform span:nth-child(7)  { animation: wave 1.0s ease-in-out infinite 0.32s; }
.tts-player.playing .tts-waveform span:nth-child(8)  { animation: wave 1.0s ease-in-out infinite 0.24s; }
.tts-player.playing .tts-waveform span:nth-child(9)  { animation: wave 1.0s ease-in-out infinite 0.16s; }
.tts-player.playing .tts-waveform span:nth-child(10) { animation: wave 1.0s ease-in-out infinite 0.08s; }
.tts-player.playing .tts-waveform span:nth-child(11) { animation: wave 1.0s ease-in-out infinite 0.04s; }
.tts-player.playing .tts-waveform span:nth-child(12) { animation: wave 1.0s ease-in-out infinite 0.00s; }

@keyframes wave {
    0%, 100% { height: 4px; }
    50%       { height: 22px; }
}

/* ── Info text ── */
.tts-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.tts-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

.tts-meta {
    font-size: 0.78rem;
    color: #888;
    margin-top: 2px;
}

/* ── Speed + close ── */
.tts-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tts-controls select {
    font-size: 0.78rem;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 3px 8px;
    background: #f5f5f5;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.tts-controls select:hover { border-color: #1a73e8; }

.tts-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.tts-close:hover { color: #333; background: #f0f0f0; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .tts-player { max-width: 100%; padding: 8px 12px 8px 8px; gap: 10px; }
    .tts-btn    { width: 36px; height: 36px; min-width: 36px; }
    .tts-title  { font-size: 0.82rem; }
    .tts-controls select { display: none; }
}
