/* MenuDoro support chat — cream/espresso panel, cream/gold FAB */
.md-sc-root {
  position: fixed; z-index: 9400; right: 1rem; bottom: 1rem;
  font-family: "Overpass", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  color: #1c1710;
}
.md-sc-root * { box-sizing: border-box; }
.md-sc-fab, .md-sc-mode, .md-sc-send, .md-sc-x, .md-sc-form textarea, .md-sc-msg, .md-sc-head h2, .md-sc-head p, .md-sc-meta {
  font-family: "Overpass", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Findable blue disc + thin logo-gold contour (not a thick blue blob) */
.md-sc-fab {
  width: 3.25rem; height: 3.25rem; border-radius: 999px;
  border: 1.5px solid #d4a84b;
  background: #f6ead0; color: #6b4a0e; cursor: pointer;
  font-family: inherit;
  /* gold contour: border + soft outer ring so it reads at a glance */
  box-shadow: 0 4px 14px rgba(28, 23, 16, 0.16);
  display: grid; place-items: center;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.md-sc-fab:hover, .md-sc-fab:focus-visible {
  background: #efdcb0;
  transform: translateY(-1px);
  outline: none;
  box-shadow:
    0 0 0 2px rgba(212, 168, 75, 0.75),
    0 8px 22px rgba(28, 23, 16, 0.22);
}
.md-sc-fab svg { width: 1.35rem; height: 1.35rem; stroke-width: 1.75; }
.md-sc-fab[aria-expanded="true"] { background: #efdcb0; }

/* Panel: site cream / white / espresso — blue only as a thin header accent */
.md-sc-panel {
  position: absolute; right: 0; bottom: calc(3.25rem + 0.7rem);
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(30rem, calc(100vh - 6rem));
  background: #fffdf8; color: #1c1710;
  border: 1px solid rgba(28, 23, 16, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(28, 23, 16, 0.14);
  display: flex; flex-direction: column; overflow: hidden;
}
.md-sc-panel[hidden] { display: none !important; }

.md-sc-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .85rem 1rem .8rem;
  background: #fffdf8;
  color: #1c1710;
  border-bottom: 1px solid rgba(28, 23, 16, 0.08);
  /* thin blue accent stripe (not a blue block) */
  box-shadow: inset 0 2px 0 0 #d4a84b;
}
.md-sc-head h2 {
  margin: 0; font-size: .95rem; font-weight: 650; letter-spacing: -.01em;
  font-family: inherit; line-height: 1.3;
}
.md-sc-head p {
  margin: .2rem 0 0; font-size: .75rem; font-weight: 400;
  color: #6b6458; line-height: 1.35; opacity: 1;
}

.md-sc-avatar {
  width: 40px; height: 40px; border-radius: 999px; object-fit: cover; flex-shrink: 0;
  border: 1.5px solid #d4a84b;
  box-shadow: 0 0 0 1px rgba(212, 168, 75, 0.35);
  background: #f7f3ea;
}
.md-sc-head-txt { flex: 1; min-width: 0; }
.md-sc-msg a {
  color: #8a6416; text-decoration: underline; text-underline-offset: 2px;
  word-break: break-all;
}
.md-sc-msg a:hover { color: #5a4a1a; }

.md-sc-x {
  border: 1px solid rgba(28, 23, 16, 0.14); background: transparent; color: #5b5445;
  width: 1.85rem; height: 1.85rem; border-radius: 6px; cursor: pointer;
  font-size: 1.05rem; line-height: 1; font-weight: 400;
}
.md-sc-x:hover, .md-sc-x:focus-visible {
  background: #f7f3ea; color: #1c1710; outline: none; border-color: #d4a84b;
}

.md-sc-body {
  flex: 1; overflow-y: auto; padding: 1rem 1rem 1.1rem;
  display: flex; flex-direction: column; gap: .7rem; min-height: 11.5rem;
  background: #fffdf8;
}
.md-sc-msg {
  max-width: 94%; padding: .7rem .85rem;
  border-radius: 6px; font-size: .9rem; font-weight: 400;
  line-height: 1.5; letter-spacing: 0;
  white-space: pre-wrap; word-break: break-word;
}
.md-sc-msg.bot {
  align-self: flex-start;
  background: #f7f3ea; color: #1c1710;
  border: 1px solid rgba(28, 23, 16, 0.06);
}
.md-sc-msg.user {
  align-self: flex-end;
  background: #2a241c; color: #fffdf8;
  border: 1px solid rgba(28, 23, 16, 0.2);
}
.md-sc-msg.sys {
  align-self: center; background: transparent; border: 0;
  color: #6b6458; font-size: .78rem; padding: .15rem; line-height: 1.4;
}

/* Mode chooser: calm, premium — not pastel / bubbly */
.md-sc-modes { display: flex; flex-direction: column; gap: .5rem; margin-top: .15rem; }
.md-sc-mode {
  border: 1px solid rgba(28, 23, 16, 0.18);
  background: #fff; color: #1c1710;
  border-radius: 6px; padding: .75rem .9rem;
  font-family: inherit; font-weight: 550; font-size: .88rem;
  letter-spacing: -.005em; line-height: 1.35;
  cursor: pointer; text-align: left;
  transition: border-color .12s ease, background .12s ease;
}
.md-sc-mode:hover, .md-sc-mode:focus-visible {
  background: #fffdf8; outline: none;
  border-color: #d4a84b;
}
.md-sc-mode.secondary {
  border-color: rgba(28, 23, 16, 0.12);
  color: #3a342a; font-weight: 550; background: #f7f3ea;
}
.md-sc-mode.secondary:hover, .md-sc-mode.secondary:focus-visible {
  background: #fff; border-color: rgba(28, 23, 16, 0.22);
}

.md-sc-foot {
  border-top: 1px solid rgba(28, 23, 16, 0.08);
  padding: .7rem .85rem .8rem; background: #fff;
}
.md-sc-form { display: flex; gap: .45rem; align-items: flex-end; }
.md-sc-form textarea {
  flex: 1; resize: none; min-height: 2.5rem; max-height: 5.5rem;
  border: 1px solid rgba(28, 23, 16, 0.14); border-radius: 6px;
  padding: .55rem .7rem;
  font: inherit; font-size: .9rem; line-height: 1.45;
  background: #fffdf8; color: #1c1710;
}
.md-sc-form textarea:focus {
  outline: none; border-color: #d4a84b;
  box-shadow: 0 0 0 1px rgba(212, 168, 75, 0.45);
}
/* Blue kept as a small accent on send only */
.md-sc-send {
  border: 0; background: #d9b25e; color: #1c1710;
  border-radius: 6px; padding: .55rem .9rem;
  font-family: inherit; font-weight: 650; font-size: .85rem;
  letter-spacing: -.005em; cursor: pointer; height: 2.5rem;
}
.md-sc-send:hover:not(:disabled), .md-sc-send:focus-visible:not(:disabled) {
  background: #cfa64f; outline: none;
}
.md-sc-send:disabled { opacity: .45; cursor: not-allowed; }
.md-sc-meta { margin: .5rem 0 0; font-size: .72rem; line-height: 1.4; color: #6b6458; }
.md-sc-meta a { color: #5a4a1a; text-decoration: underline; text-underline-offset: 2px; }
.md-sc-meta a:hover { color: #1c1710; }

@media (max-width: 480px) {
  .md-sc-root { right: .65rem; bottom: .65rem; }
  .md-sc-panel { width: calc(100vw - 1.3rem); max-height: calc(100vh - 5.5rem); border-radius: 10px; }
  body:has(.md-consent:not([hidden])) .md-sc-root, html.mdc-open .md-sc-root { display: none; }
}
html.mdc-open .md-sc-root { bottom: 4rem; }
