/**
 * css/mobile-drawer.css
 *
 * Single Source of Truth fuer den Mobile-Drawer-Hamburger-Slide-In auf
 * der gesamten Astromantie-Website (Account-Seiten UND Nicht-Account-Seiten).
 *
 * Vorher (bis v1.2.7): nur in css/account.css definiert, deshalb auf
 * Nicht-Account-Seiten nicht verfuegbar. v1.2.8 extrahiert die Regeln
 * hierher; account.css enthaelt diese Klassen nicht mehr.
 *
 * Klassen: .astro-hamburger-btn, .astro-hamburger-icon, .astro-menu-overlay,
 * .astro-slide-menu, .astro-menu-header, .astro-menu-title, .astro-menu-close,
 * .astro-menu-section, .astro-menu-section-label, .astro-menu-item,
 * .astro-menu-item-icon, .astro-menu-sep, .astro-menu-footer,
 * .astro-menu-footer-logo, .astro-menu-footer-sep, .astro-menu-social
 *
 * Aufruf-Pattern Open/Close: Body bekommt .astro-menu-open,
 * .astro-hamburger-btn / .astro-menu-overlay / .astro-slide-menu bekommen .open
 *
 * Geladen ueberall via wp_enqueue_style (siehe functions.php).
 */

.astro-hamburger-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    transition: all 0.3s;
}
.astro-hamburger-btn:hover {
    background: rgba(232, 201, 106, 0.08);
}

/* Die 3 Linien */
.astro-hamburger-icon {
    width: 20px;
    height: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.astro-hamburger-icon span {
    display: block;
    height: 2px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    width: 100%;
}
body.astro-light-theme .astro-hamburger-icon span {
    background: rgba(44, 36, 22, 0.7);
}

/* Animiert zu X wenn offen */
.astro-hamburger-btn.open .astro-hamburger-icon span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.astro-hamburger-btn.open .astro-hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: translateX(8px);
}
.astro-hamburger-btn.open .astro-hamburger-icon span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Overlay --- */
.astro-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 4, 15, 0.7);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}
.astro-menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}
body.astro-light-theme .astro-menu-overlay {
    background: rgba(0, 0, 0, 0.3);
}

/* --- Slide-In Menu --- */
.astro-slide-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(170deg, #0a0819 0%, #0e0b22 15%, #14102e 35%, #110d28 55%, #0d0a20 75%, #08061a 100%);
    border-left: 1px solid rgba(167, 139, 250, 0.06);
    z-index: 300;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}
/* Kosmischer Schimmer */
.astro-slide-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 70% 20%, rgba(124, 58, 237, 0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 30% 80%, rgba(232, 201, 106, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}
.astro-slide-menu > * {
    position: relative;
    z-index: 1;
}
body.astro-light-theme .astro-slide-menu {
    background: linear-gradient(170deg, #fefdfb 0%, #f9f5ed 15%, #f3ede0 35%, #f6f1e7 55%, #faf7f0 75%, #fdfcf9 100%);
    border-left-color: rgba(160, 124, 42, 0.08);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
}
body.astro-light-theme .astro-slide-menu::before {
    background: radial-gradient(ellipse at 70% 20%, rgba(201, 168, 76, 0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 30% 80%, rgba(160, 124, 42, 0.03) 0%, transparent 40%);
}
.astro-slide-menu.open {
    right: 0;
}

/* --- Menu Header --- */
.astro-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}
body.astro-light-theme .astro-menu-header {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}
.astro-menu-title {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--astro-gold, #e8c96a);
    letter-spacing: 2px;
    text-transform: uppercase;
}
.astro-menu-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    transition: all 0.2s;
}
.astro-menu-close:hover {
    background: rgba(232, 201, 106, 0.04);
    color: rgba(255, 255, 255, 0.9);
}
body.astro-light-theme .astro-menu-close {
    color: rgba(44, 36, 22, 0.4);
}
body.astro-light-theme .astro-menu-close:hover {
    background: rgba(160, 124, 42, 0.04);
    color: #2c2416;
}

/* --- Menu Items --- */
.astro-menu-section {
    padding: 4px 0;
}
.astro-menu-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: 8px 20px 4px;
}
body.astro-light-theme .astro-menu-section-label {
    color: rgba(44, 36, 22, 0.4);
}
.astro-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 400;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
    position: relative;
}
body.astro-light-theme .astro-menu-item {
    color: #2c2416;
}
.astro-menu-item:hover {
    background: rgba(232, 201, 106, 0.04);
    color: var(--astro-gold, #e8c96a);
}
body.astro-light-theme .astro-menu-item:hover {
    background: rgba(160, 124, 42, 0.04);
    color: var(--astro-gold, #c9a84c);
}
.astro-menu-item.active {
    color: var(--astro-gold, #e8c96a);
    font-weight: 500;
}
.astro-menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    width: 3px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 2px 2px 0;
}
body.astro-light-theme .astro-menu-item.active::before {
    background: var(--astro-gold, #c9a84c);
}
.astro-menu-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.1);
    flex-shrink: 0;
}
body.astro-light-theme .astro-menu-item-icon {
    background: rgba(160, 124, 42, 0.06);
    border-color: rgba(160, 124, 42, 0.08);
}

/* --- Separator --- */
.astro-menu-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
    margin: 4px 20px;
}
body.astro-light-theme .astro-menu-sep {
    background: rgba(0, 0, 0, 0.04);
}

