/**
 * Compact Premium Audio Player Design (2026 Edition)
 * خليج أونلاين Theme - Mini Player
 */

:root {
    --player-bg: #ffffff;
    --player-bg-gradient: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --player-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --player-text: #1a1a1a;
    --player-text-muted: #6b7280;
    --player-accent: #df8c30;
    --player-accent-light: rgba(223, 140, 48, 0.1);
}

/* =====================================================
   COMPACT PLAYER CONTAINER
   ===================================================== */
#nexus-modern-player {
    background: var(--player-bg-gradient);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 24px 0;
    box-shadow: var(--player-shadow);
    color: var(--player-text);
    font-family: inherit;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 100%;
}

#nexus-modern-player:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.player-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* =====================================================
   PLAY BUTTON - MAIN
   ===================================================== */
.main-play-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--player-accent);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 4px 12px rgba(223, 140, 48, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.main-play-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: 50%;
}

.main-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(223, 140, 48, 0.45);
}

.main-play-btn:active {
    transform: scale(0.95);
}

.main-play-btn svg {
    width: 20px;
    height: 20px;
}

.main-play-btn .icon-play {
    margin-left: 2px;
}

/* =====================================================
   CONTENT AREA
   ===================================================== */
.player-content-area {
    flex: 1;
    min-width: 0;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.player-title-box h3 {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--player-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-title-box h3::before {
    content: '🎧';
    font-size: 16px;
}

.article-title {
    display: none;
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.player-prog-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-row {
    display: contents;
}

.curr-time,
.total-time {
    font-size: 11px;
    font-weight: 600;
    color: var(--player-text-muted);
    min-width: 35px;
    font-variant-numeric: tabular-nums;
}

.curr-time {
    text-align: right;
}

.total-time {
    text-align: left;
}

.prog-bar-container {
    flex: 1;
    position: relative;
    height: 6px;
    background: var(--player-accent-light);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.prog-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.prog-fill {
    height: 100%;
    background: var(--player-accent);
    width: 0%;
    border-radius: 10px;
    transition: width 0.1s linear;
    position: relative;
}

.prog-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--player-accent);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(223, 140, 48, 0.4);
    opacity: 0;
    transition: opacity 0.2s;
}

.prog-bar-container:hover .prog-fill::after {
    opacity: 1;
}

/* =====================================================
   CONTROLS - MINI
   ===================================================== */
.player-controls-mini {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--player-text-muted);
    transition: all 0.2s;
}

.ctrl-btn:hover {
    background: var(--player-accent-light);
    color: var(--player-accent);
}

.ctrl-btn svg {
    width: 16px;
    height: 16px;
}

.ctrl-btn .btn-lbl {
    display: none;
}

.speed-btn {
    background: var(--player-accent-light);
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--player-accent);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 36px;
}

.speed-btn:hover {
    background: var(--player-accent);
    color: #fff;
}

/* Hide unused elements in compact mode */
.player-icon-box,
.player-speed-control {
    display: none;
}

/* =====================================================
   DARK MODE
   ===================================================== */
body.dark-mode #nexus-modern-player,
body.dark-scheme #nexus-modern-player,
body[data-theme="dark"] #nexus-modern-player,
.dark-mode #nexus-modern-player,
[data-theme="dark"] #nexus-modern-player,
html.dark #nexus-modern-player,
html.dark-mode #nexus-modern-player {
    --player-bg-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --player-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --player-text: #e2e8f0;
    --player-text-muted: #94a3b8;
    --player-accent-light: rgba(223, 140, 48, 0.15);
    background: var(--player-bg-gradient) !important;
    border-color: rgba(255, 255, 255, 0.05);
}

/* =====================================================
   RTL SUPPORT
   ===================================================== */
.is-rtl .player-inner {
    flex-direction: row-reverse;
}

.is-rtl .player-header {
    flex-direction: row-reverse;
}

.is-rtl .player-prog-section {
    flex-direction: row-reverse;
}

.is-rtl .curr-time {
    text-align: left;
}

.is-rtl .total-time {
    text-align: right;
}

.is-rtl .prog-fill {
    left: auto;
    right: 0;
}

.is-rtl .prog-fill::after {
    right: auto;
    left: 0;
}

.is-rtl .main-play-btn .icon-play {
    margin-left: 0;
    margin-right: 2px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 480px) {
    #nexus-modern-player {
        padding: 12px 16px;
    }

    .player-inner {
        gap: 12px;
    }

    .main-play-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .main-play-btn svg {
        width: 18px;
        height: 18px;
    }

    .player-title-box h3 {
        font-size: 13px !important;
    }

    .ctrl-btn {
        width: 28px;
        height: 28px;
    }

    .ctrl-btn svg {
        width: 14px;
        height: 14px;
    }
}