/* Grundlayout */
html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
  }
  
  body {
    font-family: Arial, sans-serif;
  }
  
  /* Karte => füllt den ganzen Bildschirm, kein weißer Rand */
  #map {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 1;
  }
  
  /* Glas-Effekt */
  .glass_look {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6.6px);
    -webkit-backdrop-filter: blur(6.6px);
  }
  
  /* Menü (Desktop => rechts fest, 
     Mobile => collapsed/expanded) */
  .menu {
    position: absolute;
    right: 18px;
    top: 26px;
    width: 280px;
    padding: 20px;
    z-index: 4;
    overflow: hidden; 
    transition: max-height 0.5s ease;
    max-height: 75vh; /* Desktop => ganz offen */
  }
  
  /* Menü-Header + + nebeneinander */
  .menu-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .menu-header {
    font-size: 25px;
    font-weight: bold;
    margin: 10px 5px;
    flex: 1;
  }
  
  /* Größerer + Button */
  .add-btn {
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 24px;
    cursor: pointer;
    margin-top: 8px;
    font-size: 22px;
  }
  
  /* Menü-Liste => scrollen */
  .menu-list {
    list-style-type: none;
    margin: 0; 
    padding: 0;
    max-height: 60vh; 
    overflow-y: auto; /* scollbar */
    transition: all 0.5s ease;
  }
  .menu-list li {
    padding: 8px;
    border-bottom: 1px solid #ccc;
    transition: opacity 0.3s ease;
    cursor: pointer;
  }
  .menu-list li:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  .highlight {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  }
  
  /* collapsed / expanded => NUR mobil => 
     definieren wir hier, stören Desktop nicht. */
  .menu.collapsed {
    max-height: 60px;
  }
  .menu.expanded {
    max-height: 50vh; 
  }
  
  /* Collapsed => keine Liste. 
     Expanded => Liste sichtbar. */
  .menu.collapsed .menu-list {
    display: none;
  }
  .menu.expanded .menu-list {
    display: block;
  }
  
  /* Overview 
     - Desktop => links, 
     - Mobile => bottom sheet 
  */
  .overview {
    max-height: 90%;
    overflow: scroll;
    position: absolute;
    top: 26px;
    left: 18px;
    width: 200px;
    padding: 20px;
    transform: translateX(-120%);
    transition: transform 0.5s ease, width 0.5s ease;
    z-index: 4;
  }
  .overview:not(.hidden) {
    transform: none;
  }
  /* Bearbeiten => breiter (Desktop) */
  .overview.editing {
    width: 280px;
  }
  
  /* Scroll-Kombination:
     Wir verlagern den gesamten scrollbaren Inhalt 
     in .overview-scrollable => 
     so kann man ALLES (Inhalt + Buttons) scrollen. 
  */
  
  
  /* content + actions => standard flow */
  .overview-content {
    flex: 1; /* actions am Ende */
  }
  
  /* Feld-Layouts */
  .overview-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
  }
  .edit-label {
    color: #000;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9em;
  }
  .overview-field input,
  .overview-field textarea {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px;
    background-color: rgba(255,255,255,0.7);
    font-size: 0.95em;
    outline: none;
  }
  
  #overviewAttractions {
    cursor: pointer;
  }
  #overviewAttractions li:hover {
    font-weight: bolder;
  }
  
  /* Buttons unten -> scrollt mit dem Content,
     da in .overview-scrollable */
  .overview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }
  
  /* Crosshair (Fadenkreuz) */
  .crosshair {
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 50%;
    font-size: 40px;
    color: black;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  
  /* Buttons (Speichern/Abbrechen etc.) */
  .edit-btn {
    border: none;
    border-radius: 20px;
    padding: 12px 15px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    text-align: center;
    transition: background-color 0.3s;
  }
  .edit-btn--primary {
    background: #2196f3;
    color: #fff;
  }
  .edit-btn--primary:hover {
    background: #1b7bcc;
  }
  .edit-btn--secondary {
    background: #757575;
    color: #fff;
  }
  .edit-btn--secondary:hover {
    background: #616161;
  }
  .edit-btn--danger {
    background: #f44336;
    color: #fff;
  }
  .edit-btn--danger:hover {
    background: #d32f2f;
  }
  .btn-block {
    display: block;
    width: 100%;
  }
  
  /* Attraction Row */
  .attraction-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  .add-attraction-btn {
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
    margin-top: 8px;
    font-size: 16px;
  }
  
  /* Modus-Klassen */
  .view-mode {
    margin: 5px 0;
  }
  .edit-mode {}
  .hidden {
    display: none !important;
  }
  
  /* ---------- MOBIL -------------- */
  @media only screen and (max-width: 700px) {

    .menu-list {
        max-height: calc(50vh - 60px); 
    }
    .overview-scrollable {
    
         /* Scroll => Desktop + Mobile */
        display: flex;
        flex-direction: column;
        height: 100%;
      }
  
    /* Menü => oben, collapsed/expanded toggeln */
    .menu {
      right: 0; left: 0;
      top: 0;
      width: auto;
      border-radius: 0;
        max-height: 50vh; /* Desktop => ganz offen */
    }
  
    /* #map => volles Fenster (keine Ränder) */
    #map {
      top: 0; left: 0;
      width: 100%;
      height: 100%;
    }
  
    /* Overview -> Bottom sheet, max 35% */
    .overview {
        overflow-y: scroll;
      left: 0; right: 0; bottom: 0;
      top: auto;
      width: auto;
      border-radius: 20px 20px 0 0; /* Oben rund, unten flush */
      max-height: 35%;
      transform: translateY(120%);
      
    }
    .overview:not(.hidden) {
      transform: translateY(0);
    }
    /* Bearbeiten => bleibe bei 35% => scrolle innen */
    .overview.editing {
      max-height: 35%;
      width: auto;
    }
  
    /* Der scrollbare Container 
       => flex: direction col, 
       => overflow-y auto => done above.  
       => Keine Extraränder unten 
    */
  }