/* Fixed bottom audio player — two-row layout with filter pills */
:root {
    --audio-player-bg: #1a1a2e;
    --audio-player-accent: #c8960c;
    --audio-player-text: #ffffff;
    --audio-player-muted: rgba(255, 255, 255, 0.65);
    --audio-player-pill-bg: rgba(255, 255, 255, 0.08);
    --audio-player-pill-border: rgba(255, 255, 255, 0.18);
    --audio-player-height: 118px;
    --audio-player-height-mobile: 168px;
}

#getayataudio {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    pointer-events: none;
}

#getayataudio .audio-player {
    pointer-events: auto;
    position: relative;
}

body:has(#getayataudio .audio-player:not(.is_hidden)) {
    padding-bottom: var(--audio-player-height);
}

#getayataudio .audio-player {
    background: linear-gradient(180deg, #222244 0%, var(--audio-player-bg) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#getayataudio .audio-player.is_hidden {
    transform: translateY(calc(100% - 36px));
}

#getayataudio .hide_player {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 2;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--audio-player-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
}

#getayataudio .hide_player:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
}

#getayataudio .jp-interface {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 28px 12px 10px;
    min-height: var(--audio-player-height);
    box-sizing: border-box;
}

#getayataudio .jp-interface-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    width: 100%;
}

#getayataudio .jp-interface-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#getayataudio .jp-filter-pill,
#getayataudio .jp-filter-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--audio-player-pill-border);
    background: var(--audio-player-pill-bg);
    color: var(--audio-player-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

#getayataudio .jp-filter-pill:hover,
#getayataudio .jp-filter-pill-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}

#getayataudio .jp-filter-pill.active,
#getayataudio .jp-filter-pill-btn.active,
#getayataudio .jp-show-playlist.playlist-is-visible,
#getayataudio .jp-repeat.repeat-on {
    background: rgba(200, 150, 12, 0.22);
    border-color: var(--audio-player-accent);
    color: #fff;
}

#getayataudio .jp-filter-pill-btn {
    border: 1px solid var(--audio-player-pill-border);
    background: var(--audio-player-pill-bg);
}

#getayataudio .jp-filter-pill-btn.jp-hifz-mode-btn.active {
    background: rgba(255, 85, 0, 0.22);
    border-color: #ff5500;
    color: #ff5500;
}

#getayataudio .jp-filter-pill select.speed-select,
#getayataudio select.speed-select.jp-filter-speed {
    appearance: none;
    -webkit-appearance: none;
    min-height: 34px;
    padding: 0 28px 0 14px;
    margin: 0;
    border-radius: 999px;
    border: 1px solid var(--audio-player-pill-border);
    background: var(--audio-player-pill-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

#getayataudio select.speed-select.jp-filter-speed option {
    color: #111;
    background: #fff;
}

#getayataudio .jp-filter-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
}

#getayataudio .jp-controls {
    flex: 0 0 auto;
}

#getayataudio .jp-progress-container {
    flex: 1 1 180px;
    min-width: 120px;
}

#getayataudio .jp-now-playing {
    flex: 1 1 140px;
    min-width: 100px;
    overflow: hidden;
}

#getayataudio .jp-track-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#getayataudio .jp-artist-name {
    font-size: 11px;
    color: var(--audio-player-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#getayataudio .jp-volume-controls {
    flex: 0 0 auto;
}

#getayataudio .jp-toggles {
    display: none;
}

/* Ayat row action bar — play on top, filter pills below on mobile */
.ayat-action-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 6px;
}

.ayat-action-primary,
.ayat-action-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ayat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #f5f5f5;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.ayat-pill:hover {
    background: #ebebeb;
    border-color: rgba(0, 0, 0, 0.18);
}

.ayat-pill-play {
    background: linear-gradient(135deg, #c8960c 0%, #a67c00 100%);
    border-color: #a67c00;
    color: #fff;
    min-width: 110px;
}

.ayat-pill-play:hover {
    background: linear-gradient(135deg, #d4a017 0%, #b8890a 100%);
    color: #fff;
}

.ayat-pill-play .fa {
    font-size: 14px;
}

.ayat-pill-bookmark.active,
.ayat-pill-bookmark.bookmarked {
    background: rgba(200, 150, 12, 0.15);
    border-color: #c8960c;
    color: #a67c00;
}

.ayat-pill-hifz.active,
.ayat-pill-hifz.memorized,
.ayat-pill-hifz.hifz-marked {
    background: rgba(34, 139, 34, 0.12);
    border-color: #228b22;
    color: #228b22;
}

.ayat-pill-label {
    white-space: nowrap;
}

@media (max-width: 767px) {
    :root {
        --audio-player-height: var(--audio-player-height-mobile);
    }

    body:has(#getayataudio .audio-player:not(.is_hidden)) {
        padding-bottom: var(--audio-player-height-mobile);
    }

    #getayataudio .jp-interface {
        min-height: var(--audio-player-height-mobile);
        padding: 30px 10px 12px;
    }

    #getayataudio .jp-interface-main {
        flex-wrap: nowrap;
    }

    #getayataudio .jp-progress-container {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
    }

    #getayataudio .jp-now-playing {
        order: 4;
        flex: 1 1 100%;
        width: 100%;
        text-align: center;
    }

    #getayataudio .jp-volume-controls {
        display: none;
    }

    #getayataudio .jp-interface-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    #getayataudio .jp-interface-filters::-webkit-scrollbar {
        display: none;
    }

    #getayataudio .jp-filter-pill,
    #getayataudio .jp-filter-pill-btn,
    #getayataudio select.speed-select.jp-filter-speed {
        flex: 0 0 auto;
    }

    .ayat-action-primary {
        width: 100%;
    }

    .ayat-pill-play {
        width: 100%;
        justify-content: center;
    }

    .ayat-action-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .ayat-action-filters::-webkit-scrollbar {
        display: none;
    }

    .ayat-action-filters .ayat-pill {
        flex: 0 0 auto;
    }
}

html.dark-mode .ayat-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #e8e8e8;
}

html.dark-mode .ayat-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

html.dark-mode .ayat-pill-play {
    background: linear-gradient(135deg, #c8960c 0%, #8a6500 100%);
    border-color: #c8960c;
    color: #fff;
}

html.dark-mode #getayataudio .audio-player {
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    border-top-color: rgba(255, 255, 255, 0.08);
}
