/* ========================================
   DRAWER NAVIGATION
   ======================================== */

.duckydoubles-drawer-container {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    justify-content: flex-end;
}

.duckydoubles-drawer-active {
    pointer-events: auto;
}

.duckydoubles-drawer-inactive {
    pointer-events: none;
}

.duckydoubles-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    will-change: opacity;
}

.duckydoubles-drawer-overlay-open {
    opacity: 1;
}

.duckydoubles-drawer-overlay-closed {
    opacity: 0;
}

.duckydoubles-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65);
    transform: translate3d(100%, 0, 0);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

@media (min-width: 768px) {
    .duckydoubles-drawer-panel {
        width: 420px;
    }
}

.duckydoubles-drawer-panel-open {
    transform: translate3d(0, 0, 0);
}

.duckydoubles-drawer-panel-closed {
    transform: translate3d(100%, 0, 0);
}

/* Disable transitions during active touch drag for immediate visual feedback */
.duckydoubles-drawer-panel--dragging {
    transition: none !important;
}

.duckydoubles-drawer-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.duckydoubles-dual-panels {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.duckydoubles-dual-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: inherit;
    transition: transform 0.32s ease-out, opacity 0.32s ease-out, filter 0.32s ease-out;
    pointer-events: none;
    will-change: transform, opacity;
}

.duckydoubles-dual-panel--menu {
    transform: translate3d(0, 0, 0);
    z-index: 1;
    background: rgba(15, 23, 42, 0.95);
}

.duckydoubles-dual-panel--content {
    transform: translate3d(100%, 0, 0);
    z-index: 2;
    box-shadow: -18px 0 32px rgba(9, 14, 24, 0.35);
    background: rgba(15, 23, 42, 0.97);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
}

/* Layered drawer depth effects */
.duckydoubles-dual-panel--content[data-depth="1"] {
    z-index: 2;
}

.duckydoubles-dual-panel--content[data-depth="2"] {
    z-index: 3;
    box-shadow: -24px 0 48px rgba(9, 14, 24, 0.5);
}

.duckydoubles-dual-panel--content[data-depth="3"] {
    z-index: 4;
    box-shadow: -32px 0 64px rgba(9, 14, 24, 0.65);
}

.duckydoubles-dual-panel--content[data-depth="4"] {
    z-index: 5;
    box-shadow: -40px 0 80px rgba(9, 14, 24, 0.75);
}

/* Entering layers - stay off-screen until animation triggers */
.duckydoubles-dual-panel--content.layer-entering {
    transform: translate3d(100%, 0, 0) !important;
}

/* Exiting layers - slide back off-screen right, all moving together */
.duckydoubles-dual-panel--content.layer-exiting {
    transform: translate3d(100%, 0, 0) !important;
    opacity: 1;
    pointer-events: none;
}

/* Active content layers - slide to visible position */
.duckydoubles-dual-panels--content-active .duckydoubles-dual-panel--content:not(.layer-inactive):not(.layer-entering):not(.layer-exiting) {
    transform: translate3d(0, 0, 0);
}

/* Inactive layers (previous in stack) */
.duckydoubles-dual-panel--content.layer-inactive {
    transform: translate3d(0, 0, 0) scale(0.96) !important;
    opacity: 0.3;
    pointer-events: none;
    filter: brightness(0.6) blur(1px);
}

/* Pointer events for interactive panels */
.duckydoubles-dual-panels--menu-active .duckydoubles-dual-panel--menu,
.duckydoubles-dual-panels--content-active .duckydoubles-dual-panel--content:not(.layer-inactive) {
    pointer-events: auto;
}

.duckydoubles-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.duckydoubles-drawer-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.duckydoubles-drawer-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.duckydoubles-header-button {
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 6.4px 12.8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.duckydoubles-header-button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.duckydoubles-header-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.duckydoubles-back-button {
    min-height: 40px;
}

.duckydoubles-menu-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.duckydoubles-section-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 24px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.duckydoubles-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.duckydoubles-menu-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.duckydoubles-menu-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.duckydoubles-menu-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.duckydoubles-menu-icon {
    font-size: 42px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
}

.duckydoubles-menu-icon i:before {
    color: #d3d8db;
}

.duckydoubles-menu-text {
    display: flex;
    flex-direction: column;
    gap: 3.2px;
}

.duckydoubles-menu-label {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.duckydoubles-menu-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   MODE TOGGLE
   ======================================== */

.duckydoubles-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 16px;
}

.duckydoubles-mode-toggle__button {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.duckydoubles-mode-toggle__button:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.duckydoubles-mode-toggle__button--active {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.1);
    color: #facc15;
}

.duckydoubles-mode-toggle__button--active:hover {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.15);
}

