/* پلیر درون صفحه */
.bolbol-in-page-player {
    display: flex;
    flex-direction: row; 
    direction: var(--bb-dir);
    align-items: center;
    background: var(--bb-bg);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    gap: 15px;
    max-width: 400px;
}

.bb-cover {
    width: 50px;
    height: 50px;
    border-radius: var(--bb-cover-radius) !important;
    object-fit: cover;
    flex-shrink: 0;
}

.bb-title {
    flex-grow: 1;
    color: var(--bb-text);
    font-weight: normal;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: start;
}

/* دکمه‌های کنترل مدیا (پلیر درون صفحه و چسبان) */
.bb-play-btn, 
#bolbol-sticky-player .bb-controls button {
    background: var(--bb-btn);
    border: none;
    border-radius: var(--bb-radius) !important;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.bb-play-btn svg, 
#bolbol-sticky-player .bb-controls button svg {
    width: var(--bb-icon-size);
    height: var(--bb-icon-size);
    fill: var(--bb-icon-color);
    display: block;
}

.bb-play-btn:hover, 
#bolbol-sticky-player .bb-controls button:hover {
    background: var(--bb-btn-hover);
    transform: scale(1.05);
}

/* دکمه بستن سفارشی شده */
#bb-close {
    background: var(--bb-close-bg);
    border: none;
    border-radius: var(--bb-close-radius) !important;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

#bb-close svg {
    width: var(--bb-close-size);
    height: var(--bb-close-size);
    fill: var(--bb-close-icon);
}

/* پلیر چسبان سرتاسری */
#bolbol-sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bb-sticky-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -5px 25px rgba(0,0,0,0.08);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    padding: 15px 0;
    direction: var(--bb-dir);
}

#bolbol-sticky-player.bolbol-hidden {
    transform: translateY(120%);
}

.bb-sticky-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 var(--bb-sticky-padding-x);
    position: relative;
}

.bb-sticky-title-wrap {
    flex-shrink: 0;
    max-width: 250px;
}

.bb-sticky-title {
    color: var(--bb-text);
    font-weight: bold;
    word-break: break-word; 
    font-size: 14px;
    text-align: start;
}

.bb-controls {
    display: flex;
    flex-direction: row;
    gap: 12px;
    direction: ltr; 
}

/* نوار پیمایش و زمان */
.bb-progress-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    direction: var(--bb-dir);
    width: 100%;
}

.bb-progress-container {
    flex-grow: 1;
    height: 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    width: 100%;
    overflow: hidden;
}

#bb-progress-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    height: 100%;
    width: 0%;
    background: var(--bb-progress);
    border-radius: 4px;
    transition: width 0.1s linear;
}

#bb-current-time, #bb-duration {
    color: var(--bb-text);
    font-size: 13px;
    flex-shrink: 0;
    font-family: monospace;
}

/* ریسپانسیو پلیر چسبان برای موبایل و تبلت */
@media (max-width: 768px) {
    .bb-play-btn, 
    #bolbol-sticky-player .bb-controls button {
        border-radius: var(--bb-mobile-radius) !important;
    }
    
    .bb-play-btn svg, 
    #bolbol-sticky-player .bb-controls button svg {
        width: var(--bb-mobile-icon-size);
        height: var(--bb-mobile-icon-size);
    }
    
    .bb-sticky-inner {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }
    
    .bb-sticky-title-wrap {
        order: 1;
        max-width: 85%;
        width: 100%;
        text-align: center;
    }
    
    .bb-sticky-title {
        text-align: center;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .bb-controls {
        order: 2;
        margin: 0 auto;
    }
    
    .bb-progress-wrapper {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    /* بازگرداندن موقعیت برای موبایل */
    #bb-close {
        position: absolute;
        top: 10px;
        inset-inline-end: 15px;
    }
}