/* --- Menu Footer --- */
.astro-menu-footer {
    margin-top: auto;
    padding: 10px 20px;
    flex-shrink: 0;
}
.astro-menu-footer-logo {
    display: flex;
    justify-content: center;
    padding: 2px 0 4px;
}
.astro-menu-footer-logo img {
    height: 60px;
    width: auto;
}
.astro-menu-footer-logo-dark { display: block; }
.astro-menu-footer-logo-light { display: none; }
body.astro-light-theme .astro-menu-footer-logo-dark { display: none; }
body.astro-light-theme .astro-menu-footer-logo-light { display: block; }

.astro-menu-footer-sep {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 201, 106, 0.3), transparent);
    margin: 8px 0 4px;
}
body.astro-light-theme .astro-menu-footer-sep {
    background: linear-gradient(90deg, transparent, rgba(160, 124, 42, 0.25), transparent);
}

/* --- Social Icons --- */
.astro-menu-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 6px 0 2px;
}
.astro-menu-social-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--astro-gold, #e8c96a);
    opacity: 0.5;
    transition: opacity 0.2s;
    text-decoration: none;
}
.astro-menu-social-icon svg {
    width: 13px;
    height: 13px;
}
.astro-menu-social-icon:hover {
    opacity: 1;
}

/* --- Desktop: Hamburger VERSTECKEN --- */
@media (min-width: 768px) {
    .astro-hamburger-btn {
        display: none !important;
    }
    .astro-slide-menu,
    .astro-menu-overlay {
        display: none !important;
    }
    .astro-dash-nav-right-mobile {
        /* Auf Desktop nur den Mond-Toggle zeigen */
    }
}

/* --- Mobile: Hamburger zeigen --- */
@media (max-width: 767px) {
    .astro-hamburger-btn {
        display: flex;
    }
    /* Body Lock wenn Menü offen */
    body.astro-menu-open {
        overflow: hidden;
    }
}

/* ============================================================
 * Astromantie-spezifische Layout-Erweiterungen (v1.2.8)
 * ------------------------------------------------------------
 * Account-Drawer hat 7+2 Items und passt ohne Scroll. Der
 * Drawer auf Nicht-Account-Seiten kann 14+ Items haben (Hauptmenue
 * + Entdecken + Konto + CTA + Footer-Logo) und braucht Scroll.
 * Header und Footer bleiben fixiert, der mittlere Body-Wrapper
 * scrollt.
 *
 * Account-Drawer (page-account.php) rendert keinen .astro-slide-menu-body
 * und kein .astro-mobile-cta -> diese Regeln greifen dort nicht und
 * lassen den Account-Drawer visuell unveraendert.
 * ============================================================ */

.astro-slide-menu-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.astro-menu-footer {
    flex-shrink: 0;
}

