/* ==========================================================================
   Drawer System - Lady Pandora
   Handles the mobile nav drawer: overlay, slide-in panel, close button.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Overlay
   -------------------------------------------------------------------------- */
#pandora-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1100;
    cursor: pointer;
}

#pandora-drawer-overlay.is-visible {
    display: block;
}

/* --------------------------------------------------------------------------
   Drawer Base - slides from left
   -------------------------------------------------------------------------- */
.pandora-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100%;
    background: var(--pandora-black-warm);
    border-right: 1px solid rgba(184, 134, 11, 0.15);
    z-index: 1200;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.pandora-drawer.is-open {
    left: 0;
}

/* --------------------------------------------------------------------------
   Drawer Header
   -------------------------------------------------------------------------- */
.pandora-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(184, 134, 11, 0.15);
    flex-shrink: 0;
}

.pandora-drawer__title {
    font-family: var(--pandora-font-display);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--pandora-gold);
}

.pandora-drawer__close {
    background: transparent;
    border: none;
    color: var(--pandora-gray-light);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.pandora-drawer__close:hover {
    color: var(--pandora-gold);
}

.pandora-drawer__close i {
    font-size: 1.1rem;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Drawer Body
   -------------------------------------------------------------------------- */
.pandora-drawer__body {
    padding: 1.5rem;
    flex: 1;
}

/* --------------------------------------------------------------------------
   Drawer Nav Menu - injected via REST
   -------------------------------------------------------------------------- */
.pandora-drawer-nav__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pandora-drawer-nav__links li {
    border-bottom: 1px solid rgba(184, 134, 11, 0.1);
}

.pandora-drawer-nav__links li:last-child {
    border-bottom: none;
}

.pandora-drawer-nav__links a {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    font-family: var(--pandora-font-body);
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--pandora-cream);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.2s ease;
}

.pandora-drawer-nav__links a:hover {
    color: var(--pandora-gold);
    padding-left: 0.5rem;
}

.pandora-drawer-nav__links .current-menu-item > a,
.pandora-drawer-nav__links .current_page_item > a,
.pandora-drawer-nav__links .current-menu-ancestor > a {
    color: var(--pandora-gold);
}

/* --------------------------------------------------------------------------
   Drawer Language Switcher
   -------------------------------------------------------------------------- */
.pandora-drawer__lang {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(184, 134, 11, 0.15);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Loading / error states
   -------------------------------------------------------------------------- */
.pandora-drawer__loading,
.pandora-drawer__error {
    font-family: var(--pandora-font-body);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pandora-gray-light);
    padding: 0.5rem 0;
}

.pandora-drawer__error {
    color: var(--pandora-red);
}

/* --------------------------------------------------------------------------
   WordPress Admin Bar Offset
   -------------------------------------------------------------------------- */
.admin-bar .pandora-drawer {
    top: 32px;
    height: calc(100% - 32px);
}

.admin-bar #pandora-drawer-overlay {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .pandora-drawer {
        top: 46px;
        height: calc(100% - 46px);
    }

    .admin-bar #pandora-drawer-overlay {
        top: 46px;
    }
}
