/* =========================================================
   Matawow Global Header
   Sprint 18 – Single Source of Truth
   ========================================================= */

   /* =========================================================
   Globaler Mobile Tap-Flash Guard
   Entfernt den kurz sichtbaren blauen Browser-Tap-Highlight
   bei Buttons, Links und anderen interaktiven Elementen.
   Keyboard-Fokus bleibt über :focus-visible erhalten.
   ========================================================= */

html{
  -webkit-tap-highlight-color: transparent;
}

a,
button,
summary,
label,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"]{
  -webkit-tap-highlight-color: transparent;
}



.header-blur{
  position: sticky;
  top: 0;
  z-index: 5000;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: rgba(10,13,20,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background .25s ease, border-color .25s ease, padding .25s ease;
}

.header-blur.shrink{
  background: rgba(10,13,20,0.72);
  border-bottom-color: rgba(255,255,255,0.12);
}

.hdr{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1320px;
  margin: 0 auto;
  transition: padding .25s ease;
}

.header-blur.shrink .hdr{
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}


.brand-header,
.brand-main,
#mwHomeLink{
  font-family: Poppins, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #f0f4ff;
  text-transform: lowercase;
  white-space: nowrap;
  text-decoration: none !important;
}

/* Matawow-Wortmarke ausschließlich im Header */
.header-blur .brand-header,
.header-blur #mwHomeLink{
  font-size: 33px;
}


#mwHomeLink{
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}

#mwHomeLink:hover{
  opacity: .85;
}

#mwHomeLink:active{
  transform: translateY(1px);
}

.hdr-center{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #d2daf5;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 15px;
  white-space: nowrap;
  pointer-events: none;
  opacity: .88;
}

.nav{
  display: flex;
  align-items: center;
  gap: 10px;
  visibility: hidden;
  min-width: 430px;
}

.nav.mw-nav-ready{
  visibility: visible;
}

.nav-link{
  color: #e8ecf7;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  opacity: .85;
  transition: opacity .2s ease;
}

.nav-link:hover{
  opacity: 1;
  text-decoration: underline;
}

.nav-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #f8faff;
  border: 1px solid rgba(255,255,255,.18);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: background .2s, border-color .2s, transform .2s;
}

.nav-button:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.30);
}

.nav-button:active{
  transform: scale(.97);
}

/* Announcement */

.mw-announcement {
  display: block;
  min-height: 33px;
  box-sizing: border-box;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(5,8,15,.46);
}

.mw-announcement.is-visible {
  display: block;
}


.mw-announcement-inner{
  max-width: 1320px;
  margin: 0 auto;
  padding: 7px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(234,240,248,.92);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.mw-announcement-dot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34,197,94,.55);
}

.mw-announcement[data-type="warning"] .mw-announcement-dot{
  background: #facc15;
  box-shadow: 0 0 14px rgba(250,204,21,.45);
}

.mw-announcement[data-type="danger"] .mw-announcement-dot{
  background: #ef4444;
  box-shadow: 0 0 14px rgba(239,68,68,.45);
}

.mw-announcement-link{
  color: #dbeafe;
  text-decoration: none;
  border-bottom: 1px solid rgba(219,234,254,.35);
}

.mw-announcement-link:hover{
  border-bottom-color: rgba(219,234,254,.85);
}

@media(max-width: 720px){
  .hdr{
    padding: 10px 14px;
    gap: 10px;
  }

  .brand-header,
  .brand-main,
  #mwHomeLink{
    font-size: 23px;
  }

  .hdr-center{
    display: none;
  }

  .nav{
    min-width: 0;
    gap: 8px;
  }

  .nav-link{
    font-size: 13px;
  }

  .nav-button{
    padding: 7px 11px;
    font-size: 13px;
  }

  .mw-announcement-inner{
    padding: 7px 14px 8px;
    font-size: 12px;
  }
}

@media(max-width: 420px){
  .nav{
    gap: 6px;
  }

  .nav-link{
    font-size: 12px;
  }

  .nav-button{
    padding: 7px 9px;
  }
}

