/* ============================================================
   Music Player — Single (حرفه‌ای)
   مسیر: wp-content/themes/bastakmusic/css/music-player.css
   ============================================================ */

/* ==================== کانتینر ==================== */
.single-music-player {
    display: block;
    margin: 20px 0;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

/* ==================== هدر ==================== */
.smp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
    font-weight: 700;
    color: #f5f5f4;
}

.smp-header i {
    color: #dc2626;
    font-size: 16px;
}

/* ==================== بدنه ==================== */
.smp-body {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

/* ==================== کاور + موج ==================== */
.smp-cover-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.smp-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* موج صوتی — روی کاور، فقط در حال پخش */
.smp-wave {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

.single-music-player.is-playing .smp-wave {
    display: flex;
}

.smp-wave span {
    width: 3px;
    border-radius: 999px;
    background: #fff;
    animation: smpWave 0.9s ease-in-out infinite;
}

.smp-wave span:nth-child(1) { height: 12px; animation-delay: 0s;    }
.smp-wave span:nth-child(2) { height: 22px; animation-delay: 0.15s; }
.smp-wave span:nth-child(3) { height: 16px; animation-delay: 0.3s;  }
.smp-wave span:nth-child(4) { height: 24px; animation-delay: 0.45s; }
.smp-wave span:nth-child(5) { height: 14px; animation-delay: 0.6s;  }

@keyframes smpWave {
    0%, 100% { transform: scaleY(0.4); }
    50%      { transform: scaleY(1); }
}

/* ==================== محتوا ==================== */
.smp-content {
    flex: 1;
    min-width: 0;
    direction: rtl;
}

.smp-info {
    margin-bottom: 10px;
}

.smp-title {
    font-size: 14px;
    font-weight: 700;
    color: #f5f5f4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smp-artist {
    font-size: 12px;
    color: #a8a29e;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== نوار پیشرفت ==================== */
.smp-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.smp-time {
    font-size: 11px;
    color: #a8a29e;
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    user-select: none;
}

.smp-seekbar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.smp-seekbar:hover {
    height: 8px;
}

.smp-seek-buffer {
    position: absolute;
    inset: 0;
    width: 0%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.smp-seek {
    position: absolute;
    inset: 0;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #dc2626, #f87171);
    pointer-events: none;
}

.smp-seek-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.smp-seekbar:hover .smp-seek-handle {
    opacity: 1;
}

/* ==================== کنترل‌ها ==================== */
.smp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.smp-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d6d3d1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.smp-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-1px);
}

.smp-btn:active {
    transform: translateY(0);
}

.smp-btn.is-active {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    border-color: rgba(220, 38, 38, 0.4);
}

.smp-badge {
    position: absolute;
    bottom: 1px;
    right: 1px;
    font-size: 8px;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    border-radius: 999px;
    padding: 1px 4px;
    line-height: 1;
    pointer-events: none;
}

/* دکمه پخش اصلی */
.smp-play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smp-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(220, 38, 38, 0.5);
}

.smp-play-btn:active {
    transform: scale(0.97);
}

/* ==================== صدا ==================== */
.smp-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.smp-volume .smp-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

.smp-volume-bar {
    width: 70px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.smp-volume-fill {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #dc2626, #f87171);
    transition: width 0.1s linear;
}

/* ==================== موبایل: مخفی ==================== */
@media (max-width: 1279px) {
    .single-music-player {
        display: none;
    }
}
/* ============================================================
   سکشن پلیر — تمام عرض، آخرین سکشن کانتینر
   ============================================================ */

.hero-col-player-new {
    grid-column: 1 / -1;   /* تمام عرض در گرید */
    width: 100%;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* پلیر داخل این سکشن — بدون کادر و پس‌زمینه اضافی */
.hero-col-player-new .single-music-player {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* لایت مود */
html.theme-mode-light .hero-col-player-new {
    border-top-color: rgba(0, 0, 0, 0.06);
}
.smp-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

.smp-play-btn svg {
    width: 20px;
    height: 20px;
}
/* ============================================================
   پلیر ویدیو — single.php
   ============================================================ */

.single-video-player {
    margin: 0;
    padding: 0;
    background: transparent;
}

/* هدر */
.svp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
    font-weight: 700;
    color: #f5f5f4;
}

.svp-header i {
    color: #dc2626;
    font-size: 16px;
}

.svp-warning {
    font-size: 11px;
    font-weight: 400;
    color: #fbbf24;
    margin-right: auto;
}

.svp-warning a {
    color: #fbbf24;
    text-decoration: underline;
}

/* بدنه ویدیو */
.svp-body {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

.svp-video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
}

/* Fallback برای فرمت‌های پخش‌نشدنی */
.svp-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #a8a29e;
}

.svp-fallback i {
    font-size: 36px;
    color: #dc2626;
}

.svp-fallback p {
    margin: 0;
    font-size: 14px;
}

.svp-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.svp-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
}

/* فوتر اطلاعات */
.svp-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    direction: rtl;
}

.svp-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.svp-title {
    font-size: 14px;
    font-weight: 700;
    color: #f5f5f4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svp-artist {
    font-size: 12px;
    color: #a8a29e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* موبایل */
@media (max-width: 1279px) {
    .single-video-player {
        display: block !important;
    }
    .svp-video {
        border-radius: 0;
    }
    .svp-body {
        border-radius: 12px;
    }
}