/**
 * Novel TTS Reader styles
 * Location: /assets/css/tts-reader.css
 * @version 1.0.0
 */

.imc-tts-trigger-wrap {
    margin: 0 0 12px;
    text-align: right;
}

.imc-tts-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
}

/* Câu đang được đọc */
.imc-tts-sentence.is-reading {
    background: rgba(255, 196, 0, 0.28);
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(255, 196, 0, 0.28);
    transition: background .15s ease;
}

.imc-tts-sentence.imc-tts-clickable {
    cursor: pointer;
}

/* Thanh điều khiển nổi ở dưới màn hình */
.imc-tts-bar {
    position: fixed;
    left: 50%;
    bottom: -80px;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--imc-tts-bg, #1f1f1f);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
    transition: bottom .25s ease;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
}

.imc-tts-bar.is-open {
    bottom: 20px;
}

.imc-tts-btn {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 6px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.imc-tts-btn:hover {
    background: rgba(255, 255, 255, .12);
}

.imc-tts-playpause {
    font-size: 18px;
}

.imc-tts-label {
    font-size: 12px;
    opacity: .75;
    white-space: nowrap;
}

.imc-tts-speed,
.imc-tts-voice {
    background: rgba(255, 255, 255, .1);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 12px;
    max-width: 140px;
}

.imc-tts-voice {
    max-width: 160px;
}

@media (max-width: 640px) {
    .imc-tts-bar {
        gap: 6px;
        padding: 6px 10px;
    }

    .imc-tts-voice {
        display: none; /* đỡ chật màn hình nhỏ, vẫn chọn được tốc độ */
    }
}