/* ===== Tablet Header Fix: 769–1117px ===== */
@media (min-width: 769px) and (max-width: 1117px){
  .hdr{
    padding: 12px 16px;
    gap: 12px;
  }

  .brand-header,
  .brand-main,
  #mwHomeLink{
    font-size: 24px;
  }

  .hdr-center{
    position: static;
    transform: none;
    flex: 1 1 auto;
    font-size: 13px;
    letter-spacing: .14em;
    text-align: center;
    min-width: 0;
  }

  .nav{
    min-width: 0;
    flex: 0 0 auto;
    gap: 8px;
  }

  .nav-link{
    font-size: 13px;
  }

  .nav-button{
    padding: 7px 11px;
    font-size: 13px;
  }
}

/* ===== Mobile Header v1 – Matawow / Willhaben-Prinzip ===== */
#mwMobileBurger,
#mwMobileActions,
.mw-mobile-drawer,
.mw-mobile-drawer-backdrop{
  display:none;
}


@media(max-width: 768px){
  .hdr{
    display:grid;
    grid-template-columns: 42px minmax(0, 1fr) 96px;
    align-items:center;
    gap:10px;
    padding:10px 14px;
  }

  #mwMobileBurger{
    display:inline-flex;
  }

  .brand{
    grid-column:2;
    justify-content:flex-start;
  }


  .brand-header,
  .brand-main,
  #mwHomeLink{
    font-size:22px;
  }

  .hdr-center{
    display:none !important;
  }

  .nav{
    display:none !important;
  }

