/**
 * Voice Box Pro — Public Styles
 *
 * @package Voice_Box
 * @subpackage Voice_Box/public/css
 */

/* ========== Player Wrapper ========== */
.vb-player-wrap {
    all: initial;
    font-family: inherit;
    direction: rtl;
    display: flex;
    flex-direction: column;
    gap: calc(15px * var(--vb-scale, 1));
    background: var(--vb-bg, #ffffff);
    border-radius: calc(16px * var(--vb-scale, 1));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: calc(20px * var(--vb-scale, 1));
    margin: 30px 0;
    border: 1px solid var(--vb-border, #eeeeee);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.vb-player-wrap * {
    box-sizing: border-box;
}

/* ========== Top Section ========== */
.vb-top-section {
    display: flex;
    gap: calc(15px * var(--vb-scale, 1));
    align-items: center;
}

.vb-main-logo {
    flex-shrink: 0;
    display: block;
}

.vb-main-logo img {
    width: calc(var(--vb-logo-size, 40px) * var(--vb-scale, 1));
    height: calc(var(--vb-logo-size, 40px) * var(--vb-scale, 1));
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ========== Info ========== */
.vb-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vb-brand {
    font-size: calc(11px * var(--vb-scale, 1));
    color: var(--vb-text-sub, #888888);
    margin-bottom: calc(4px * var(--vb-scale, 1));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.vb-title {
    font-weight: 700;
    font-size: calc(16px * var(--vb-scale, 1)) !important;
    margin: 0 0 calc(4px * var(--vb-scale, 1)) 0 !important;
    color: var(--vb-text, #333333) !important;
    line-height: 1.3 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.vb-desc {
    font-size: calc(13px * var(--vb-scale, 1)) !important;
    color: var(--vb-text-sub, #888888) !important;
    line-height: 1.4 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Controls Row ========== */
.vb-controls-row {
    display: flex;
    align-items: center;
    gap: calc(12px * var(--vb-scale, 1));
    padding: calc(10px * var(--vb-scale, 1)) calc(15px * var(--vb-scale, 1));
    border-radius: calc(12px * var(--vb-scale, 1));
    width: 100%;
    direction: ltr;
    flex-wrap: nowrap;
    background: var(--vb-ctrl-bg, #f4f4f4);
    transition: background 0.3s;
}

/* Glass Effect */
.vb-glass-enabled .vb-controls-row {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

/* ========== Buttons Reset ========== */
.vb-player-wrap button {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    cursor: pointer;
    line-height: 0 !important;
    min-width: auto !important;
    text-transform: none !important;
    font-family: inherit !important;
}

/* ========== Play Button ========== */
.vb-play-btn {
    width: calc(24px * var(--vb-scale, 1));
    height: calc(24px * var(--vb-scale, 1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vb-icon, #666666) !important;
    flex-shrink: 0;
    transition: color 0.2s;
}

.vb-play-btn:hover {
    color: var(--vb-primary, #4a90e2) !important;
}

.vb-play-btn svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
}

.vb-icon-play,
.vb-icon-pause {
    display: none;
}

.vb-player-wrap.playing .vb-icon-pause {
    display: block;
}

.vb-player-wrap:not(.playing) .vb-icon-play {
    display: block;
}

/* ========== Progress ========== */
.vb-progress-wrap {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: calc(10px * var(--vb-scale, 1));
}

/* Standard Bar */
.vb-progress-container {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.1);
    height: calc(6px * var(--vb-scale, 1));
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.vb-progress-bar {
    background: var(--vb-primary, #4a90e2);
    height: 100%;
    width: 0%;
    border-radius: 10px;
    position: relative;
    transition: width 0.1s linear;
}

/* ========== Waveform ========== */
.vb-wave-wrapper {
    flex-grow: 1;
    height: calc(30px * var(--vb-scale, 1));
    position: relative;
    cursor: pointer;
    direction: ltr;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.vb-wave-base {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.vb-wave-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.vb-wave-inner {
    display: flex;
    align-items: center;
    height: 100%;
}

.vb-wave-bar {
    flex: 1;
    margin: 0 1px;
    border-radius: 2px;
    min-height: 20%;
}

.vb-wave-base .vb-wave-bar {
    background-color: var(--vb-icon, #666666);
    opacity: 0.3;
}

.vb-wave-inner .vb-wave-bar {
    background-color: var(--vb-primary, #4a90e2);
}

/* ========== Time ========== */
.vb-time {
    font-size: calc(11px * var(--vb-scale, 1));
    font-variant-numeric: tabular-nums;
    color: var(--vb-text-sub, #888888);
    min-width: calc(65px * var(--vb-scale, 1));
    text-align: center;
    white-space: nowrap;
}

/* ========== Speed Button ========== */
.vb-speed-btn {
    font-size: calc(12px * var(--vb-scale, 1)) !important;
    font-weight: 700 !important;
    color: var(--vb-icon, #666666) !important;
    min-width: calc(30px * var(--vb-scale, 1)) !important;
    text-align: center;
    transition: color 0.2s;
    margin-left: calc(5px * var(--vb-scale, 1)) !important;
}

.vb-speed-btn:hover {
    color: var(--vb-primary, #4a90e2) !important;
}

/* ========== Volume ========== */
.vb-volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.vb-mute-btn {
    color: var(--vb-icon, #666666) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(24px * var(--vb-scale, 1));
    height: calc(24px * var(--vb-scale, 1));
    transition: color 0.2s;
}

.vb-mute-btn:hover {
    color: var(--vb-primary, #4a90e2) !important;
}

.vb-mute-btn svg {
    width: 100%;
    height: 100%;
}

.vb-vol-icon {
    display: none;
}

.vb-volume-wrap[data-vol="high"] .vb-vol-high {
    display: block;
}

.vb-volume-wrap[data-vol="low"] .vb-vol-low {
    display: block;
}

.vb-volume-wrap[data-vol="mute"] .vb-vol-mute {
    display: block;
}

/* Volume Slider */
.vb-volume-slider {
    -webkit-appearance: none;
    width: calc(70px * var(--vb-scale, 1));
    height: calc(20px * var(--vb-scale, 1));
    background: transparent;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
}

.vb-volume-slider:focus {
    outline: none;
}

.vb-volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    border: none;
}

.vb-volume-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    border: none;
}

.vb-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--vb-primary, #4a90e2);
    cursor: pointer;
    margin-top: -4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.vb-volume-slider::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border: none;
    border-radius: 50%;
    background: var(--vb-primary, #4a90e2);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.vb-volume-slider:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* ========== Download ========== */
.vb-download-btn {
    color: var(--vb-icon, #666666) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 0 calc(5px * var(--vb-scale, 1));
    border-left: 1px solid var(--vb-border, #eeeeee);
    margin-left: calc(5px * var(--vb-scale, 1));
    transition: color 0.2s;
    background: none !important;
    box-shadow: none !important;
}

.vb-download-btn:hover {
    color: var(--vb-primary, #4a90e2) !important;
}

.vb-download-btn svg {
    width: calc(22px * var(--vb-scale, 1));
    height: calc(22px * var(--vb-scale, 1));
}

/* ========== Responsive ========== */
@media (max-width: 600px) {
    .vb-controls-row {
        flex-wrap: wrap;
        row-gap: 15px;
    }

    .vb-progress-wrap {
        order: 1;
        width: 100%;
        margin-top: 0;
    }

    .vb-play-btn {
        order: 2;
    }

    .vb-volume-wrap {
        order: 3;
        display: flex !important;
        margin-left: auto !important;
    }

    .vb-volume-slider {
        width: calc(50px * var(--vb-scale, 1));
    }

    .vb-speed-btn {
        order: 4;
        margin: 0 8px !important;
    }

    .vb-download-btn {
        order: 5;
        margin-left: 0 !important;
        border-left: 1px solid var(--vb-border, #eeeeee);
        padding-left: 8px;
    }
}