﻿/* ============================================
   ZENTRALES HAMBURGER-MENÜ - GLOBAL FÜR ALLE SEITEN
   Diese Datei definiert das Menü für ALLE Seiten identisch
   KEINE lokalen Styles dürfen diese überschreiben
   ============================================ */

/* Menu-Placeholder: Konsistente Positionierung auf allen Seiten */
#menu-placeholder {
    flex: 0 0 auto !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

.menu-container {
    position: relative !important;
    flex: 0 0 auto !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: white !important;
    font-size: 24px !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s, visibility 0.3s !important;
}

.menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.menu-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 288px !important;
    height: 100% !important;
    background: white !important;
    box-shadow: 24px 0 60px rgba(20, 28, 51, 0.22) !important;
    z-index: 9999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    /* KRITISCH: Verhindere ALLE Vererbungen von body - setze auf 1.4 wie in Pyropick */
    line-height: 1.4 !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.menu-sidebar.active {
    transform: translateX(0) !important;
}

.menu-header {
    padding: 22px 20px !important;
    background: linear-gradient(135deg, #2a2626 0%, #454040 55%, #b83838 100%) !important;
    color: white !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.menu-header h3 {
    margin: 0 !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
}

.menu-close {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 32px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    transition: background 0.2s !important;
}

.menu-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.menu-user {
    padding: 18px 20px !important;
    background: #faf9f9 !important;
    border-bottom: 1px solid #e8e4e4 !important;
    flex-shrink: 0 !important;
}

.menu-user-name {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 4px !important;
    line-height: 1.4 !important;
}

.menu-user-roles {
    font-size: 11px !important;
    color: #c84040 !important;
    font-weight: 700 !important;
    letter-spacing: .5px !important;
    text-transform: uppercase !important;
    line-height: 1.4 !important;
}

.menu-nav {
    flex: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    /* KRITISCH: Isoliere komplett von body line-height - setze auf 1.4 wie in Pyropick */
    line-height: 1.4 !important;
    font-size: 14px !important;
    overflow-y: auto !important;
    /* Keine Abstände zwischen Items - KRITISCH für konsistente Darstellung */
    gap: 0 !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
    /* Verhindere alle Vererbungen */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    /* Verhindere zusätzliche Abstände durch line-height */
    display: flex !important;
    flex-direction: column !important;
}

/* ============================================
   MENÜ-ITEMS - FESTE GRÖSSEN, KEINE VERERBUNG
   Diese Styles müssen auf ALLEN Seiten identisch sein
   ============================================ */

/* Alle möglichen Selektoren für maximale Spezifität - ÜBERSCHREIBT ALLE ANDEREN STYLES */
html body .menu-sidebar a.menu-item,
html body .menu-sidebar .menu-item,
html body .menu-sidebar a.menu-item.btn,
html body .menu-sidebar .menu-item.btn,
html body .menu-sidebar a,
html body .menu-sidebar nav a,
html body .menu-sidebar .menu-nav a,
html body .menu-sidebar .menu-nav .menu-item,
body .menu-sidebar a.menu-item,
body .menu-sidebar .menu-item,
body .menu-sidebar .menu-nav a,
.menu-sidebar a.menu-item,
.menu-sidebar .menu-item,
.menu-sidebar a.menu-item.btn,
.menu-sidebar .menu-item.btn,
.menu-sidebar a,
.menu-sidebar nav a,
.menu-sidebar .menu-nav a,
.menu-sidebar .menu-nav .menu-item {
    /* Layout */
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    
    /* Größe - FESTE WERTE - KEINE VERERBUNG - EXAKT WIE IN PYROPICK */
    font-size: 14px !important;
    line-height: 1.4 !important;
    padding: 10px 16px !important;
    /* KEINE Abstände - Items direkt aneinander - KRITISCH */
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* NATÜRLICHE HÖHE - keine feste Höhe, damit Items direkt aneinander liegen */
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    /* Verhindere zusätzliche Abstände durch line-height vom body */
    vertical-align: top !important;
    /* Verhindere Abstände durch border oder outline */
    border-width: 0 !important;
    outline-width: 0 !important;
    
    /* Aussehen */
    color: #333 !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-bottom: none !important;
    /* Keine Abstände durch border */
    outline: none !important;
    
    /* Position */
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    
    /* Typografie - Reset aller Vererbungen */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-weight: normal !important;
    font-style: normal !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-transform: none !important;
    vertical-align: baseline !important;
    
    /* Transitions */
    transition: background 0.2s !important;
}

.menu-sidebar .menu-item:hover,
.menu-sidebar a.menu-item:hover,
.menu-sidebar .menu-nav a:hover {
    background: #faf0f0 !important;
    color: #942f2f !important;
    box-shadow: inset 3px 0 0 #c84040 !important;
}

/* Menu Icon - Feste Größe - KEINE ABSTÄNDE */
.menu-sidebar .menu-item .menu-icon,
.menu-sidebar a .menu-icon,
.menu-sidebar .menu-nav a .menu-icon {
    margin-right: 12px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    font-size: 16px !important;
    width: 20px !important;
    text-align: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    /* Verhindere zusätzliche Abstände */
    height: auto !important;
    min-height: 0 !important;
}

/* Menu Text - Feste Größe - KEINE ABSTÄNDE */
.menu-sidebar .menu-item .menu-text,
.menu-sidebar a .menu-text,
.menu-sidebar .menu-nav a .menu-text {
    flex: 1 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: normal !important;
    letter-spacing: normal !important;
    color: inherit !important;
    /* Verhindere zusätzliche Abstände */
    vertical-align: top !important;
    height: auto !important;
    min-height: 0 !important;
}

.menu-separator {
    height: 1px !important;
    background: #e8e4e4 !important;
    margin: 6px 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* ============================================
   ZUSÄTZLICHER SCHUTZ: Überschreibe ALLE möglichen Styles
   ============================================ */

/* Schutz vor body line-height - KEINE ABSTÄNDE - MAXIMALE SPEZIFITÄT */
body[style*="line-height"] .menu-sidebar a.menu-item,
body[style*="line-height"] .menu-sidebar .menu-item,
body[style*="line-height"] .menu-sidebar .menu-nav a,
body .menu-sidebar a.menu-item,
body .menu-sidebar .menu-item,
body .menu-sidebar .menu-nav a,
html body .menu-sidebar a.menu-item,
html body .menu-sidebar .menu-item,
html body .menu-sidebar .menu-nav a,
html body[style*="line-height"] .menu-sidebar a.menu-item,
html body[style*="line-height"] .menu-sidebar .menu-item {
    line-height: 1.4 !important;
    font-size: 14px !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    /* Verhindere zusätzliche Abstände durch line-height */
    vertical-align: top !important;
    /* Überschreibe ALLE möglichen body-Styles */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Schutz vor inline-Styles - KEINE ABSTÄNDE */
.menu-sidebar a[style],
.menu-sidebar .menu-item[style] {
    font-size: 14px !important;
    line-height: 1.4 !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Schutz vor allen möglichen CSS-Klassen - KEINE ABSTÄNDE - MAXIMALE SPEZIFITÄT */
html body .menu-sidebar .btn,
html body .menu-sidebar .button,
html body .menu-sidebar button.menu-item,
html body .menu-sidebar a.btn,
html body .menu-sidebar a.menu-item.btn,
body .menu-sidebar .btn,
body .menu-sidebar .button,
body .menu-sidebar button.menu-item,
body .menu-sidebar a.btn,
body .menu-sidebar a.menu-item.btn,
.menu-sidebar .btn,
.menu-sidebar .button,
.menu-sidebar button.menu-item,
.menu-sidebar a.btn,
.menu-sidebar a.menu-item.btn {
    font-size: 14px !important;
    line-height: 1.4 !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    text-align: left !important;
}
