/* PANDAWA STUDIO - SIDEBAR LAYOUT REPAIR
   Loaded after legacy checkout styles. Scoped to checkout/order sidebars only. */
#guestSidebar,
aside#guestSidebar.guest-sidebar,
aside#guestSidebar.sidebar {
    box-sizing: border-box !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex: 0 0 280px !important;
    min-height: 100vh !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    scrollbar-gutter: auto !important;
    -webkit-overflow-scrolling: touch;
    position: sticky !important;
    top: 0 !important;
    align-self: flex-start !important;
    padding: 25px 13px !important;
    z-index: 30;
}
#guestSidebar *,
#guestSidebar *::before,
#guestSidebar *::after { box-sizing: border-box; }

.guest-layout,
.layout {
    display: flex !important;
    align-items: flex-start !important;
    min-height: 100vh;
}
.guest-content,
.layout > .main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}
/* Logo dan profil lama dibersihkan; gunakan standar global di bawah */
#guestSidebar .guest-nav,
#guestSidebar nav.nav {
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
}
#guestSidebar .guest-nav-label {
    display:block !important;
    width:100% !important;
    min-height:0 !important;
    margin:17px 0 6px !important;
    padding:0 12px !important;
    color:#496cf0 !important;
    font-size:10px !important;
    font-weight:750 !important;
    line-height:1.35 !important;
    letter-spacing:.35px !important;
    white-space:normal !important;
}
#guestSidebar .guest-nav a,
#guestSidebar .guest-nav > form > button {
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:12px !important;
    width:100% !important;
    min-width:0 !important;
    min-height:43px !important;
    height:auto !important;
    margin:0 !important;
    padding:10px 12px !important;
    border:0 !important;
    border-radius:9px !important;
    font-family:inherit !important;
    font-size:13px !important;
    font-weight:600 !important;
    line-height:1.35 !important;
    letter-spacing:0 !important;
    text-align:left !important;
    white-space:normal !important;
    text-decoration:none !important;
}
#guestSidebar .guest-nav a > svg,
#guestSidebar .guest-nav a > i,
#guestSidebar .guest-nav > form > button > svg,
#guestSidebar .guest-nav > form > button > i {
    display:block !important;
    flex:0 0 18px !important;
    width:18px !important;
    min-width:18px !important;
    max-width:18px !important;
    height:18px !important;
    min-height:18px !important;
    margin:0 !important;
    padding:0 !important;
    stroke:currentColor !important;
    fill:none !important;
    stroke-width:1.8 !important;
    opacity:1 !important;
    visibility:visible !important;
}
#guestSidebar .guest-nav a > span,
#guestSidebar .guest-nav > form > button > span {
    display:block !important;
    flex:1 1 auto !important;
    min-width:0 !important;
    overflow-wrap:anywhere;
}
#guestSidebar .guest-nav a:hover,
#guestSidebar .guest-nav a.active { background:#edf3ff !important; color:#376cf2 !important; }
#guestSidebar .guest-nav a.active { font-weight:700 !important; }
#guestSidebar .guest-nav a > *,
#guestSidebar .guest-nav > form > button > * { align-self:center !important; }
#guestSidebar .guest-nav .guest-nav-section { margin-top:17px !important; }

/* Responsif lama dihapus; menggunakan standar max-width: 991px */
body.dark-only #guestSidebar .guest-nav-label { color:#9bb5ff !important; }

/* =========================================================
   PANDAWA GUEST GLOBAL
   Standar visual mengikuti halaman /layanan
   ========================================================= */

/* Area logo */
#guestSidebar > .logo-wrapper,
#guestSidebar > .logo-icon-wrapper,
#guestSidebar > .morden-logo,
#guestSidebar > .brand,
#guestSidebar > .guest-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: calc(100% - 24px) !important;
    min-height: 76px !important;
    height: 76px !important;
    margin: 0 12px 12px !important;
    padding: 8px 10px !important;
}

#guestSidebar > .logo-wrapper > a,
#guestSidebar > .logo-icon-wrapper > a,
#guestSidebar > .morden-logo > a,
#guestSidebar > .brand > a,
#guestSidebar > .guest-brand > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

#guestSidebar > .logo-wrapper img,
#guestSidebar > .logo-icon-wrapper img,
#guestSidebar > .morden-logo img,
#guestSidebar > .brand img,
#guestSidebar > .guest-brand img {
    display: block !important;
    width: 100% !important;
    max-width: 190px !important;
    height: 54px !important;
    max-height: 54px !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Geometri kartu profil /layanan */
#guestSidebar .studio-sidebar-profile {
    box-sizing: border-box !important;
    width: calc(100% - 24px) !important;
    margin: 14px 12px 20px !important;
    padding: 14px !important;
    background: #f4f6f9 !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 12px !important;
}

#guestSidebar .studio-profile-top {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

#guestSidebar .studio-profile-avatar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: #e5edff !important;
    color: #477cff !important;
    font: 700 15px Inter, Arial, sans-serif !important;
}

#guestSidebar .studio-profile-info {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    overflow: hidden !important;
    line-height: 1.4 !important;
}

#guestSidebar .studio-profile-info strong,
#guestSidebar .studio-profile-info small {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#guestSidebar .studio-profile-info strong {
    color: #252a35 !important;
    font: 600 13px/1.4 Inter, Arial, sans-serif !important;
}

#guestSidebar .studio-profile-info small {
    color: #7b8494 !important;
    font: 500 11px/1.4 Inter, Arial, sans-serif !important;
}

#guestSidebar .studio-profile-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    margin-left: auto !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #687386 !important;
}

#guestSidebar .studio-profile-toggle svg {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
}

#guestSidebar .studio-profile-actions[hidden] {
    display: none !important;
}

