/* =========================================================
   File: sb-drawer.css
   Style: Premium App Drawer (Navy Blue / iOS Style)
   ========================================================= */

/* --- VARIABILI LOCALI --- */
.wp-block-kadence-off-canvas {
    --sb-drawer-bg: #020617;       /* Very Dark Navy (Quasi nero) */
    --sb-drawer-surface: #0f172a;  /* Navy leggermente più chiaro */
    --sb-drawer-text: #ffffff;
    --sb-drawer-muted: #94a3b8;
    --sb-drawer-accent: #3b82f6;   /* Bright Blue per focus */
    --sb-drawer-border: rgba(255, 255, 255, 0.08);
}

/* --- SHELL (Contenitore Kadence) --- */
.wp-block-kadence-off-canvas .kb-off-canvas-overlay {
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px); /* Effetto Frosted Glass sullo sfondo */
    -webkit-backdrop-filter: blur(8px);
}

.wp-block-kadence-off-canvas .kb-off-canvas-inner-wrap {
    background-color: var(--sb-drawer-bg) !important;
    box-shadow: 0 0 50px rgba(0,0,0,0.5) !important;
    max-width: 340px !important; /* Larghezza ottimale smartphone */
    width: 85vw !important;
}

.wp-block-kadence-off-canvas .kb-off-canvas-inner {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Tasto Chiudi (X) */
.wp-block-kadence-off-canvas .kb-off-canvas-close {
    color: #fff !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.wp-block-kadence-off-canvas .kb-off-canvas-close:hover { opacity: 1; }


/* --- HEADER AREA --- */
.sb-drawer__header {
    padding: 60px 24px 20px; /* Spazio per Safe Area in alto */
    background: linear-gradient(180deg, var(--sb-drawer-bg) 0%, var(--sb-drawer-surface) 100%);
    border-bottom: 1px solid var(--sb-drawer-border);
}

.sb-drawer__user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sb-drawer__welcome {
    font-size: 0.9rem;
    color: var(--sb-drawer-muted);
    font-weight: 500;
}

.sb-drawer__signin-btn {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sb-drawer-accent);
    text-decoration: none;
    background: rgba(59, 130, 246, 0.1);
    padding: 6px 12px;
    border-radius: 100px;
    transition: background 0.2s;
}
.sb-drawer__signin-btn:hover {
    background: rgba(59, 130, 246, 0.2);
}

.sb-drawer__brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}


/* --- QUICK ACTIONS (Pills) --- */
.sb-drawer__actions {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--sb-drawer-border);
}

.sb-action-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 12px 4px;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s, transform 0.1s;
}
.sb-action-pill:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}
.sb-action-pill svg { stroke-width: 1.5px; opacity: 0.9; }
.sb-action-pill span { font-size: 0.75rem; font-weight: 600; opacity: 0.8; }


/* --- LISTA CATEGORIE (iOS Style) --- */
.sb-drawer__content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px 0;
    -webkit-overflow-scrolling: touch;
}

.sb-drawer__label {
    padding: 0 24px 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sb-drawer-muted);
    font-weight: 700;
}

.sb-drawer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-drawer__list li a {
    display: block;
    padding: 14px 24px;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    transition: background 0.2s;
}

/* Chevron arrow on right */
.sb-drawer__list li a::after {
    content: '›';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    line-height: 1;
}

.sb-drawer__list li a:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 28px; /* Slight movement */
}
.sb-drawer__list li a:hover::after {
    color: #fff;
}

/* --- DRAWER FOOTER --- */
.sb-drawer__footer {
    padding: 40px 24px 100px; /* Extra padding bottom per mobile browsers */
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}
.sb-drawer__footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
}