/* =========================================================
   HHC – Inline VVK Patch (ESG-like Mobile Experience)
   Scope: #hh-inline-vvk-fusion
   v20260225-inline-mobile-esg-like-opt
   ========================================================= */

/* ---------------------------------------------------------
   Base polish / fixes (scoped)
   --------------------------------------------------------- */

/* ✅ Card content global mittig (Desktop + Mobile, wie gewünscht) */
#hh-inline-vvk-fusion .vvk-box{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;

  /* Text-Crop / Height-Fix (ESG-Patch-Idee) */
  height:auto !important;
  min-height:170px;
  padding-bottom:18px;
}

#hh-inline-vvk-fusion .vvk-icon{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  margin:0 0 8px;
  transition:transform .25s ease;
  will-change:transform;
  transform:translateZ(0);
}

#hh-inline-vvk-fusion .vvk-title,
#hh-inline-vvk-fusion .vvk-text{
  width:100%;
  text-align:center;
}

#hh-inline-vvk-fusion .vvk-text{
  overflow:visible !important;
  display:block !important;
  white-space:normal !important;
  -webkit-line-clamp:unset !important;
  line-clamp:unset !important;
  max-height:none !important;
  overflow-wrap:anywhere;
  word-break:normal;
}

/* Optional: falls hh-amount in Text eng wird */
#hh-inline-vvk-fusion .hh-amount{
  white-space:nowrap;
  font-weight:850;
}

/* ✅ Mini Link / Modal Trigger */
#hh-inline-vvk-fusion .vvk-miniLink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  padding:6px 10px;
  margin-top:10px;
  margin-left:auto;
  margin-right:auto;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(37,99,235,.06);
  color:rgba(15,23,42,.92);
  font-weight:850;
  font-size:12px;
  line-height:1.2;
  text-decoration:none;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
#hh-inline-vvk-fusion .vvk-miniLink:focus-visible{
  outline:3px solid rgba(56,189,248,.55);
  outline-offset:4px;
}

/* ✅ Compact Switch (Default ON) */
#hh-inline-vvk-fusion .vvk-switchRow{
  display:flex;
  align-items:center;
  justify-content:center; /* global mittig */
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}
#hh-inline-vvk-fusion .vvk-switchLabel{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:2px;
  min-width:0;
}
#hh-inline-vvk-fusion .vvk-switchLabel strong{
  font-size:12px;
  font-weight:950;
  color:rgba(15,23,42,.92);
}
#hh-inline-vvk-fusion .vvk-switchLabel span{
  font-size:12px;
  color:rgba(71,85,105,.92);
  line-height:1.35;
}
#hh-inline-vvk-fusion .vvk-switch{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}
#hh-inline-vvk-fusion .vvk-switch input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
#hh-inline-vvk-fusion .vvk-switchTrack{
  width:46px;
  height:26px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(148,163,184,.35);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
  transition:background .2s ease, border-color .2s ease;
  position:relative;
}
#hh-inline-vvk-fusion .vvk-switchKnob{
  width:22px;
  height:22px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  position:absolute;
  top:50%;
  left:2px;
  transform:translateY(-50%);
  transition:left .2s ease;
  box-shadow:0 10px 20px rgba(0,0,0,.10);
}
#hh-inline-vvk-fusion .vvk-switch input:checked + .vvk-switchTrack{
  background:rgba(56,189,248,.55);
  border-color:rgba(56,189,248,.55);
}
#hh-inline-vvk-fusion .vvk-switch input:checked + .vvk-switchTrack .vvk-switchKnob{
  left:22px;
}
#hh-inline-vvk-fusion .vvk-switchState{
  font-size:12px;
  font-weight:900;
  color:rgba(15,23,42,.92);
  min-width:34px;
  text-align:right;
}
#hh-inline-vvk-fusion .vvk-switch input:focus-visible + .vvk-switchTrack{
  outline:3px solid rgba(56,189,248,.55);
  outline-offset:4px;
}

/* ✅ Keyboard Glow (global) */
#hh-inline-vvk-fusion .vvk-box:focus-visible{
  outline:3px solid rgba(56,189,248,.55);
  outline-offset:4px;
  border-radius:18px;
  box-shadow:
    0 0 26px rgba(56,189,248,.40),
    0 0 52px rgba(37,99,235,.24),
    0 10px 26px rgba(0,0,0,.06);
}

/* ---------------------------------------------------------
   Desktop Hover Glow (konsistent, scoped)
   --------------------------------------------------------- */
