/* Audio List */
.dap-playlist-wrapper {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 20px;
}

.dap-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e0e0e0;
}

.dap-audio-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.dap-audio-item:hover {
    background: #e8f4f8;
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.dap-audio-item.dap-active {
    background: #d4edfa;
    border-color: #667eea;
}

.dap-audio-item.dap-playing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dap-audio-item.dap-playing .dap-audio-title,
.dap-audio-item.dap-playing .dap-audio-description,
.dap-audio-item.dap-playing .dap-audio-duration {
    color: white;
}

.dap-play-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.dap-audio-item:hover .dap-play-icon {
    transform: scale(1.1);
}

.dap-audio-item.dap-playing .dap-play-icon {
    background: white;
    color: #667eea;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.dap-play-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.dap-audio-thumbnail {
    width: 90px;
    height: 90px;
    min-width: 90px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.dap-audio-content {
    flex: 1;
    min-width: 0;
}

.dap-audio-title {
    font-size: 19px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.dap-audio-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.dap-audio-duration {
    font-size: 15px;
    color: #999;
    font-weight: 600;
    font-family: monospace;
}

/* Fixed Bottom Player */
.dap-fixed-player-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #073b4c;
    /* Deep Teal/Dark Blue */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    color: #fff;
    animation: slideUp 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dap-player-content-bottom {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
}

/* Left Section: Controls + Progress */
.dap-player-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 70%;
}

.dap-play-pause-bottom {
    background: none !important;
    border: none !important;
    color: #fff !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.dap-play-pause-bottom:hover {
    transform: scale(1.1);
}

.dap-play-pause-bottom .dashicons {
    font-size: 28px !important;
    width: 28px !important;
    height: 28px !important;
}

.dap-time-info-bottom {
    font-family: monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    min-width: 80px;
}

.dap-progress-container-bottom {
    flex: 1;
    height: 20px;
    /* Click area */
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0 15px;
}

.dap-progress-bar-bottom {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.dap-progress-bar-bottom:hover {
    height: 8px;
    /* Slightly larger on hover */
}

.dap-progress-fill-bottom {
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

/* Volume Control - Vertical Upwards */
.dap-volume-control-bottom {
    display: flex;
    align-items: center;
    position: relative;
    /* Anchor for absolute slider */
    cursor: pointer;
    justify-content: center;
    width: 30px;
    /* Fixed width for stability */
    height: 30px;
}

.dap-volume-control-bottom .fa-volume-high {
    font-size: 20px;
    color: inherit;
}

.dap-volume-slider-wrapper {
    position: absolute;
    bottom: 30px;
    /* Above the icon */
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    /* Fix: Increased from 4px to fit thumb & hit area */
    height: 130px;
    background: #FFFFFF;
    border-radius: 15px;
    display: flex;
    /* Flex to center the rotated input */
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    padding: 10px 0;
    z-index: 10000;
    direction: ltr;
    /* Fix: Ensure slider runs Left-to-Right (Bottom-to-Top when rotated) */
}

/* Hover on Icon OR Wrapper keeps it visible */
.dap-volume-control-bottom:hover .dap-volume-slider-wrapper,
.dap-volume-slider-wrapper:hover {
    opacity: 1;
    visibility: visible;
    bottom: 35px;
    /* Slight lift animation */
}

/* Rotated Range Input - Enhanced Specificity */
.dap-volume-control-bottom .dap-volume-slider-bottom,
input.dap-volume-slider-bottom[type="range"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 110px !important;
    height: 10px !important;
    background: linear-gradient(to right, #073b4c 0%, #00bcd4 100%) !important;
    border: none !important;
    border-radius: 5px !important;
    transform: rotate(-90deg) !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Webkit Thumb (Chrome, Safari, Edge) */
.dap-volume-control-bottom .dap-volume-slider-bottom::-webkit-slider-thumb,
input.dap-volume-slider-bottom[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    background: #ffffff !important;
    border: 3px solid #00bcd4 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s ease !important;
}

.dap-volume-control-bottom .dap-volume-slider-bottom::-webkit-slider-thumb:hover,
input.dap-volume-slider-bottom[type="range"]::-webkit-slider-thumb:hover {
    background: #00bcd4 !important;
    transform: scale(1.1) !important;
}

/* Firefox Thumb */
.dap-volume-control-bottom .dap-volume-slider-bottom::-moz-range-thumb,
input.dap-volume-slider-bottom[type="range"]::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    background: #ffffff !important;
    border: 3px solid #00bcd4 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s ease !important;
}

.dap-volume-control-bottom .dap-volume-slider-bottom::-moz-range-thumb:hover,
input.dap-volume-slider-bottom[type="range"]::-moz-range-thumb:hover {
    background: #00bcd4 !important;
    transform: scale(1.1) !important;
}

/* Firefox Track */
.dap-volume-control-bottom .dap-volume-slider-bottom::-moz-range-track,
input.dap-volume-slider-bottom[type="range"]::-moz-range-track {
    background: linear-gradient(to right, #073b4c 0%, #00bcd4 100%) !important;
    border: none !important;
    border-radius: 5px !important;
    height: 10px !important;
}

/* Menu Button */
.dap-menu-btn-bottom {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 5px;
    /* Match volume padding/sizing effectively */
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.dap-menu-btn-bottom:hover {
    opacity: 1;
    background-color: transparent;
    /* Removed background and border-radius as requested */
}

.dap-menu-btn-bottom .fa-ellipsis-vertical {
    font-size: 20px;
    /* Match volume icon size */
}

/* Ensure controls are grouped and aligned */
.dap-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Space between Volume and Menu */
}

/* Options Popover */
.dap-options-menu-container {
    position: relative;
}

.dap-options-popover {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    margin-bottom: 10px;
    z-index: 10000;
    overflow: hidden;
    animation: dapFadeIn 0.2s ease;
}

.dap-options-popover a,
.dap-options-popover button {
    display: block;
    width: 100%;
    padding: 12px 15px;
    text-align: left;
    background: none;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    transition: background 0.2s;
}

.dap-options-popover a:hover,
.dap-options-popover button:hover {
    background: #f8f9fa;
}

.dap-options-popover a:last-child,
.dap-options-popover button:last-child {
    border-bottom: none;
}

.dap-options-popover .dashicons {
    margin-right: 8px;
    font-size: 18px;
    vertical-align: middle;
}

@keyframes dapFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Right Side - Info */
.dap-player-right {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 250px;
    justify-content: flex-end;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
    margin-left: 15px;
}

.dap-current-info-bottom {
    text-align: right;
    overflow: hidden;
}

.dap-current-title-bottom {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.dap-current-description-bottom {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dap-current-thumbnail-bottom {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .dap-player-content-bottom {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }

    .dap-player-left {
        width: 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }

    .dap-player-left .dap-progress-bar-bottom {
        border-radius: 0;
        background: rgba(255, 255, 255, 0.1);
    }

    .dap-player-right {
        width: 100%;
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        justify-content: space-between;
        /* Info left, Image right */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 10px;
    }

    .dap-current-info-bottom {
        text-align: left;
        flex: 1;
        margin-right: 15px;
    }

    .dap-current-thumbnail-bottom {
        width: 40px;
        height: 40px;
    }

    .dap-controls-right {
        /* On mobile, maybe hide volume/menu or adjust? */
        /* For now, keep them but ensuring they don't break layout */
        margin-left: auto;
    }

    .dap-volume-control-bottom .dashicons,
    .dap-menu-btn-bottom .dashicons {
        font-size: 20px;
    }
}