#mwMobileActions{
  display:inline-flex;
  align-items:center;
  gap:12px;
  justify-content:flex-end;
  margin-right:8px;
}

  .mw-mobile-icon{
    width:38px;
    height:38px;
    border-radius:12px;
    border:1px solid rgba(148,163,184,.28);
    background:rgba(15,23,42,.74);
    color:#22c55e;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    box-shadow:0 10px 24px rgba(0,0,0,.22);
    backdrop-filter:blur(8px);
  }

  .mw-mobile-burger{
    flex-direction:column;
    gap:5px;
    cursor:pointer;
  }

  .mw-mobile-burger span{
    width:18px;
    height:2px;
    border-radius:999px;
    background:#22c55e;
    box-shadow:0 0 10px rgba(34,197,94,.35);
  }

  .mw-mobile-msg{
    font-size:18px;
    line-height:1;
  }

  .mw-mobile-avatar{
    width:38px;
    height:38px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    text-decoration:none;
    background:radial-gradient(circle at 30% 20%, rgba(226,232,240,.9), rgba(71,85,105,.9));
    border:2px solid rgba(148,163,184,.7);
    box-shadow:0 10px 24px rgba(0,0,0,.25);
  }

  .mw-mobile-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }

  .mw-mobile-avatar-fallback{
    color:#020617;
    font-weight:900;
    font-size:14px;
  }

  .mw-mobile-avatar.mw-status-verified{
    border-color:rgba(255,196,0,.9);
    box-shadow:0 0 0 1px rgba(255,196,0,.25), 0 0 18px rgba(255,196,0,.35);
  }

  .mw-mobile-avatar.mw-status-trusted{
    border-color:rgba(96,165,250,.95);
    box-shadow:0 0 0 1px rgba(96,165,250,.25), 0 0 18px rgba(96,165,250,.32);
  }

  .mw-mobile-avatar.mw-status-pending{
    border-color:rgba(34,197,94,.95);
    box-shadow:0 0 0 1px rgba(34,197,94,.22), 0 0 18px rgba(34,197,94,.32);
  }

  .mw-mobile-avatar.mw-status-blocked{
    border-color:rgba(239,68,68,.95);
    box-shadow:0 0 0 1px rgba(239,68,68,.25), 0 0 18px rgba(239,68,68,.35);
  }

  .mw-mobile-drawer-backdrop{
    position:fixed;
    inset:0;
    z-index:8000;
    background:rgba(2,6,15,.58);
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease;
  }

  .mw-mobile-drawer{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    z-index:8001;
    width:min(72vw, 300px);
    padding:16px;
    background:rgba(8,12,22,.96);
    border-right:1px solid rgba(148,163,184,.18);
    box-shadow:30px 0 80px rgba(0,0,0,.45);
    backdrop-filter:blur(10px);
    transform:translateX(-104%);
    transition:transform .22s ease;
  }

  body.mw-mobile-drawer-open .mw-mobile-drawer-backdrop{
    display:block;
    opacity:1;
    pointer-events:auto;
  }

  body.mw-mobile-drawer-open .mw-mobile-drawer{
    display:block;
    transform:translateX(0);
  }

  .mw-mobile-drawer-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:4px 2px 16px;
    color:#f8fafc;
    font-size:20px;
  }

  #mwMobileDrawerClose{
    width:36px;
    height:36px;
    border-radius:999px;
    border:1px solid rgba(148,163,184,.24);
    background:rgba(15,23,42,.88);
    color:#e5e7eb;
    font-size:22px;
    cursor:pointer;
  }

  .mw-mobile-drawer-nav{
    display:flex;
    flex-direction:column;
    gap:8px;
  }

  .mw-mobile-drawer-nav a{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:46px;
    padding:11px 12px;
    border-radius:14px;
    color:#e5e7eb;
    text-decoration:none;
    font-weight:700;
    background:rgba(255,255,255,.035);
    border:1px solid rgba(255,255,255,.07);
  }

  .mw-mobile-drawer-nav a:hover{
    background:rgba(34,197,94,.10);
    border-color:rgba(34,197,94,.26);
  }

  .mw-mobile-drawer-sep{
    height:1px;
    margin:8px 0;
    background:rgba(148,163,184,.18);
  }
}
@media(max-width: 768px){
  .mw-mobile-drawer{
    background: rgba(8,12,22,.98);
  }

  .mw-mobile-drawer-head{
    font-size: 21px;
    font-weight: 800;
    padding-bottom: 22px;
  }

  #mwMobileDrawerClose{
    transition: background .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease;
  }

  #mwMobileDrawerClose:hover{
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.42);
    box-shadow: 0 0 18px rgba(34,197,94,.22);
  }

  #mwMobileDrawerClose:active{
    transform: scale(.94);
  }

  .mw-mobile-drawer-nav{
    gap: 7px;
  }

  .mw-mobile-drawer-nav a{
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(226,232,240,.92);
    background: rgba(255,255,255,.025);
    border-color: rgba(255,255,255,.055);
    transition:
      background .16s ease,
      border-color .16s ease,
      transform .10s ease,
      color .16s ease,
      box-shadow .16s ease;
  }

  .mw-mobile-drawer-nav a:hover{
    color: #f8fafc;
    background: rgba(34,197,94,.075);
    border-color: rgba(34,197,94,.24);
    box-shadow: 0 8px 22px rgba(0,0,0,.20);
  }

  .mw-mobile-drawer-nav a:active{
    transform: scale(.985);
    background: rgba(34,197,94,.13);
  }
}
@media(max-width: 768px){
  .mw-announcement.is-visible{
    display:block !important;
  }

  .mw-announcement-inner{
    padding: 6px 12px;
    font-size: 11.5px;
  }

  .mw-mobile-drawer{
    top: 48px;
    bottom: auto;
    max-height: calc(100dvh - 52px);
    overflow-y: auto;
    border-radius: 0 22px 22px 0;
  }

  .mw-mobile-drawer-nav a{
    cursor: pointer;
    font-weight: 560;
  }

  .mw-mobile-drawer-nav a:hover,
  .mw-mobile-drawer-nav a:focus-visible{
    color:#f8fafc;
    background: rgba(34,197,94,.11);
    border-color: rgba(34,197,94,.34);
    box-shadow:
      0 8px 22px rgba(0,0,0,.22),
      inset 0 0 0 1px rgba(34,197,94,.08);
    transform: translateX(2px);
  }

  .mw-mobile-drawer-nav a:active{
    transform: translateX(2px) scale(.985);
    background: rgba(34,197,94,.16);
  }

  .mw-drawer-mark{
    width: 22px;
    min-width: 22px;
    display:inline-flex;
    justify-content:center;
    color:#22c55e;
    font-weight:800;
    text-shadow:0 0 12px rgba(34,197,94,.28);
  }

  #mwMobileDrawerClose:hover,
  #mwMobileDrawerClose:focus-visible{
    background: rgba(34,197,94,.14);
    border-color: rgba(34,197,94,.48);
    color:#fff;
    box-shadow:0 0 22px rgba(34,197,94,.28);
  }
}