@media (hover:hover) and (pointer:fine){
  #hh-inline-vvk-fusion .vvk-box{
    transition:
      transform .25s ease,
      box-shadow .25s ease,
      border-color .25s ease,
      background .25s ease;
    isolation:isolate;
  }

  #hh-inline-vvk-fusion .vvk-box:hover{
    transform:translateY(-6px) scale(1.02);
    box-shadow:
      0 0 30px rgba(56,189,248,.45),
      0 0 60px rgba(37,99,235,.30),
      0 12px 32px rgba(0,0,0,.07);
    border-color:rgba(56,189,248,.35);
    background:linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(224,242,254,.90) 100%);
  }

  #hh-inline-vvk-fusion .vvk-box:hover .vvk-icon{
    transform:translateY(-1px) scale(1.10);
  }

  #hh-inline-vvk-fusion .vvk-box.vvk-box--highlight:hover{
    box-shadow:
      0 0 36px rgba(56,189,248,.55),
      0 0 72px rgba(37,99,235,.34),
      0 14px 36px rgba(0,0,0,.08);
    border-color:rgba(56,189,248,.45);
  }
}

/* ---------------------------------------------------------
   Desktop: 4 Spalten erzwingen
   --------------------------------------------------------- */
@media (min-width:900px){
  #hh-inline-vvk-fusion .vvk-clip{
    overflow:visible !important;
  }

  #hh-inline-vvk-fusion .vvk-grid{
    display:grid !important;
    grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
    gap:18px !important;
    overflow:visible !important;
    padding:0 !important;
    margin:0 !important;
  }

  #hh-inline-vvk-fusion .vvk-box{
    min-width:0 !important;
    max-width:none !important;
  }

  /* alte + neue mobile UI ausblenden */
  #hh-inline-vvk-fusion .vvk-progress,
  #hh-inline-vvk-fusion .vvk-dots,
  #hh-inline-vvk-fusion .vvk-progress2{
    display:none !important;
  }
}

/* ---------------------------------------------------------
   Mobile / Touch: ESG-like Active Glow + Dots
   --------------------------------------------------------- */
@media (hover:none) and (pointer:coarse){
  #hh-inline-vvk-fusion .vvk-surface{ position:relative; }

  #hh-inline-vvk-fusion .vvk-box{
    transition:
      transform .22s ease,
      box-shadow .22s ease,
      border-color .22s ease,
      background .22s ease;
    isolation:isolate;
  }

  /* ✅ active state: unterstützt neues + altes JS */
  #hh-inline-vvk-fusion .vvk-box.is-active,
  #hh-inline-vvk-fusion .vvk-box.vvk-active{
    transform:translateY(-4px) scale(1.015);
    box-shadow:
      0 0 30px rgba(56,189,248,.45),
      0 0 60px rgba(37,99,235,.30),
      0 12px 32px rgba(0,0,0,.07);
    border-color:rgba(56,189,248,.35);
    background:linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(224,242,254,.90) 100%);
  }

  #hh-inline-vvk-fusion .vvk-box.is-active .vvk-icon,
  #hh-inline-vvk-fusion .vvk-box.vvk-active .vvk-icon{
    transform:translateY(-1px) scale(1.10);
  }

  /* ✅ Dots im ESG-Stil */
  #hh-inline-vvk-fusion .vvk-dots{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-top:14px;
    align-items:center;
    user-select:none;
    -webkit-tap-highlight-color:transparent;
    position:relative;
    z-index:2;
  }

  #hh-inline-vvk-fusion .vvk-dot{
    width:9px;
    height:9px;
    border-radius:999px;
    border:1px solid rgba(2,6,23,.18);
    background:rgba(148,163,184,.35);
    padding:0;
    cursor:pointer;
    transition:
      transform .2s ease,
      box-shadow .2s ease,
      background .2s ease,
      border-color .2s ease;
  }

  #hh-inline-vvk-fusion .vvk-dot.vvk-dot--active{
    background:rgba(56,189,248,.85);
    border-color:rgba(56,189,248,.55);
    box-shadow:
      0 0 12px rgba(56,189,248,.42),
      0 0 26px rgba(37,99,235,.22);
    transform:scale(1.18);
  }

  #hh-inline-vvk-fusion .vvk-dot:focus-visible{
    outline:3px solid rgba(56,189,248,.55);
    outline-offset:3px;
  }
}

/* ---------------------------------------------------------
   ESG-like Progress UI (mobile) – neue Leiste + Hint
   --------------------------------------------------------- */
