/**
 * player-nghe-native.css — U13.0
 * Dock đáy giống Chơi. Config (Điệu / mute) trong bánh răng.
 * Cấm Tailwind, cấm style="", cấm skin zip.
 */
.hah-nghe-native {
    width: 100%;
    box-sizing: border-box;
    color: var(--hah-ink, #1a1c1e);
}
.hah-nghe-native .is-hidden {
    display: none !important;
}
@keyframes nghe-spin {
    to { transform: rotate(360deg); }
}
.hah-nghe-native .nghe-spin {
    animation: nghe-spin 1s linear infinite;
}
.hah-nghe-native .nghe-spin-track { opacity: 0.25; }
.hah-nghe-native .nghe-spin-head { opacity: 0.75; }

.hah-nghe-native .nghe-player-footer {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--hah-surface, #fff);
    padding-top: 0.2rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    overflow: visible;
}
.hah-nghe-native .nghe-toolbar-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.15rem 0.5rem 0;
}
.hah-nghe-native .nghe-top-chrome {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.hah-nghe-native .nghe-settings-toggle {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 8px;
    background: #fff;
    color: var(--hah-ink, #1a1c1e);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.hah-nghe-native .nghe-ico {
    width: 1.15rem;
    height: 1.15rem;
}
.hah-nghe-native .nghe-settings-toggle__chev {
    display: none;
}
.hah-nghe-native .nghe-toolbar-body {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 10px;
    background: #f8fafc;
}
.hah-nghe-native .nghe-toolbar-block.is-open .nghe-toolbar-body {
    display: flex;
    order: -1;
}

.hah-nghe-native .nghe-seq-row {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.1rem 0;
}
.hah-nghe-native .nghe-cell {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    padding: 0.22rem 0.4rem;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 6px;
    background: #fff;
    color: var(--hah-ink, #1a1c1e);
    cursor: pointer;
    font: inherit;
}
.hah-nghe-native .nghe-cell:hover {
    border-color: var(--hah-brand, #d83030);
}
.hah-nghe-native .nghe-cell.is-active {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #b45309;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.28);
}
.hah-nghe-native .nghe-cell-name {
    font-size: 0.88rem;
    line-height: 1.2;
}
.hah-nghe-native .nghe-cell-dur {
    font-size: 0.62rem;
    color: var(--hah-ink-muted, #5c636a);
    line-height: 1;
}

.hah-nghe-native .nghe-transport-card {
    margin-top: 0;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 10px;
    background: #fff;
    overflow: visible;
}
.hah-nghe-native .nghe-transport {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.hah-nghe-native #hah-nghe-play {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    align-self: center;
    border: 0;
    border-radius: 999px;
    background: var(--hah-brand, #d83030);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.hah-nghe-native #hah-nghe-play:hover {
    background: #b82525;
}
.hah-nghe-native #hah-nghe-play:disabled {
    opacity: 0.6;
    cursor: wait;
}
.hah-nghe-native #hah-nghe-play svg {
    width: 1.35rem;
    height: 1.35rem;
}
.hah-nghe-native .nghe-sliders {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.hah-nghe-native .nghe-tempo-wrap,
.hah-nghe-native .nghe-progress-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}
.hah-nghe-native .nghe-tempo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--hah-ink-muted, #5c636a);
    cursor: pointer;
}
.hah-nghe-native .nghe-tempo-toggle .nghe-ico {
    width: 1.05rem;
    height: 1.05rem;
}
.hah-nghe-native #hah-nghe-bpm-val {
    min-width: 1.8rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: var(--hah-ink, #1a1c1e);
}
.hah-nghe-native .nghe-tempo-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.35rem);
    z-index: 12;
    width: min(14rem, 100%);
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px -10px rgba(26, 28, 30, 0.35);
}
.hah-nghe-native .nghe-tempo-panel[hidden] {
    display: none !important;
}
.hah-nghe-native .nghe-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--hah-ink-muted, #5c636a);
    margin-bottom: 0.15rem;
    font-variant-numeric: tabular-nums;
}
.hah-nghe-native .nghe-range {
    width: 100%;
    height: 0.4rem;
    accent-color: var(--hah-brand, #d83030);
    display: block;
}
.hah-nghe-native .nghe-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--hah-ink-muted, #5c636a);
}
.hah-nghe-native .nghe-genre-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.hah-nghe-native .nghe-genre-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--hah-ink, #1a1c1e);
    cursor: pointer;
}
.hah-nghe-native .nghe-genre-toggle:hover {
    border-color: rgba(var(--hah-brand-rgb, 216, 48, 48), 0.45);
    color: var(--hah-brand, #d83030);
}
.hah-nghe-native .nghe-genre-toggle .label-text {
    color: var(--hah-ink-muted, #5c636a);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hah-nghe-native .nghe-genre-current {
    font-weight: 800;
}
.hah-nghe-native .nghe-select--sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.hah-nghe-native .nghe-select {
    font: inherit;
    color: var(--hah-ink, #1a1c1e);
    background: #fff;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 6px;
    padding: 0.2rem 0.4rem;
    max-width: 9rem;
}
.hah-nghe-native .nghe-genre-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
.hah-nghe-native .nghe-genre-modal[hidden] {
    display: none !important;
}
.hah-nghe-native .nghe-genre-modal-backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(26, 28, 30, 0.45);
    cursor: pointer;
}
.hah-nghe-native .nghe-genre-modal-panel {
    position: relative;
    z-index: 1;
    width: min(36rem, 100%);
    max-height: min(78vh, 34rem);
    display: flex;
    flex-direction: column;
    margin: 0;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -12px 40px -16px rgba(26, 28, 30, 0.45);
}
@media (min-width: 720px) {
    .hah-nghe-native .nghe-genre-modal {
        align-items: center;
        padding: 1.5rem;
    }
    .hah-nghe-native .nghe-genre-modal-panel {
        border-radius: 14px;
        max-height: min(70vh, 32rem);
    }
}
.hah-nghe-native .nghe-genre-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.55rem;
    border-bottom: 1px solid var(--hah-border, #e3e6ea);
}
.hah-nghe-native .nghe-genre-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--hah-ink, #1a1c1e);
}
.hah-nghe-native .nghe-genre-modal-close {
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--hah-surface-muted, #eef1f4);
    color: var(--hah-ink-muted, #5c636a);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.hah-nghe-native .nghe-genre-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.75rem 1rem 1.1rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
@media (min-width: 560px) {
    .hah-nghe-native .nghe-genre-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.hah-nghe-native .nghe-genre-option {
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--hah-border, #e3e6ea);
    border-radius: 8px;
    background: #fff;
    color: var(--hah-ink, #1a1c1e);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}
.hah-nghe-native .nghe-genre-option:hover {
    border-color: rgba(var(--hah-brand-rgb, 216, 48, 48), 0.4);
    color: var(--hah-brand, #d83030);
}
.hah-nghe-native .nghe-genre-option.is-active {
    border-color: var(--hah-brand, #d83030);
    background: rgba(var(--hah-brand-rgb, 216, 48, 48), 0.08);
    color: var(--hah-brand, #d83030);
}
html.hah-nghe-genre-open {
    overflow: hidden;
}
.hah-nghe-native .nghe-mutes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
}
.hah-nghe-native .nghe-mute {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--hah-ink, #1a1c1e);
    cursor: pointer;
}
.hah-nghe-native .nghe-status {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    min-height: 1rem;
    height: auto;
    margin-top: 0.5rem;
}
.hah-nghe-native .nghe-status:empty {
    display: none;
}

@media (max-width: 768px) {
    .hah-nghe-native .nghe-status {
        font-size: 0.68rem;
        margin-top: 0.15rem;
        min-height: 0;
    }
}

html[data-hah-player="native"] .song-nghe-frame {
    display: none;
}

/* Trước Play: ẩn bánh răng + dải sequencer (giống Chơi is-idle). */
#hah-nghe-dock.is-idle #hah-nghe-toolbar {
    display: none;
}

html[data-hah-player="native"][data-song-mode="nghe"] #hah-nghe-dock {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 45;
    box-shadow: 0 -8px 24px -12px rgba(26, 28, 30, 0.28);
}
html[data-hah-player="native"][data-song-mode="nghe"] .site,
html[data-hah-player="native"][data-song-mode="nghe"] #page {
    padding-bottom: calc(var(--hah-native-dock-h, 8rem) + env(safe-area-inset-bottom, 0px));
}
html[data-hah-player="native"][data-song-mode="nghe"] .song-nghe-stage {
    border: 0;
    background: transparent;
    padding: 0;
    gap: 0;
}
html[data-hah-player="native"][data-song-mode="nghe"] .song-nghe-lyrics {
    order: 1;
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
}
