/* Maggie chat — Belaire.Fund (Oct 2026).
   Embossed gold button with 3D pop-out hover, matching her other sites.
   Self-contained: no dependency on the site's own variables. */

.mg-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9999;
  border: 1px solid #8a6d2b;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font: 700 1rem/1.2 inherit, sans-serif;
  color: #fdf0b8;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #f0d488 0%, #d4af5a 45%, #b8912f 100%);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.55) inset,
    0 -3px 6px rgba(0, 0, 0, 0.25) inset;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mg-btn .mg-pic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.mg-btn:hover,
.mg-btn:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.42),
    0 2px 0 rgba(255, 255, 255, 0.6) inset,
    0 -3px 6px rgba(0, 0, 0, 0.25) inset;
  outline: none;
}

.mg-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.25rem;
  z-index: 9999;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(560px, calc(100vh - 7rem));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #8a6d2b;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  font-family: inherit;
}

.mg-panel.mg-open {
  display: flex;
}

.mg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #0b1f3a;
  color: #f4efe6;
}

.mg-head strong {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.mg-head span {
  display: block;
  font-size: 0.8rem;
  color: #e6cd97;
}

.mg-close {
  border: 1px solid rgba(230, 205, 151, 0.5);
  border-radius: 999px;
  background: transparent;
  color: #f4efe6;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.mg-notice {
  display: none;
  padding: 0.6rem 1rem;
  background: #fdf3d7;
  color: #5a4300;
  font-size: 0.85rem;
  line-height: 1.4;
  border-bottom: 1px solid #e6cd97;
}

.mg-notice.mg-show {
  display: block;
}

.mg-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #faf8f3;
}

.mg-msg {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.mg-msg.mg-maggie {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e2d9c8;
  color: #222222;
}

.mg-msg.mg-user {
  align-self: flex-end;
  background: #0b1f3a;
  color: #f4efe6;
}

.mg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 1rem 0;
  background: #faf8f3;
}

.mg-chip {
  border: 1px solid #c6a15b;
  border-radius: 999px;
  background: #ffffff;
  color: #0b1f3a;
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.mg-chip:hover {
  background: #f0d488;
}

.mg-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  background: #faf8f3;
}

.mg-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #c9bfa9;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
}

.mg-send {
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0d488, #c6a15b);
  color: #fdf0b8;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}

@media (max-width: 480px) {
  .mg-btn {
    right: 1rem;
    bottom: 1rem;
  }
  .mg-panel {
    right: 1rem;
    bottom: 4.75rem;
  }
}
