/**
 * File: assets/css/world-ruler.css
 * Version: 7.0.1.17
 * Description: Stylesheet for Princess Keilah Studio
 */

/* =========================================================
   PRINCESS KEILAH STUDIO - RESILIENT NAMESPACE
   ========================================================= */
#tbfbkm-world-ruler {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    pointer-events: none; 
}

#tbfbkm-world-ruler * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#tbfbkm-world-ruler button {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wr-txt);
    transition: all 0.2s;
}

/* =========================================================
   BOTTOM BAR (Expanded State)
   ========================================================= */
#wr-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 64px;
    background: var(--wr-bg-base);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    pointer-events: auto;
    border-radius: 20px 20px 0 0;
    transition: all 0.4s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.wr-bar-group { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    flex: 1; 
}

.wr-bar-left { justify-content: flex-start; }
.wr-bar-center { justify-content: center; }
.wr-bar-right { justify-content: flex-end; }

.wr-icon-btn { 
    font-size: 20px; 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    opacity: 0.7; 
}

.wr-icon-btn:hover { 
    opacity: 1; 
    background: rgba(255,255,255,0.1); 
    color: var(--wr-acc); 
}

.wr-icon-btn.active { 
    opacity: 1; 
    color: var(--wr-acc); 
}

/* =========================================================
   SEEK CIRCLE & PLAY BUTTON
   ========================================================= */
#wr-play-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5); /* Contrast circle behind the button */
    border-radius: 50%;
}

.wr-progress-ring { 
    position: absolute; 
    top: 0; 
    left: 0; 
    transform: rotate(-90deg); 
    pointer-events: none; 
}

.wr-ring-bg { 
    fill: transparent; 
    stroke: rgba(255,255,255,0.15); 
}

.wr-ring-fill { 
    fill: transparent; 
    stroke: var(--wr-acc); 
    stroke-linecap: round; 
    transition: stroke-dashoffset 0.1s linear; 
}

#wr-btn-play {
    width: 38px;
    height: 38px;
    background: transparent; 
    color: #fff;
    border-radius: 50%;
    z-index: 2;
}

#wr-btn-play:hover { 
    transform: scale(1.05); 
    color: var(--wr-acc); 
}

/* =========================================================
   SLIDESHOW PANE
   ========================================================= */
#wr-slideshow-pane {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: calc(100% - 20px);
    max-width: 400px;
    height: 220px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

#wr-slideshow-pane.open { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
    pointer-events: auto; 
}

#wr-slideshow-header {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 8px 15px; 
    color: #fff; 
    z-index: 50; 
    backdrop-filter: blur(4px);
}

#wr-slide-title { 
    font-size: 13px; 
    font-weight: 600; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    max-width: 70%; 
}

.wr-window-controls button { 
    width: 24px; 
    height: 24px; 
    background: rgba(255,255,255,0.2); 
    border-radius: 4px; 
    margin-left: 5px; 
    font-size: 14px; 
}

.wr-window-controls button:hover { 
    background: var(--wr-acc); 
}

/* =========================================================
   VISUALS & VERTICAL PANNING
   ========================================================= */
#wr-visuals { 
    width: 100%; 
    height: 100%; 
    position: relative; 
}

@keyframes wrPanVertical { 
    0% { object-position: 50% 0%; } 
    100% { object-position: 50% 100%; } 
}

.wr-visual-link {
    display: block; 
    width: 100%; 
    height: 100%;
    position: absolute; 
    top: 0; 
    left: 0; 
    opacity: 0; 
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.wr-visual-link.active { 
    opacity: 1; 
    pointer-events: auto; 
}

.wr-visual-link img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: 50% 50%; 
}

.wr-visual-link.active img { 
    animation: wrPanVertical 20s ease-in-out alternate infinite; 
}

/* =========================================================
   NAVIGATION ARROWS (FIXED Z-INDEX)
   ========================================================= */
.wr-slide-nav {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%);
    width: 40px; 
    height: 40px; 
    background: rgba(0,0,0,0.6); 
    color: #fff;
    border-radius: 50%; 
    z-index: 50; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    opacity: 0.8; 
    transition: all 0.2s; 
    cursor: pointer;
    pointer-events: auto; 
}

.wr-slide-nav:hover { 
    opacity: 1; 
    background: var(--wr-acc); 
}

#wr-slide-nav-prev { left: 10px; }
#wr-slide-nav-next { right: 10px; }

/* =========================================================
   PLAYLIST PANE (70% Opacity Overlay)
   ========================================================= */
#wr-playlist-pane {
    position: absolute; 
    bottom: 75px; 
    left: 50%; 
    transform: translateX(-50%) translateY(20px);
    width: calc(100% - 20px); 
    max-width: 400px; 
    height: 220px; 
    background: var(--wr-bg-70);
    backdrop-filter: blur(10px);
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.1); 
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    opacity: 0; 
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    z-index: 60; 
}

#wr-playlist-pane.open { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
    pointer-events: auto; 
}

.wr-pl-item { 
    padding: 12px 15px; 
    font-size: 13px; 
    color: var(--wr-txt); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    cursor: pointer; 
    transition: 0.2s; 
}

.wr-pl-item::before { content: '🎵'; opacity: 0.3; font-size: 10px; }
.wr-pl-item:hover { background: rgba(255,255,255,0.1); }
.wr-pl-item.playing { background: rgba(255,255,255,0.15); color: var(--wr-acc); font-weight: bold; }
.wr-pl-item.playing::before { content: '▶'; opacity: 1; color: var(--wr-acc); }

/* SLEEK DESKTOP SCROLLBAR FOR PLAYLIST */
#wr-playlist-pane::-webkit-scrollbar { width: 6px; }
#wr-playlist-pane::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 6px; margin: 4px; }
#wr-playlist-pane::-webkit-scrollbar-thumb { background: var(--wr-acc); border-radius: 6px; }

/* =========================================================
   MINIMIZED STATE
   ========================================================= */
#wr-btn-restore { 
    display: none !important; 
}

.wr-global-minimized #wr-bottom-bar {
    background: transparent !important; 
    border: none !important; 
    backdrop-filter: none !important;
    box-shadow: none !important; 
    width: auto; 
    right: 20px; 
    left: auto; 
    transform: none; 
    bottom: 20px; 
    padding: 0;
}

.wr-global-minimized .wr-bar-center, 
.wr-global-minimized .wr-bar-right, 
.wr-global-minimized #wr-btn-prev, 
.wr-global-minimized #wr-btn-next { 
    display: none !important; 
}

.wr-global-minimized #wr-btn-restore { 
    display: flex !important; 
    width: 28px; 
    height: 28px; 
    background: rgba(0,0,0,0.7); 
    border-radius: 50%; 
    margin-right: 10px; 
    color: #fff; 
}

.wr-global-minimized #wr-btn-restore:hover { 
    background: var(--wr-acc); 
}

.wr-global-minimized #wr-slideshow-pane, 
.wr-global-minimized #wr-playlist-pane { 
    display: none !important; 
}

/* =========================================================
   RESPONSIVE: MOBILE LANDSCAPE
   ========================================================= */
@media screen and (max-height: 450px) and (orientation: landscape) {
    #wr-slideshow-pane { height: 160px; bottom: 65px; }
    #wr-playlist-pane { height: 160px; bottom: 65px; }
}