@media(max-width: 768px){
  .mw-mobile-drawer{
    border-right: 2px solid rgba(34,197,94,.65);
    box-shadow:
      18px 0 60px rgba(0,0,0,.55),
      0 0 28px rgba(34,197,94,.14);
  }

  body.mw-mobile-drawer-open #mwMobileAvatar{
    opacity: .35;
    filter: blur(.4px);
  }

  .mw-mobile-drawer-nav a:hover,
  .mw-mobile-drawer-nav a:active,
  .mw-mobile-drawer-nav a:focus-visible{
    background: rgba(34,197,94,.13);
    border-color: rgba(34,197,94,.38);
    transform: translateX(3px);
  }
}
@media(max-width: 768px){
  .mw-mobile-drawer{
    border-top: 1px solid rgba(34,197,94,.65);
    border-right: 2px solid rgba(34,197,94,.72);
    border-bottom: 1px solid rgba(34,197,94,.65);
    border-left: none;
    overflow: hidden auto;
  }
}
@media(max-width: 768px){
  #mwMobileDrawerClose:hover,
  #mwMobileDrawerClose:active,
  #mwMobileDrawerClose:focus-visible{
    background: rgba(34,197,94,.16) !important;
    border-color: rgba(34,197,94,.65) !important;
    color: #fff !important;
    box-shadow: 0 0 22px rgba(34,197,94,.35) !important;
    transform: scale(.96);
  }

  .mw-mobile-drawer-nav a:hover,
  .mw-mobile-drawer-nav a:active,
  .mw-mobile-drawer-nav a:focus-visible{
    background: rgba(34,197,94,.14) !important;
    border-color: rgba(34,197,94,.42) !important;
    color: #fff !important;
    box-shadow:
      0 8px 24px rgba(0,0,0,.24),
      inset 0 0 0 1px rgba(34,197,94,.10) !important;
    transform: translateX(3px);
  }
}

@media(max-width:768px){
  body.mw-mobile-drawer-open #mwMobileMessages{
    opacity: 0;
    visibility: hidden;
  }

  body.mw-mobile-drawer-open #mwMobileAvatar{
    opacity: .35;
    filter: blur(.4px);
  }
}
#mwMobileMessages{
  position:relative;
}

#mwMobileMessages.has-unread{
  box-shadow:
    0 0 0 1px rgba(32,224,178,.28),
    0 0 18px rgba(32,224,178,.35);
}

#mwMobileMessages.has-unread::after{
  content:"!";
  position:absolute;
  top:-4px;
  right:-4px;
  width:16px;
  height:16px;
  border-radius:999px;
  background:#20e0b2;
  color:#061117;
  font-size:10px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 0 10px rgba(32,224,178,.45);
}

@media(max-width:768px){
  #mwMobileDrawerMessages{
    position:relative;
  }

  #mwMobileDrawerMessages.has-unread{
    border-color:rgba(32,224,178,.36) !important;
    box-shadow:
      0 0 0 1px rgba(32,224,178,.10),
      0 8px 22px rgba(32,224,178,.10);
  }

  #mwMobileDrawerMsgBadge{
    margin-left:auto;
    min-width:20px;
    height:20px;
    padding:0 6px;
    border-radius:999px;
    background:#20e0b2;
    color:#061117;
    font-size:11px;
    font-weight:900;
    display:none;
    align-items:center;
    justify-content:center;
    box-shadow:0 0 12px rgba(32,224,178,.45);
  }

  #mwMobileDrawerMsgBadge.show{
    display:inline-flex;
  }
}

/* === Sprint 18 Global Mobile Drawer Layer Fix === */
@media(max-width:768px){
  .header-blur{
    z-index:5000 !important;
  }

  .mw-mobile-drawer-backdrop{
    z-index:12000 !important;
  }

  .mw-mobile-drawer{
    z-index:12001 !important;
    top:72px !important;
    max-height:calc(100dvh - 76px) !important;
  }
}

/* FIX 17 – Einheitlicher Mobile-Header bis 380px */
@media (max-width: 380px) {
  .hdr {
    grid-template-columns: 42px minmax(0, 1fr) 82px;
    gap: 8px;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
  }


  .brand-header,
  .brand-main,
  #mwHomeLink {
    display: block;
    font-size: 20px;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }


  #mwMobileActions {
    gap: 10px;
    margin-right: 0;
  }

  .mw-mobile-icon,
  .mw-mobile-avatar {
    width: 36px;
    height: 36px;
  }
}