#guestSidebar .studio-profile-actions:not([hidden]) {
    display: block !important;
    margin-top: 10px !important;
}

#guestSidebar .studio-profile-action {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    width: 100% !important;
    min-height: 34px !important;
    padding: 7px 4px !important;
    border: 0 !important;
    background: transparent !important;
    color: #566174 !important;
    font: 500 12px/1.4 Inter, Arial, sans-serif !important;
    text-align: left !important;
    text-decoration: none !important;
}

#guestSidebar .studio-profile-action svg,
#guestSidebar .studio-profile-action i {
    display: block !important;
    flex: 0 0 15px !important;
    width: 15px !important;
    height: 15px !important;
}

#guestSidebar .studio-profile-logout {
    border-top: 1px solid #e1e6ed !important;
}

/* Dark mode: hanya sidebar guest */
body.dark-only #guestSidebar {
    background: #202b3c !important;
    border-color: #344258 !important;
}

body.dark-only #guestSidebar .studio-sidebar-profile {
    background: #262a35 !important;
    border-color: #343b4a !important;
}

body.dark-only #guestSidebar .studio-profile-info strong {
    color: #f1f3f5 !important;
}

body.dark-only #guestSidebar .studio-profile-info small,
body.dark-only #guestSidebar .studio-profile-action,
body.dark-only #guestSidebar .studio-profile-toggle {
    color: #c5ccd6 !important;
}

body.dark-only #guestSidebar .studio-profile-toggle {
    background: transparent !important;
    border-color: transparent !important;
}

body.dark-only #guestSidebar .guest-nav-label {
    color: #9bb5ff !important;
}

/* Logo dark mode: dibatasi ke sidebar guest */
body.dark-only #guestSidebar > .logo-wrapper,
body.dark-only #guestSidebar > .logo-icon-wrapper,
body.dark-only #guestSidebar > .morden-logo,
body.dark-only #guestSidebar > .brand,
body.dark-only #guestSidebar > .guest-brand {
    background: #202b3c !important;
    background-image: none !important;
    box-shadow: none !important;
}

body.dark-only #guestSidebar > .logo-wrapper img,
body.dark-only #guestSidebar > .logo-icon-wrapper img,
body.dark-only #guestSidebar > .morden-logo img,
body.dark-only #guestSidebar > .brand img,
body.dark-only #guestSidebar > .guest-brand img {
    background: transparent !important;
    filter: grayscale(1) brightness(0) invert(.65) !important;
}

/* Scroll tetap aktif, scrollbar disembunyikan */
#guestSidebar {
    overflow-y: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    scrollbar-gutter: auto !important;
}

#guestSidebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Perilaku responsive mengikuti /layanan */
@media (max-width: 991px) {
    #guestSidebar,
    aside#guestSidebar.guest-sidebar,
    aside#guestSidebar.sidebar {
        position: fixed !important;
        inset: 0 auto 0 0 !important;
        width: min(290px, 85vw) !important;
        min-width: 0 !important;
        max-width: min(290px, 85vw) !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
        flex: 0 0 auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        transform: translateX(-105%) !important;
        transition: transform .25s ease !important;
        z-index: 1001 !important;
    }

    body.guest-menu-open #guestSidebar {
        transform: translateX(0) !important;
    }

    body.guest-menu-open {
        overflow: hidden !important;
    }

    #guestSidebarOverlay,
    #guestOverlay,
    .sidebar-overlay,
    .guest-overlay {
        display: none;
        position: fixed !important;
        inset: 0 !important;
        z-index: 1000 !important;
        background: rgba(15, 23, 42, .48) !important;
    }

    body.guest-menu-open #guestSidebarOverlay,
    body.guest-menu-open #guestOverlay,
    body.guest-menu-open .sidebar-overlay,
    body.guest-menu-open .guest-overlay {
        display: block !important;
    }
}

/* END PANDAWA GUEST GLOBAL */

/* PANDAWA GUEST - TAMPILKAN SATU LOGO SAJA */
#guestSidebar > .logo-wrapper {
    display: flex !important;
}

#guestSidebar > .logo-icon-wrapper,
#guestSidebar > .morden-logo {
    display: none !important;
}
/* END PANDAWA GUEST - TAMPILKAN SATU LOGO SAJA */


/* PANDAWA GUEST COLOR RESTORE 20261113 */

/* Sidebar Guest Dark Mode */
body.dark-only[data-pandawa-theme-context="public"] #guestSidebar {
    background: #202b3c !important;
    border-right: 1px solid #344258 !important;
    color: #edf2fa !important;
}

/* Light Mode: hover dan active dibedakan */
body[data-pandawa-theme-context="public"] #guestSidebar nav.pandawa-guest-navigation > a:hover {
    background: #f3f6fb !important;
    color: #376cf2 !important;
}

body[data-pandawa-theme-context="public"] #guestSidebar nav.pandawa-guest-navigation > a.active,
body[data-pandawa-theme-context="public"] #guestSidebar nav.pandawa-guest-navigation > a.active:hover {
    background: #edf3ff !important;
    color: #376cf2 !important;
}

/* Dark Mode: hover */
body.dark-only[data-pandawa-theme-context="public"] #guestSidebar nav.pandawa-guest-navigation > a:hover {
    background: #293b55 !important;
    color: #ffffff !important;
}

/* Dark Mode: active tetap lebih tegas daripada hover */
body.dark-only[data-pandawa-theme-context="public"] #guestSidebar nav.pandawa-guest-navigation > a.active,
body.dark-only[data-pandawa-theme-context="public"] #guestSidebar nav.pandawa-guest-navigation > a.active:hover {
    background: #304568 !important;
    color: #ffffff !important;
}

/* END PANDAWA GUEST COLOR RESTORE 20261113 */
