:root{
  /* pulled from your theme */
  --mhw-navy: #002d53;      /* body bg in main_style.css */
  --mhw-blue: #1b4b78;      /* link/brand blue */

  /* UPDATED: make the bubble a complementary red */
  --mhw-accent: #b8322a;    /* primary bubble/button red */
  --mhw-accent2: #8f251f;   /* hover red */

  --mhw-text: #333;
  --mhw-muted: #666;
  --mhw-card: #ffffff;
  --mhw-border: #e6e6e6;
  --mhw-shadow: 0 8px 24px rgba(0,0,0,.18);
  --mhw-radius: 12px;
  --mhw-font: ProximaNova, LucidaGrande, Arial, sans-serif;
}

/* Subtle attention pulse (respects reduced motion) */
@keyframes mhwPulse{
  0%   { transform: scale(1);   box-shadow: var(--mhw-shadow); }
  60%  { transform: scale(1.04); box-shadow: 0 12px 30px rgba(0,0,0,.22); }
  100% { transform: scale(1);   box-shadow: var(--mhw-shadow); }
}

/* Launcher button */
#mhw-launch{
  position: fixed;

  /* UPDATED: move near top-right, but not jammed into the corner */
  right: 22px;
  top: 110px;
  bottom: auto;

  z-index: 99999;
  border: 0;
  border-radius: 999px;

  /* UPDATED: make bubble larger */
  padding: 14px 18px;

  cursor: pointer;
  color: #fff;
  background: var(--mhw-accent);

  box-shadow: var(--mhw-shadow);
  font-family: var(--mhw-font);
  font-weight: 800;
  font-size: 16px;
  line-height: 1;

  /* UPDATED: subtle pulse */
  animation: mhwPulse 2.6s ease-in-out infinite;
}
#mhw-launch:hover{
  background: var(--mhw-accent2);
  animation-play-state: paused; /* stop pulsing on hover */
}
#mhw-launch:focus-visible{
  outline: 3px solid rgba(184,50,42,.35);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  #mhw-launch{ animation: none; }
}

/* Panel */
#mhw-panel{
  position: fixed;

  /* UPDATED: panel follows the new top position */
  right: 22px;
  top: 178px;
  bottom: auto;

  width: min(400px, calc(100vw - 44px));

  /* UPDATED: ensure it never "fills the screen" without scrolling */
  max-height: min(640px, calc(100vh - 220px));

  display: none;
  z-index: 99999;
  border-radius: var(--mhw-radius);
  overflow: hidden;
  background: var(--mhw-card);
  box-shadow: var(--mhw-shadow);
  font-family: var(--mhw-font);
  border: 1px solid rgba(0,0,0,.08);
}

#mhw-header{
  background: var(--mhw-navy);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#mhw-title{ font-weight: 800; font-size: 15px; }
#mhw-close{
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

#mhw-body{
  padding: 12px 14px;
  overflow: auto;          /* IMPORTANT: allows internal scrolling */
  background: #fff;
}
#mhw-body p{ margin: 0 0 10px 0; color: var(--mhw-text); font-size: 14px; line-height: 1.35; }

.mhw-grid{ display: grid; grid-template-columns: 1fr; gap: 10px; }
.mhw-btn{
  border: 1px solid rgba(0,0,0,.10);
  background: var(--mhw-accent);
  color: #fff;
  border-radius: 10px;
  padding: 12px 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  text-align: left;
}
.mhw-btn:hover{ background: var(--mhw-accent2); border-color: rgba(0,0,0,.14); }

.mhw-input, .mhw-select, .mhw-textarea{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--mhw-border);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  font-family: var(--mhw-font);
}
.mhw-textarea{ min-height: 90px; resize: vertical; }

.mhw-row{ display:flex; gap:10px; }
.mhw-row > *{ flex:1; }

.mhw-help{
  margin-top: 8px;
  color: var(--mhw-muted);
  font-size: 12.5px;
}

.mhw-actions{ display:flex; gap:10px; margin-top: 10px; }
.mhw-actions .mhw-btn{ flex: 1; text-align: center; }

/* Mobile: keep it near top but not covering everything */
@media (max-width: 480px){
  #mhw-launch{
    right: 12px;
    top: 84px;
    bottom: auto;
    padding: 14px 18px;
  }
  #mhw-panel{
    right: 12px;
    top: 152px;
    bottom: auto;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 190px);
  }
}
