/* TỨ PHỦ — Content Listen bar */

.cl-bar {
    position: fixed;
    left: 50%;
    bottom: 1.1rem;
    z-index: 55;
    width: min(560px, calc(100vw - 1.5rem));
    transform: translateX(-50%);
    border: 1px solid rgba(98, 68, 60, 0.7);
    border-radius: 12px;
    background: rgba(42, 26, 28, 0.96);
    color: #f4e6d1;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0.85rem;
}

.cl-bar[hidden] {
    display: none !important;
}

.cl-bar.is-unsupported {
    opacity: 0.95;
}

.cl-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.cl-copy {
    min-width: 0;
    flex: 1;
}

.cl-kicker {
    margin: 0;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #e4c58c;
}

.cl-title {
    margin: 0.15rem 0 0;
    font-family: "Noto Serif", Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cl-meta {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    color: #d5ba99;
}

.cl-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.cl-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(98, 68, 60, 0.75);
    background: transparent;
    color: #e4c58c;
    cursor: pointer;
}

.cl-btn:hover {
    border-color: #c49a59;
    color: #f4e6d1;
}

.cl-btn.is-primary {
    background: #742b32;
    border-color: transparent;
    color: #f4e6d1;
}

.cl-btn.is-primary:hover {
    background: #913c43;
}

.cl-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(98, 68, 60, 0.45);
    font-size: 0.75rem;
    color: #d5ba99;
}

.cl-tools label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.cl-tools select {
    border-radius: 6px;
    border: 1px solid rgba(98, 68, 60, 0.7);
    background: #190f12;
    color: #f4e6d1;
    padding: 0.2rem 0.35rem;
    font: inherit;
}

.cl-launch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(196, 154, 89, 0.55);
    background: #742b32;
    color: #e4c58c;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

/* Nút nghe chỉ hiện khi đoạn có audio (JS bỏ hidden / gán has-listen-audio) */
.cl-launch[data-listen-start][hidden],
button.cl-launch[data-listen-start]:not(.is-audio-ready):not(.is-loading-audio) {
    display: none !important;
}

[data-listen-item].has-listen-audio .cl-launch[data-listen-start],
.cl-launch[data-listen-start].is-audio-ready,
.cl-launch[data-listen-start].is-loading-audio {
    display: inline-flex !important;
}

.cl-launch:hover {
    background: rgba(116, 43, 50, 0.32);
    color: #f4e6d1;
}

[data-listen-item].is-listening {
    outline: 2px solid rgba(196, 154, 89, 0.55);
    outline-offset: 6px;
    border-radius: 10px;
}

@media (max-width: 640px) {
    .cl-bar {
        bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }
    .cl-title {
        font-size: 0.88rem;
    }
}

/* Keep clear of scroll-top button */
body:has(.cl-bar:not([hidden])) .scroll-top {
    bottom: 6.5rem;
}
