/* Ghost Wolves - Anpassungen fuer kleine Bildschirme (aus index.html ausgelagert, IX1a) */
/* Responsive */
@media(max-width:1024px){
  .app{ 
    grid-template-columns:1fr; 
  }
  .sidebar, .sidebar-right{ 
    width:100%; 
    margin-bottom:12px; 
  }
  .header {
    flex-direction: column;
    text-align: center;
    padding: 10px 0;
  }
}

@media (max-width: 768px) {
  .splash-content {
    padding: 20px;
    margin: 10px;
  }
  
  #splashScreen {
    justify-content: flex-start;
    padding-top: 20px;
  }

  .splash-title {
    font-size: 2rem;
  }
  
  .header-title {
    font-size: 2rem;
  }
  
  .dashboard-header h2 {
    font-size: 1.8rem;
  }
  
  #mapCard {
    height: 350px;
  }
  
}


/* ===== Handy-Menue (HM1, Logik in js/handymenue.js) =====
   Bis 1024 px stehen beide Seitenleisten im Menue hinter dem Knopf oben links.
   Breite muss zu HANDY_MENUE_BREITE_PX in js/config.js passen. */
.handy-menue-knopf,
.handy-menue-hintergrund,
.handy-menue {
  display: none;
}

@media (max-width: 1024px) {
  .handy-menue-knopf {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 10px;
    left: 10px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    background: rgba(20, 20, 20, 0.85);
    color: var(--accent);
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 900;               /* unter Willkommensseite (1000) und Bild-Grossansicht */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  }

  .handy-menue-knopf:active {
    background: var(--accent-dunkel);
    color: #fff;
  }

  .handy-menue-hintergrund {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
    z-index: 2000;
  }

  .handy-menue {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(85vw, 320px);
    background: rgba(25, 25, 25, 0.98);
    border-right: 1px solid var(--gray-light);
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.7);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 2001;
  }

  body.handy-menue-offen .handy-menue {
    transform: translateX(0);
  }

  body.handy-menue-offen .handy-menue-hintergrund {
    opacity: 1;
    visibility: visible;
  }

  body.handy-menue-offen {
    overflow: hidden;           /* Seite dahinter scrollt nicht mit */
  }

  .handy-menue-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--accent);
    font-family: "Orbitron", monospace;
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .handy-menue-zu {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
  }

  .handy-menue-inhalt {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .handy-menue-inhalt .sidebar,
  .handy-menue-inhalt .sidebar-right {
    width: 100%;
    margin-bottom: 12px;
    overflow: visible;
  }

  /* groessere Flaechen zum Antippen */
  .handy-menue-inhalt .nav a,
  .handy-menue-inhalt .sidebar-right .device-card {
    min-height: 44px;
    align-items: center;
    font-size: 1rem;
  }

  /* Platz oben, damit der Knopf das Logo nicht verdeckt */
  .header {
    padding-top: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .handy-menue,
  .handy-menue-hintergrund {
    transition: none;
  }
}