.astro-slide-menu .astro-mobile-cta {
    display: block;
    margin: 12px 20px 16px;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: var(--astro-btn-gradient);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
    letter-spacing: 1px;
    box-shadow: 0 0 20px var(--astro-accent-glow);
    text-decoration: none;
    cursor: pointer;
}

/* ============================================================
 * Accordion-Section (Toggle-Button als Section-Label)
 * Wird in v1.2.8 fuer "ENTDECKEN"-Section im Nicht-Account-Drawer
 * benutzt. Account-Drawer benutzt weiterhin div .astro-menu-section-label
 * ohne .is-toggle-Modifier — die Regeln greifen dort nicht.
 * ============================================================ */

.astro-menu-section-label.is-toggle {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 20px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    transition: color 0.15s;
}

body.astro-light-theme .astro-menu-section-label.is-toggle {
    color: rgba(44, 36, 22, 0.4);
}

.astro-menu-section-label.is-toggle:hover {
    color: var(--astro-gold, #e8c96a);
}

body.astro-light-theme .astro-menu-section-label.is-toggle:hover {
    color: var(--astro-gold, #c9a84c);
}

.astro-menu-section-label.is-toggle .astro-menu-section-arrow {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.astro-menu-section.open .astro-menu-section-label.is-toggle .astro-menu-section-arrow {
    transform: rotate(180deg);
}

.astro-menu-section-items {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease-in-out;
}

.astro-menu-section.open .astro-menu-section-items {
    max-height: 600px;
}

/* ============================================================
 * Icon-Farb-Map (data-color-Attribut auf .astro-menu-item-icon)
 * Setzt color (currentColor wirkt auf das stroke der Lucide-SVGs).
 * Background des Icon-Containers bleibt rgba(167,139,250,0.15) wie
 * beim Account-Drawer — nur der Stroke wechselt pro Item.
 * ============================================================ */

.astro-menu-item-icon[data-color="gold"]    { color: var(--astro-gold,    #e8c96a); }
.astro-menu-item-icon[data-color="violet"]  { color: var(--astro-accent,  #a78bfa); }
.astro-menu-item-icon[data-color="blue"]    { color: #60a5fa; }
.astro-menu-item-icon[data-color="cyan"]    { color: #38bdf8; }
.astro-menu-item-icon[data-color="green"]   { color: #4ade80; }
.astro-menu-item-icon[data-color="yellow"]  { color: #facc15; }
.astro-menu-item-icon[data-color="orange"]  { color: #fb923c; }
.astro-menu-item-icon[data-color="red"]     { color: #f87171; }
.astro-menu-item-icon[data-color="pink"]    { color: #f472b6; }
.astro-menu-item-icon[data-color="magenta"] { color: #e879f9; }

/* Light-Theme: die Pastell-Toene auf nicht-Account-Seiten leicht abdunkeln,
 * damit sie auf hellem Hintergrund nicht ausbleichen. */
body.astro-light-theme .astro-menu-item-icon[data-color="blue"]    { color: #2563eb; }
body.astro-light-theme .astro-menu-item-icon[data-color="cyan"]    { color: #0284c7; }
body.astro-light-theme .astro-menu-item-icon[data-color="green"]   { color: #16a34a; }
body.astro-light-theme .astro-menu-item-icon[data-color="yellow"]  { color: #ca8a04; }
body.astro-light-theme .astro-menu-item-icon[data-color="orange"]  { color: #ea580c; }
body.astro-light-theme .astro-menu-item-icon[data-color="red"]     { color: #dc2626; }
body.astro-light-theme .astro-menu-item-icon[data-color="pink"]    { color: #db2777; }
body.astro-light-theme .astro-menu-item-icon[data-color="magenta"] { color: #c026d3; }

/* Hover am Item: Icon-Stroke laesst sich am Item.hover NICHT ueberschreiben,
 * damit die individuelle Farbe pro Item erhalten bleibt — der Account-Drawer-
 * Default `.astro-menu-item:hover { color: gold }` wirkt dort auf den Text,
 * nicht auf das Icon. data-color hat hoeheren Selector-Score, gewinnt. */
