
/* =========================================================
   MaHe LIVE – Liveticker classic-full.css (FINAL CLEAN)
   ========================================================= */

/* === Fox Theme Variablen === */
:root{
  --mahe-primary: var(--fox-primary-color, #005fcc);
  --mahe-danger:  var(--fox-danger-color, #c40000);
  --mahe-accent:  var(--fox-accent-color, #ff9800);
  --mahe-text:    var(--fox-text-color, #222);
  --mahe-muted:   var(--fox-muted-color, #888);
  --mahe-bg:      var(--fox-card-bg, #fff);
  --mahe-border:  var(--fox-border-color, #e0e0e0);
}

/* === Container === */
.mahe-ticker-box{
  border:1px solid var(--mahe-border);
  border-radius:12px;
  padding:12px;
  background:var(--mahe-bg);
  font-family:inherit;
  position:relative;
  z-index:50;
  overflow:hidden;
}
.mahe-ticker-box *{ box-sizing:border-box; }

/* === Header === */
.mahe-ticker-head{
  font-weight:700;
  font-size:18px;
  margin-bottom:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.mahe-head-center{display:inline-flex; align-items:center; gap:8px;}
/* === Scrollbereich (KERNSTELLE) === */
.mahe-ticker-scroll{
  max-height:10vh;                 /* Desktop: max. 10 % */
  max-height:10dvh;                /* stabiler auf modernen Browsern */
  overflow-y:auto;                 /* Scroll nur im Fenster */
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding-right:6px;
  padding-bottom:48px;
  overflow-anchor:none;
}

/* Mobile Stabilität */
@media (max-width:768px){
  .mahe-ticker-scroll{
    max-height:35vh;               /* Mobile: max. 35 % */
    max-height:35dvh;              /* stabil auf Mobile */
    padding-bottom:calc(48px + env(safe-area-inset-bottom));
    touch-action:pan-y;
  }
}
/* Scrollbar Optik */
.mahe-ticker-scroll::-webkit-scrollbar{width:8px;}
.mahe-ticker-scroll::-webkit-scrollbar-thumb{
  background:rgba(0,0,0,.12);
  border-radius:8px;
}

/* === Liste === */
.mahe-ticker-list{list-style:none;margin:0;padding:0;}

/* === Eintrag === */
.mahe-item{
  padding:10px;
  border-bottom:1px solid rgba(0,0,0,.06);
  font-size:15px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  max-width:100%;
  overflow-wrap:anywhere;
}
.mahe-item:last-child{border-bottom:none}
.mahe-item[data-url]{cursor:pointer;}
.mahe-item[data-url]:hover{
  background:rgba(0,0,0,.02);
  border-radius:10px;
}

/* === Links / Zeit === */
.mahe-left{
  min-width:64px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.mahe-time{
  font-weight:800;
  color:#444;
  white-space:nowrap;
}

/* === Status Badges === */
.mahe-new,
.mahe-urgent-badge{
  background:#c40000;
  color:#fff;
  font-size:11px;
  font-weight:900;
  padding:2px 6px;
  border-radius:6px;
}
.mahe-pin{font-size:12px; opacity:.85;}

/* === Textbereich === */
.mahe-right{flex:1;min-width:0;}
.mahe-entry-title{margin-bottom:4px;line-height:1.25;}
.mahe-text{line-height:1.45;}
.mahe-text p{margin:0 0 6px;}
.mahe-text p:last-child{margin-bottom:0;}
.mahe-text a{
  color:var(--mahe-primary);
  text-decoration:underline;
  word-break:break-word;
}
.mahe-expire{
  margin-top:6px;
  font-size:12px;
  color:var(--mahe-muted);
}

/* === OG Preview === */
.mahe-preview{
  margin-top:8px;
  display:flex;
  gap:10px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  overflow:hidden;
  background:rgba(0,0,0,.02);
  text-decoration:none;
  color:inherit;
}
.mahe-preview-img{
  width:84px;
  height:64px;
  background-size:cover;
  background-position:center;
}
.mahe-preview-meta{
  padding:8px 10px 8px 0;
}
.mahe-preview-title{
  font-size:13px;
  font-weight:800;
  line-height:1.2;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.mahe-preview-host{
  font-size:12px;
  color:var(--mahe-muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* === Hervorhebungen === */
.mahe-item.pinned{
  border-left:4px solid var(--mahe-accent);
  background:rgba(255,152,0,.06);
  border-radius:10px;
}
.mahe-item.urgent{
  border-left:4px solid var(--mahe-danger);
  background:rgba(196,0,0,.06);
  border-radius:10px;
}

/* === Footer === */
.mahe-footer{
  margin-top:10px;
  font-size:11px;
  color:var(--mahe-muted);
  text-align:center;
  opacity:.6;
}

/* === Mobile Feinschliff === */
@media (max-width:768px){
  .mahe-left{min-width:58px;}
  .mahe-preview-img{width:74px;height:58px;}
}

/* ===== HEIGHT RULES ===== */
.mahe-ticker-scroll{
  max-height:20vh;
  max-height:20dvh;
}
@media (max-width:768px){
  .mahe-ticker-scroll{
    max-height:35vh;
    max-height:35dvh;
  }
}

/* ===== POLICE BAR ===== */
.mahe-policebar{
  display:none;
  height:16px;
  width:100%;
  background:linear-gradient(90deg,#0a58ca 0 50%,#c40000 50% 100%);
  background-size:120px 16px;
}
.mahe-policebar.is-active{
  display:block;
  animation: mahe-police-flash .22s linear infinite;
}
@keyframes mahe-police-flash{
  0%{background-position:0 0}
  100%{background-position:120px 0}
}
