/* =========================================== */
/* JANNA AUDIO PLAYER - ABSOLUTE BOTTOM FIX */
/* =========================================== */

/* RESET - Remove all possible spacing */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    position: relative !important;
}

/* Player container - ABSOLUTELY FLUSH */
#janna-audio-player {
    position: fixed !important;
    bottom: 0px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 999999 !important;
    transform: none !important;
    box-sizing: border-box !important;
    /* Visual feedback */
    border: 2px solid red !important;
    background: #1a1a1a !important;
}

/* Make sure it's visible */
#janna-audio-player:not(.janna-player-hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    bottom: 0px !important;
}

/* Hidden state */
#janna-audio-player.janna-player-hidden {
    transform: translateY(100%) !important;
    display: none !important;
}

/* Inner container */
.janna-player-inner {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
    position: relative;
    box-sizing: border-box;
    height: 100%;
    background: #1a1a1a;
}

/* Cover Image */
.janna-cover-container {
    flex-shrink: 0;
    position: relative;
}

.janna-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Track Info */
.janna-track-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.janna-track-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    color: white;
}

.janna-track-artist {
    font-size: 13px;
    color: #bbb;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Progress Bar */
.janna-progress-container {
    width: 100%;
    position: relative;
}

.janna-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.janna-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #2196F3;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    min-width: 0%;
}

.janna-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    font-family: monospace;
}

/* Controls */
.janna-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 10px;
}

.janna-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.janna-control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.janna-control-btn:active {
    transform: scale(0.95);
}

.janna-control-btn svg {
    fill: currentColor;
    display: block;
}

.janna-play-btn {
    background: #2196F3;
    width: 50px;
    height: 50px;
}

.janna-play-btn:hover {
    background: #1976D2;
}

/* Extra Controls */
.janna-extra-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-left: 10px;
}

.janna-volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
}

.janna-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 2px solid #2196F3;
}

.janna-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 2px solid #2196F3;
}

/* Mobile Volume Buttons */
.janna-volume-buttons {
    display: none;
    gap: 5px;
}

.janna-volume-up,
.janna-volume-down {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.janna-volume-up:hover,
.janna-volume-down:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Post Buttons */
.janna-post-buttons {
    margin: 40px 0 20px 0;
    width: 100%;
    clear: both;
}

.janna-buttons-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.janna-post-play-btn,
.janna-post-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 30px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 56px;
    flex: 1;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.janna-post-play-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.janna-post-play-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.janna-post-play-btn:active {
    transform: translateY(0);
}

.janna-post-download-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    border: none;
}

.janna-post-download-btn:hover {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

.janna-post-download-btn:active {
    transform: translateY(0);
}

.janna-post-play-btn svg,
.janna-post-download-btn svg {
    fill: currentColor;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* =========================================== */
/* RESPONSIVE STYLES */
/* =========================================== */

@media (max-width: 1024px) {
    .janna-player-inner {
        padding: 10px 15px;
        gap: 15px;
    }
    
    .janna-cover {
        width: 50px;
        height: 50px;
    }
    
    .janna-control-btn {
        width: 42px;
        height: 42px;
    }
    
    .janna-play-btn {
        width: 46px;
        height: 46px;
    }
    
    .janna-volume-slider {
        width: 70px;
    }
    
    .janna-buttons-container {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    body.janna-player-active {
        padding-bottom: 70px !important;
    }
    
    .janna-player-inner {
        padding: 10px;
        gap: 12px;
        flex-wrap: wrap;
        height: auto;
        min-height: 80px;
    }
    
    .janna-cover-container {
        order: 1;
    }
    
    .janna-track-info {
        order: 2;
        flex: 2;
        min-width: 150px;
    }
    
    .janna-controls {
        order: 3;
        margin-left: auto;
        gap: 8px;
    }
    
    .janna-extra-controls {
        order: 4;
        width: 100%;
        justify-content: space-between;
        margin: 10px 0 0 0;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .janna-volume-slider {
        display: none;
    }
    
    .janna-volume-buttons {
        display: flex;
        align-items: center;
    }
    
    .janna-cover {
        width: 45px;
        height: 45px;
    }
    
    .janna-track-title {
        font-size: 14px;
    }
    
    .janna-track-artist {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .janna-control-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .janna-play-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .janna-buttons-container {
        flex-direction: column;
        gap: 15px;
        max-width: 100%;
    }
    
    .janna-post-play-btn,
    .janna-post-download-btn {
        width: 100%;
        padding: 18px 20px;
        font-size: 17px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    body.janna-player-active {
        padding-bottom: 65px !important;
    }
    
    .janna-player-inner {
        padding: 8px;
        gap: 10px;
        min-height: 75px;
    }
    
    .janna-cover {
        width: 40px;
        height: 40px;
    }
    
    .janna-track-info {
        min-width: 120px;
    }
    
    .janna-track-title {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .janna-track-artist {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .janna-controls {
        gap: 6px;
    }
    
    .janna-control-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
    
    .janna-play-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }
    
    .janna-control-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .janna-play-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .janna-extra-controls {
        gap: 10px;
        padding-top: 8px;
        margin-top: 8px;
    }
    
    .janna-volume-up,
    .janna-volume-down {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    
    .janna-post-play-btn,
    .janna-post-download-btn {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 52px;
    }
    
    .janna-post-play-btn svg,
    .janna-post-download-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* =========================================== */
/* FIX FOR ADMIN BAR */
/* =========================================== */

.admin-bar #janna-audio-player {
    top: auto !important;
}

@media (min-width: 783px) {
    .admin-bar #janna-audio-player {
        top: auto !important;
        bottom: 0px !important;
    }
}

@media (max-width: 782px) {
    .admin-bar #janna-audio-player {
        top: auto !important;
        bottom: 0px !important;
    }
}