/* AMIC_CONTEXTUAL_HOVER_POPUPS_V1_0_2 */

:root{
  --amic-hover-popup-bg:#fff;
  --amic-hover-popup-border:#97b8e1;
  --amic-hover-popup-shadow:0 22px 56px rgba(8,35,70,.24);
  --amic-hover-popup-blue:#1f64b9;
  --amic-hover-popup-soft:#eef5ff;
}

/* Remove / hide previous explicit info buttons */
.amic-help-trigger,
.amic-frame-help,
.amic-sidebar-help-dot,
.amic-frame-help-wrap{
  display:none !important;
}

/* Hover-aware targets */
.amic-hover-help-target{
  position:relative !important;
  transition:
    box-shadow .15s ease,
    border-color .15s ease,
    background-color .15s ease !important;
}

@media (hover:hover) and (pointer:fine){
  .amic-hover-help-target:hover{
    box-shadow:0 0 0 2px rgba(42,105,184,.08), 0 5px 16px rgba(19,61,109,.08) !important;
  }

  .sidebar .amic-hover-help-target:hover{
    box-shadow:none !important;
  }
}

/* Popup */
#amicHoverPopup{
  display:none;
  position:fixed;
  z-index:2147483300;
  width:min(440px,calc(100vw - 28px));
  max-height:min(680px,calc(100vh - 28px));
  overflow:hidden;
  flex-direction:column;
  border:1px solid var(--amic-hover-popup-border);
  border-radius:15px;
  background:var(--amic-hover-popup-bg);
  color:#17324f;
  box-shadow:var(--amic-hover-popup-shadow);
}

#amicHoverPopup.open{
  display:flex;
  animation:amicHoverPopupIn .14s ease-out;
}

@keyframes amicHoverPopupIn{
  from{opacity:0;transform:translateY(4px) scale(.99)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

.amic-hover-popup-head{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:13px 14px 11px;
  background:linear-gradient(135deg,#eef5ff 0%,#fff 72%);
  border-bottom:1px solid #dbe6f3;
}

.amic-hover-popup-icon{
  width:32px;
  height:32px;
  min-width:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  background:var(--amic-hover-popup-blue);
  color:#fff;
  font-weight:800;
  font-size:13px;
}

.amic-hover-popup-heading{
  min-width:0;
  flex:1;
}

.amic-hover-popup-kicker{
  margin-bottom:3px;
  font-size:9px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:#72849a;
}

.amic-hover-popup-title{
  margin:0;
  font-size:16px;
  line-height:1.18;
  color:#12375f;
  overflow-wrap:anywhere;
}

.amic-hover-popup-body{
  padding:13px 14px;
  overflow-y:auto;
  overscroll-behavior:contain;
}

.amic-hover-popup-section{
  margin:0 0 11px;
  padding:0 0 11px;
  border-bottom:1px solid #e3ebf4;
}

.amic-hover-popup-section:last-child{
  margin:0;
  padding:0;
  border-bottom:0;
}

.amic-hover-popup-label{
  margin:0 0 5px;
  font-size:10px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
  color:#2f6095;
}

.amic-hover-popup-text{
  margin:0;
  font-size:11.5px;
  line-height:1.46;
  color:#435a72;
}

.amic-hover-popup-list{
  margin:5px 0 0 17px;
  padding:0;
  font-size:11px;
  line-height:1.44;
  color:#435a72;
}

.amic-hover-popup-list li{
  margin:3px 0;
}

.amic-hover-popup-current{
  padding:8px 10px;
  border:1px solid #d9e5f2;
  border-radius:8px;
  background:#f8fbff;
  color:#4a627c;
  font-size:10.5px;
  line-height:1.4;
  overflow-wrap:anywhere;
}

.amic-hover-popup-foot{
  padding:7px 13px;
  border-top:1px solid #dde7f2;
  background:#f8fbff;
  color:#788a9d;
  font-size:9px;
  line-height:1.35;
}

/* Mobile / touch: bottom sheet */
@media (max-width:820px), (hover:none){
  #amicHoverPopup{
    left:8px !important;
    right:8px !important;
    bottom:8px !important;
    top:auto !important;
    width:auto !important;
    max-height:min(76dvh,680px) !important;
    border-radius:16px !important;
  }

  .amic-hover-help-target{
    -webkit-tap-highlight-color:rgba(40,101,177,.08);
  }
}

@media (prefers-reduced-motion:reduce){
  #amicHoverPopup.open{
    animation:none;
  }
}
