/* تنظیمات پلیر داخلی */
.mrp-container {
    display: flex; align-items: center; direction: rtl; gap: 12px;
    width: 100%; background: #ffffff; padding: 12px 16px;
    border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #f4f4f5; 
    font-family: inherit;
    box-sizing: border-box;
}

/* دکمه پخش پلیر داخلی - دایره ای کامل */
.mrp-btn {
    background: #f32b47 !important; 
    border: none !important; 
    cursor: pointer !important; 
    display: flex !important;
    align-items: center !important; 
    justify-content: center !important; 
    color: #ffffff !important; 
    padding: 0 !important;
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    transition: background-color 0.2s ease !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    
    /* حذف استایل های مزاحم مرورگرهای موبایل */
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* برای جلوگیری از گیر کردن هاور در موبایل، هاور فقط در دسکتاپ اعمال شود */
@media (hover: hover) {
    .mrp-btn:hover { background-color: #f39e2b !important; }
}

.mrp-icon { width: 24px; height: 24px; }

.mrp-time {
    font-size: 12px; font-weight: 500; color: #a1a1aa; min-width: 38px;
    text-align: center; user-select: none; font-variant-numeric: tabular-nums;
}
.mrp-progress-wrapper { flex-grow: 1; display: flex; align-items: center; height: 20px; cursor: pointer; }
.mrp-progress {
    width: 100%; -webkit-appearance: none; appearance: none; height: 10px;
    background: #f4f4f5; border-radius: 3px; outline: none; direction: rtl; margin: 0;
    --progress-fill: 0%; background-image: linear-gradient(to left, #18181b, #18181b);
    background-size: var(--progress-fill) 100%; background-repeat: no-repeat; background-position: right center;
}
.mrp-progress::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 0; height: 0; opacity: 0; }
.mrp-progress::-moz-range-thumb { width: 0; height: 0; opacity: 0; border: none; }

/* تنظیمات پلیر چسبان (Sticky Player) */
.mrp-sticky-player {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(150px);
    width: 550px; height: 80px; background: #ffffff;
    border-radius: 15px; box-shadow: 0 4px 25px rgba(0,0,0,0.15);
    display: flex; align-items: center; padding: 0 15px; gap: 12px;
    box-sizing: border-box; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 99999; 
    font-family: inherit;
    border: 1px solid #eaeaea; opacity: 0; visibility: hidden;
}
.mrp-sticky-player.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

.mrp-sp-cover { flex-shrink: 0; width: 60px; height: 60px; }
.mrp-sp-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 15px; display: block; }

.mrp-sp-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.mrp-sp-title { font-size: 16px; font-weight: bold; color: #18181b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;}
.mrp-sp-artist { font-size: 13px; color: #71717a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mrp-sp-controls { display: flex; align-items: center; gap: 10px; }

/* دکمه‌های کنترل پلیر چسبان - دایره ای کامل */
.mrp-sp-btn {
    background: #f32b47 !important; 
    border: none !important; 
    cursor: pointer !important; 
    color: #ffffff !important;
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s ease !important;
    flex-shrink: 0 !important;
    
    /* حذف استایل های مزاحم مرورگرهای موبایل */
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

@media (hover: hover) {
    .mrp-sp-btn:hover { background: #f39e2b !important; }
}

.mrp-sp-btn svg { width: 24px !important; height: 24px !important; }

/* دکمه Play/Pause اختصاصی پلیر چسبان - دایره ای کامل */
.mrp-sp-play-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
}
.mrp-sp-play-btn svg { width: 30px !important; height: 30px !important; }

/* دکمه بستن پلیر چسبان - دایره ای کامل و ثابت در تمامی رزولوشن‌ها */
.mrp-sp-close {
    background: #f4f4f5 !important;
    color: #18181b !important;
    border: none !important; 
    border-radius: 50% !important; 
    width: 28px !important; 
    height: 28px !important;
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    cursor: pointer !important; 
    margin-right: 8px !important; 
    flex-shrink: 0 !important;
    padding: 0 !important;
    outline: none !important;
    box-sizing: border-box !important;
    
    /* حذف استایل های مزاحم مرورگرهای موبایل */
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

@media (hover: hover) {
    .mrp-sp-close:hover, .mrp-sp-close:focus {
        background: #e4e4e7 !important;
        color: #18181b !important;
        box-shadow: none !important;
    }
}

/* استایل اجباری و دقیق ضربدر (X) برای جلوگیری از تداخل استایل‌های قالب */
.mrp-sp-close svg { 
    width: 14px !important; 
    height: 14px !important; 
    display: block !important;
}
.mrp-sp-close svg path {
    stroke: #18181b !important; /* رنگ ضربدر */
    stroke-width: 2.5px !important; /* ضخامت ضربدر */
    fill: none !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* نسخه موبایل */
@media (max-width: 768px) {
    .mrp-container { padding: 10px 12px; gap: 8px; }
    
    /* بازنویسی اجباری استایل و رنگ دکمه ها برای موبایل */
    .mrp-btn { 
        width: 36px !important; 
        height: 36px !important; 
        border-radius: 50% !important; 
        background: #f32b47 !important; /* اعمال اجباری رنگ پس زمینه در موبایل */
        color: #ffffff !important; /* اعمال اجباری رنگ آیکون در موبایل */
    }
    .mrp-icon { width: 20px; height: 20px; }
    .mrp-time { font-size: 11px; min-width: 34px; }
    
    .mrp-sticky-player { 
        width: calc(100% - 30px) !important; 
        max-width: 385px !important; 
        bottom: 15px !important; 
        height: 65px !important; 
        padding: 0 10px !important; 
        gap: 10px !important; 
    }
    .mrp-sp-cover { width: 48px; height: 48px; }
    .mrp-sp-title { font-size: 13px; margin-bottom: 2px; }
    .mrp-sp-artist { font-size: 11px; }
}