@media (max-width:860px){
  /* alte Leiste aus */
  #hh-inline-vvk-fusion .vvk-progress{
    display:none !important;
  }

  #hh-inline-vvk-fusion .vvk-progress2{
    position:absolute;
    left:14px;
    right:14px;
    bottom:12px;
    z-index:2;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;

    user-select:none;
    pointer-events:none;
  }

  #hh-inline-vvk-fusion .vvk-progress2__track{
    position:relative;
    width:min(320px, 72vw);
    height:4px;
    border-radius:999px;
    background:rgba(15,23,42,.12);
    overflow:hidden;
  }

  #hh-inline-vvk-fusion .vvk-progress2__fill{
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:0%;
    border-radius:999px;
    background:rgba(37,99,235,.55);
    transition:width .35s ease;
  }

  #hh-inline-vvk-fusion .vvk-swipe-hint2{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:26px;
    height:26px;
    border-radius:999px;
    border:1px solid rgba(0,0,0,.06);
    background:rgba(255,255,255,.92);
    box-shadow:0 8px 18px rgba(0,0,0,.06);
    color:rgba(15,23,42,.60);
    font-size:15px;
    line-height:1;

    transform:translateX(0);
    animation:hhVvkSwipeNudge 1.35s cubic-bezier(.22,.61,.36,1) infinite;
    will-change:transform, opacity;
  }

  @keyframes hhVvkSwipeNudge{
    0%   { transform:translateX(0); opacity:.55; }
    45%  { transform:translateX(7px); opacity:.92; }
    80%  { transform:translateX(0); opacity:.70; }
    100% { transform:translateX(0); opacity:.55; }
  }

  #hh-inline-vvk-fusion .vvk-swipe-hint2.is-hidden{
    opacity:0;
    transform:translateX(0);
    animation:none;
  }

  #hh-inline-vvk-fusion .vvk-swipe-hint2.is-prime{
    box-shadow:
      0 8px 18px rgba(0,0,0,.06),
      0 0 0 6px rgba(56,189,248,.10);
  }
}

/* ---------------------------------------------------------
   Modal final styling (shared, scoped)
   --------------------------------------------------------- */
#hh-inline-vvk-fusion .vvk-modal[hidden]{ display:none !important; }

#hh-inline-vvk-fusion .vvk-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  padding:18px;
  isolation:isolate;
}

#hh-inline-vvk-fusion .vvk-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(2,6,23,.55);
}

#hh-inline-vvk-fusion .vvk-modal-panel{
  position:relative;
  width:min(720px, 92vw);
  max-height:min(84vh, 780px);
  overflow:auto;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.18);
  background:#fff;
  box-shadow:0 24px 80px rgba(0,0,0,.25);
  padding:18px 18px 16px;
}

#hh-inline-vvk-fusion .vvk-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

#hh-inline-vvk-fusion .vvk-modal-title{
  margin:0;
  font-size:18px;
  font-weight:950;
  letter-spacing:-.01em;
  color:#0f172a;
}

#hh-inline-vvk-fusion .vvk-modal-close{
  appearance:none;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(37,99,235,.06);
  color:#0f172a;
  width:38px;
  height:38px;
  border-radius:12px;
  cursor:pointer;
  font-size:20px;
  line-height:1;
  display:grid;
  place-items:center;
}

#hh-inline-vvk-fusion .vvk-modal-close:focus-visible{
  outline:3px solid rgba(56,189,248,.55);
  outline-offset:4px;
}

#hh-inline-vvk-fusion .vvk-modal-body{
  color:rgba(71,85,105,.98);
  font-size:14px;
  line-height:1.55;
}

#hh-inline-vvk-fusion .vvk-modal-bullets{
  margin:12px 0 0;
  padding-left:18px;
}

#hh-inline-vvk-fusion .vvk-modal-foot{
  margin-top:12px;
  font-size:12px;
  color:rgba(100,116,139,.95);
}

/* ---------------------------------------------------------
   Reduce motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  #hh-inline-vvk-fusion .vvk-box,
  #hh-inline-vvk-fusion .vvk-icon,
  #hh-inline-vvk-fusion .vvk-dot,
  #hh-inline-vvk-fusion .vvk-miniLink,
  #hh-inline-vvk-fusion .vvk-modal-panel,
  #hh-inline-vvk-fusion .vvk-modal-close,
  #hh-inline-vvk-fusion .vvk-switchTrack,
  #hh-inline-vvk-fusion .vvk-switchKnob,
  #hh-inline-vvk-fusion .vvk-progress2__fill,
  #hh-inline-vvk-fusion .vvk-swipe-hint2{
    transition:none !important;
    animation:none !important;
  }
}