/* MG Technical consent manager */
.mg-consent-root{font-family:"Manrope","Segoe UI",Arial,sans-serif}
.mg-consent-banner{
  position:fixed;left:18px;right:18px;bottom:18px;z-index:9998;
  width:min(760px,calc(100% - 36px));margin-left:auto;
  padding:20px 20px 18px;border:1px solid rgba(255,255,255,.12);border-radius:18px;
  background:#171713;color:#fff;box-shadow:0 26px 80px rgba(0,0,0,.44)
}
.mg-consent-banner[hidden]{display:none!important}
.mg-consent-kicker{display:block;margin-bottom:8px;color:#e3c28a;font-size:8px;font-weight:700;letter-spacing:.18em}
.mg-consent-title{margin:0 0 7px;font:500 clamp(22px,2.7vw,31px)/1.12 Georgia,"Times New Roman",serif;letter-spacing:-.02em}
.mg-consent-copy{max-width:680px;margin:0;color:rgba(255,255,255,.62);font-size:11px;line-height:1.65}
.mg-consent-copy a{color:#e3c28a;text-decoration:underline;text-underline-offset:3px}
.mg-consent-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:16px}
.mg-consent-btn{min-height:40px;padding:0 15px;border-radius:999px;border:1px solid rgba(255,255,255,.16);background:transparent;color:#fff;font:700 9px/1 "Manrope","Segoe UI",Arial,sans-serif;letter-spacing:.055em;cursor:pointer}
.mg-consent-btn.primary{border-color:#e3c28a;background:#e3c28a;color:#171713}
.mg-consent-btn.ghost{color:rgba(255,255,255,.72)}
.mg-consent-btn:hover{border-color:#e3c28a}

.mg-consent-overlay{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.68)}
.mg-consent-overlay[hidden]{display:none!important}
.mg-consent-panel{width:min(620px,100%);max-height:min(760px,calc(100vh - 36px));overflow:auto;border:1px solid rgba(255,255,255,.12);border-radius:20px;background:#171713;color:#fff;box-shadow:0 30px 90px rgba(0,0,0,.55)}
.mg-consent-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 22px 16px;border-bottom:1px solid rgba(255,255,255,.09)}
.mg-consent-panel-head h2{margin:0 0 6px;font:500 28px/1.08 Georgia,"Times New Roman",serif}
.mg-consent-panel-head p{margin:0;color:rgba(255,255,255,.52);font-size:10px;line-height:1.55}
.mg-consent-close{width:36px;height:36px;flex:0 0 auto;border:1px solid rgba(255,255,255,.12);border-radius:50%;background:transparent;color:#fff;font-size:22px;line-height:1;cursor:pointer}
.mg-consent-list{padding:4px 22px}
.mg-consent-row{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;padding:17px 0;border-bottom:1px solid rgba(255,255,255,.08)}
.mg-consent-row:last-child{border-bottom:0}
.mg-consent-row strong{display:block;margin-bottom:5px;font-size:12px}
.mg-consent-row p{margin:0;color:rgba(255,255,255,.48);font-size:10px;line-height:1.55}
.mg-consent-required{color:#e3c28a;font-size:8px;font-weight:700;letter-spacing:.1em}
.mg-consent-switch{position:relative;width:42px;height:24px;display:block}
.mg-consent-switch input{position:absolute;opacity:0;pointer-events:none}
.mg-consent-switch span{position:absolute;inset:0;border-radius:999px;background:#373731;border:1px solid rgba(255,255,255,.12);cursor:pointer;transition:.2s}
.mg-consent-switch span:after{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:#fff;transition:.2s}
.mg-consent-switch input:checked+span{background:#e3c28a;border-color:#e3c28a}
.mg-consent-switch input:checked+span:after{transform:translateX(18px);background:#171713}
.mg-consent-panel-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;padding:16px 22px 22px;border-top:1px solid rgba(255,255,255,.09)}
html.mg-consent-modal-open,html.mg-consent-modal-open body{overflow:hidden!important}

@media(max-width:640px){
  .mg-consent-banner{left:10px;right:10px;bottom:10px;width:calc(100% - 20px);padding:17px 16px 15px;border-radius:16px}
  .mg-consent-actions{display:grid;grid-template-columns:1fr 1fr}
  .mg-consent-actions .mg-consent-btn:first-child{grid-column:1/-1}
  .mg-consent-btn{min-height:42px;padding:0 10px;font-size:8px}
  .mg-consent-overlay{padding:10px;align-items:end}
  .mg-consent-panel{max-height:calc(100vh - 20px);border-radius:18px 18px 12px 12px}
  .mg-consent-panel-head{padding:19px 17px 14px}
  .mg-consent-list{padding:2px 17px}
  .mg-consent-panel-actions{padding:14px 17px 17px;display:grid;grid-template-columns:1fr 1fr}
  .mg-consent-panel-actions .primary{grid-column:1/-1;grid-row:1}
}


/* First-visit consent gate — requires an explicit choice before interaction. */
html.mg-consent-first-visit,html.mg-consent-first-visit body{overflow:hidden!important}
.mg-consent-root.first-visit::before{
  content:"";position:fixed;inset:0;z-index:9997;background:rgba(7,7,6,.78);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)
}
.mg-consent-root.first-visit .mg-consent-banner{
  left:50%;right:auto;bottom:50%;z-index:9998;width:min(720px,calc(100% - 32px));margin:0;
  transform:translate(-50%,50%);padding:26px 26px 24px;border-radius:20px;
  background:#151512;box-shadow:0 35px 100px rgba(0,0,0,.62)
}
.mg-consent-root.first-visit .mg-consent-title{font-size:clamp(26px,3vw,38px)}
.mg-consent-root.first-visit .mg-consent-copy{font-size:12px;line-height:1.7}
@media(max-width:640px){
  .mg-consent-root.first-visit .mg-consent-banner{width:calc(100% - 20px);padding:20px 17px 17px;border-radius:18px}
  .mg-consent-root.first-visit .mg-consent-actions{grid-template-columns:1fr 1fr}
  .mg-consent-root.first-visit .mg-consent-actions .mg-consent-btn:first-child{grid-column:1/-1}
}


/* =========================================================
   COOKIE BANNER REFINEMENT — 2026-08-27 v3
   Bottom banner on first visit, no blur, cleaner/minimal UI.
   ========================================================= */
.mg-consent-banner{
  left:50%;
  right:auto;
  bottom:16px;
  transform:translateX(-50%);
  z-index:9998;
  width:min(980px,calc(100% - 32px));
  margin:0;
  padding:16px 18px 15px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:18px;
  background:#121210;
  color:#fff;
  box-shadow:0 16px 40px rgba(0,0,0,.28);
}
.mg-consent-kicker{
  margin-bottom:6px;
  font-size:7px;
  letter-spacing:.16em;
  opacity:.92;
}
.mg-consent-title{
  margin:0 0 5px;
  font-size:clamp(22px,2.4vw,28px);
  line-height:1.08;
}
.mg-consent-copy{
  max-width:720px;
  color:rgba(255,255,255,.64);
  font-size:10px;
  line-height:1.58;
}
.mg-consent-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}
.mg-consent-btn{
  min-height:40px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:transparent;
  color:#fff;
  font-size:9px;
  letter-spacing:.05em;
}
.mg-consent-btn.ghost{
  background:rgba(255,255,255,.03);
  color:rgba(255,255,255,.88);
}
.mg-consent-btn.primary{
  border-color:#e3c28a;
  background:#e3c28a;
  color:#171713;
}
.mg-consent-btn[data-consent-open]{
  order:-1;
  margin-right:auto;
  min-height:auto;
  padding:0;
  border:0;
  background:none;
  color:rgba(255,255,255,.62);
  font-size:9px;
  letter-spacing:.04em;
}
.mg-consent-btn[data-consent-open]:hover{
  color:#fff;
  border:0;
}

/* Keep first-visit choice mandatory, but remove the visual blur/modal effect. */
html.mg-consent-first-visit,
html.mg-consent-first-visit body{
  overflow:hidden!important;
}
.mg-consent-root.first-visit::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:9997;
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.mg-consent-root.first-visit .mg-consent-banner{
  left:50%;
  right:auto;
  bottom:16px;
  width:min(980px,calc(100% - 32px));
  transform:translateX(-50%);
  padding:16px 18px 15px;
  border-radius:18px;
  background:#121210;
  box-shadow:0 16px 40px rgba(0,0,0,.28);
}
.mg-consent-root.first-visit .mg-consent-title{
  font-size:clamp(22px,2.4vw,28px);
}
.mg-consent-root.first-visit .mg-consent-copy{
  font-size:10px;
  line-height:1.58;
}

@media(max-width:640px){
  .mg-consent-banner,
  .mg-consent-root.first-visit .mg-consent-banner{
    left:12px;
    right:12px;
    bottom:12px;
    width:auto;
    transform:none;
    padding:15px 14px 14px;
    border-radius:16px;
  }
  .mg-consent-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    align-items:stretch;
  }
  .mg-consent-btn{
    min-height:40px;
    padding:0 10px;
    font-size:8px;
  }
  .mg-consent-btn[data-consent-open]{
    grid-column:1/-1;
    order:0;
    margin-right:0;
    justify-self:start;
    min-height:auto;
    padding:2px 0 0;
  }
}


/* Crisp consent typography — 2026-08-27 v4 */
.mg-consent-root,
.mg-consent-root *{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
  text-shadow:none;
}


/* =========================================================
   NON-BLOCKING COOKIE CONSENT — 2026-08-27 v5
   Cookie choice stays visible but never locks page scrolling.
   ========================================================= */
html.mg-consent-first-visit,
html.mg-consent-first-visit body,
html.mg-consent-modal-open,
html.mg-consent-modal-open body{
  overflow-y:auto !important;
  overflow-x:hidden !important;
}

/* No invisible full-page layer on first visit. */
.mg-consent-root.first-visit::before{
  display:none !important;
  content:none !important;
  pointer-events:none !important;
}

/* The bottom banner itself remains interactive. */
.mg-consent-root.first-visit .mg-consent-banner,
.mg-consent-banner{
  pointer-events:auto !important;
}


/* =========================================================
   MOBILE COOKIE UI — 2026-08-27 v6
   Cleaner banner buttons + responsive settings bottom sheet.
   ========================================================= */
@media (max-width:640px){
  .mg-consent-banner,
  .mg-consent-root.first-visit .mg-consent-banner{
    left:10px !important;
    right:10px !important;
    bottom:calc(10px + env(safe-area-inset-bottom)) !important;
    width:auto !important;
    max-height:calc(100dvh - 20px - env(safe-area-inset-bottom)) !important;
    transform:none !important;
    overflow:auto !important;
    padding:15px 14px 13px !important;
    border-radius:16px !important;
  }

  .mg-consent-kicker{
    margin-bottom:5px !important;
    font-size:7px !important;
  }

  .mg-consent-title,
  .mg-consent-root.first-visit .mg-consent-title{
    margin-bottom:6px !important;
    font-size:21px !important;
    line-height:1.08 !important;
  }

  .mg-consent-copy,
  .mg-consent-root.first-visit .mg-consent-copy{
    font-size:9.5px !important;
    line-height:1.55 !important;
  }

  .mg-consent-actions,
  .mg-consent-root.first-visit .mg-consent-actions{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:8px !important;
    margin-top:13px !important;
  }

  .mg-consent-actions .mg-consent-btn,
  .mg-consent-root.first-visit .mg-consent-actions .mg-consent-btn{
    width:100% !important;
    min-width:0 !important;
    min-height:42px !important;
    padding:0 9px !important;
    font-size:8.5px !important;
    line-height:1.2 !important;
    white-space:normal !important;
    text-align:center !important;
  }

  .mg-consent-actions .mg-consent-btn:first-child,
  .mg-consent-root.first-visit .mg-consent-actions .mg-consent-btn:first-child{
    grid-column:auto !important;
  }

  .mg-consent-btn[data-consent-open],
  .mg-consent-root.first-visit .mg-consent-btn[data-consent-open]{
    grid-column:1/-1 !important;
    width:max-content !important;
    min-height:26px !important;
    padding:3px 0 0 !important;
    margin:0 !important;
    justify-self:start !important;
    border:0 !important;
    background:transparent !important;
    text-align:left !important;
    font-size:8.5px !important;
  }

  /* Settings opens as a proper mobile bottom sheet. */
  .mg-consent-overlay{
    align-items:end !important;
    padding:12px 10px 0 !important;
    background:rgba(0,0,0,.56) !important;
  }

  .mg-consent-panel{
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
    max-width:520px !important;
    max-height:calc(88dvh - env(safe-area-inset-bottom)) !important;
    margin:0 auto !important;
    overflow:hidden !important;
    border-radius:20px 20px 0 0 !important;
    box-shadow:0 -12px 42px rgba(0,0,0,.38) !important;
  }

  .mg-consent-panel-head{
    flex:0 0 auto !important;
    align-items:center !important;
    gap:12px !important;
    padding:17px 16px 14px !important;
  }

  .mg-consent-panel-head h2{
    margin:0 0 4px !important;
    font-size:23px !important;
    line-height:1.08 !important;
  }

  .mg-consent-panel-head p{
    max-width:290px !important;
    font-size:9px !important;
    line-height:1.45 !important;
  }

  .mg-consent-close{
    display:grid !important;
    place-items:center !important;
    width:34px !important;
    height:34px !important;
    padding:0 !important;
    font-size:20px !important;
    line-height:1 !important;
  }

  .mg-consent-list{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    -webkit-overflow-scrolling:touch !important;
    padding:0 16px !important;
  }

  .mg-consent-row{
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:12px !important;
    padding:14px 0 !important;
  }

  .mg-consent-row strong{
    margin-bottom:4px !important;
    font-size:11px !important;
  }

  .mg-consent-row p{
    font-size:9px !important;
    line-height:1.5 !important;
  }

  .mg-consent-required{
    max-width:76px !important;
    text-align:right !important;
    font-size:7px !important;
    line-height:1.35 !important;
  }

  .mg-consent-switch{
    width:42px !important;
    height:24px !important;
    flex:0 0 42px !important;
  }

  .mg-consent-panel-actions{
    flex:0 0 auto !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
    padding:12px 16px calc(14px + env(safe-area-inset-bottom)) !important;
    background:#171713 !important;
  }

  .mg-consent-panel-actions .mg-consent-btn{
    width:100% !important;
    min-height:43px !important;
    padding:0 12px !important;
    font-size:8.5px !important;
  }

  .mg-consent-panel-actions .primary{
    grid-column:auto !important;
    grid-row:1 !important;
  }

  .mg-consent-panel-actions [data-consent-reject]{
    grid-row:2 !important;
  }
}

@media (max-width:360px){
  .mg-consent-actions,
  .mg-consent-root.first-visit .mg-consent-actions{
    grid-template-columns:1fr !important;
  }

  .mg-consent-btn[data-consent-open],
  .mg-consent-root.first-visit .mg-consent-btn[data-consent-open]{
    grid-column:1 !important;
  }

  .mg-consent-title,
  .mg-consent-root.first-visit .mg-consent-title{
    font-size:19px !important;
  }
}

@media (max-width:640px) and (max-height:700px){
  .mg-consent-banner,
  .mg-consent-root.first-visit .mg-consent-banner{
    padding:12px 13px 11px !important;
  }

  .mg-consent-title,
  .mg-consent-root.first-visit .mg-consent-title{
    font-size:19px !important;
  }

  .mg-consent-copy,
  .mg-consent-root.first-visit .mg-consent-copy{
    font-size:9px !important;
    line-height:1.45 !important;
  }

  .mg-consent-actions,
  .mg-consent-root.first-visit .mg-consent-actions{
    margin-top:10px !important;
  }

  .mg-consent-actions .mg-consent-btn,
  .mg-consent-root.first-visit .mg-consent-actions .mg-consent-btn{
    min-height:38px !important;
  }

  .mg-consent-panel{
    max-height:94dvh !important;
  }
}


/* Mobile viewport stability for cookie UI — 2026-08-27 v15 */
@media (max-width:640px){
  .mg-consent-overlay{
    min-height:var(--stable-mobile-vh,100svh) !important;
  }

  .mg-consent-panel{
    max-height:calc((var(--stable-mobile-vh,100svh) * .90) - env(safe-area-inset-bottom)) !important;
  }

  .mg-consent-banner,
  .mg-consent-root.first-visit .mg-consent-banner{
    padding:14px 14px 13px !important;
  }

  .mg-consent-title,
  .mg-consent-root.first-visit .mg-consent-title{
    font-size:20px !important;
  }

  .mg-consent-copy,
  .mg-consent-root.first-visit .mg-consent-copy{
    font-size:9.5px !important;
    line-height:1.48 !important;
  }
}


@media (max-width:640px){
  .mg-consent-actions,
  .mg-consent-root.first-visit .mg-consent-actions{
    margin-top:11px !important;
  }
  .mg-consent-actions .mg-consent-btn,
  .mg-consent-root.first-visit .mg-consent-actions .mg-consent-btn{
    min-height:40px !important;
  }
}
