/* tm-layout-header-fix.css v1.0.0 (2026-01-16 Europe/Berlin)
   Layout-only Fixes:
   - Desktop: Dropdown rechts ausrichten (nicht links im Viewport raus)
   - Mobile: Dropdowns fixiert im Viewport (Scroll bis zum letzten Link)
   IMPORTANT: Keine Farben/CI hier.
*/

.tm-header,
.tm-header *{ box-sizing:border-box; }

/* Desktop: Dropdown am rechten Rand ausrichten */
.tm-topnav-item{ position:relative; }
.tm-topnav-dropdown{
  right:0 !important;
  left:auto !important;
  /* Abstand nicht als Hover-Falle: Dropdown direkt unter den Trigger */
  top:100% !important;
  margin-top:10px !important;
}

/* Desktop: Hover-Bruecke (damit Dropdown beim Mausweg nicht "weg springt") */
@media (min-width: 981px){
  .tm-topnav-item.has-dropdown::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:100%;
    height:12px;
  }
}

/* Mobile/Tablet: Dropdown im Viewport halten (ergänzt zu tm-mobile-menu.css) */
@media (max-width: 980px){
  .tm-topnav-dropdown{
    position:fixed !important;
    left:12px !important;
    right:12px !important;
    top:var(--tm-dd-top, 160px) !important;
    max-height:calc(100vh - 16px - var(--tm-dd-top, 160px)) !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    transform:none !important;
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
  }
  .tm-dropdown-menu .sub-menu{
    position:static !important;
    margin-left:12px;
  }
}

/* v1.0.1 (2026-01-16 13:44 Europe/Berlin) */
