/* =====================================================
   B&B Montebello — stylesheet
   Palette ispirata al Lago di Como: teal profondo,
   sabbia/crema, oro caldo come accento.
   ===================================================== */

:root {
  /* Blue palette, coordinated with the Montebello Lake logo */
  --lake:        #1e3a8f;
  --lake-dark:   #16295f;
  --lake-deep:   #0b1733;
  --gold:        #c8a96a;
  --gold-dark:   #b08f4f;
  --gold-text:   #8a6d34;   /* darker gold that meets AA contrast on cream */
  --cream:       #faf7f1;
  --sand:        #ece7dc;
  --ink:         #1a2238;
  --muted:       #5b647d;
  --white:       #ffffff;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1180px;
  --radius: 4px;
  --shadow: 0 18px 50px rgba(13, 42, 48, 0.14);
  --shadow-sm: 0 6px 22px rgba(13, 42, 48, 0.10);
  --t: 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.01em;
}
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.5rem; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold-dark);
  margin: 0 0 0.9rem;
}
.section-head { max-width: 640px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section-lead { color: var(--muted); margin-top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.95em 1.9em; border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: var(--t); background: none;
}
.btn-lg { padding: 1.15em 2.4em; font-size: 0.82rem; }
.btn-gold { background: var(--gold); color: var(--lake-deep); }
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-book { background: var(--lake); color: var(--white); }
.btn-book:hover { background: var(--lake-dark); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-ghost { border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-outline { border-color: var(--lake); color: var(--lake); }
.btn-outline:hover { background: var(--lake); color: var(--white); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: var(--t);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem 0; }
.site-header.scrolled {
  background: rgba(250, 246, 239, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}
.site-header.scrolled .header-inner { padding: 0.8rem 0; }

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-logo { height: 46px; width: auto; display: block; transition: var(--t); }
.site-header.scrolled .brand-logo { height: 40px; }
/* white logo over the dark hero photo, natural blue logo once the header turns light */
.site-header:not(.scrolled) .brand-logo { filter: brightness(0) invert(1); }
.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: var(--lake-deep);
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.brand-sub  { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

/* header text colors over hero (transparent state) */
.site-header:not(.scrolled) .brand-name,
.site-header:not(.scrolled) .nav a,
.site-header:not(.scrolled) .lang-switch { color: var(--white); }
.site-header:not(.scrolled) .brand-sub { color: rgba(255,255,255,0.75); }

.nav { display: flex; gap: 2rem; }
.nav a {
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  position: relative; padding-bottom: 3px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: var(--t);
}
.nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 1.2rem; }
.lang-switch { display: flex; align-items: center; gap: 0.25rem; font-size: 0.8rem; letter-spacing: 0.06em; }
.lang-switch__globe { font-size: 0.95rem; line-height: 1; margin-right: 0.15rem; opacity: 0.9; }
.lang-switch button { background: none; border: none; cursor: pointer; color: inherit; font: inherit; opacity: 0.75; padding: 0.25em 0.6em; border-radius: 100px; transition: var(--t); }
.lang-switch button:hover { opacity: 1; }
.lang-switch button.active { opacity: 1; font-weight: 600; background: var(--gold); color: var(--lake-deep); }

/* hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: currentColor; transition: var(--t); }
.site-header:not(.scrolled) .nav-toggle { color: var(--white); }
.site-header.scrolled .nav-toggle { color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: var(--white); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  /* Top layer = your real photo; if missing it falls back to the layer below */
  background:
    url("assets/hero.jpg") center/cover no-repeat,
    url("https://picsum.photos/seed/montebello-hero/1920/1280") center/cover no-repeat;
  transform: scale(1.05); animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,42,48,0.55) 0%, rgba(13,42,48,0.35) 40%, rgba(13,42,48,0.7) 100%);
}
.hero-content { position: relative; max-width: 760px; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: 0.34em; font-size: 0.78rem; color: var(--gold); margin: 0 0 1.3rem; }
.hero-title { font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 500; }
.hero-text { font-size: 1.2rem; font-weight: 300; max-width: 540px; margin: 1.4rem 0 2.4rem; color: rgba(255,255,255,0.92); }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.scroll-down {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  font-size: 1.4rem; color: var(--white); opacity: 0.8; animation: bob 2s infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-copy p { color: var(--muted); margin: 1.1rem 0; }
.about-copy h2 { margin-bottom: 0.4rem; }
.about-highlights { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; gap: 2.4rem; }
.about-highlights li { display: flex; flex-direction: column; }
.about-highlights strong { font-family: var(--serif); font-size: 2.4rem; color: var(--lake); line-height: 1; }
.about-highlights span { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 0.3rem; }

/* ---------- rooms ---------- */
.rooms { background: var(--sand); }
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 2rem; }
.room-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--t); display: flex; flex-direction: column; }
.room-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.room-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.room-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--t); }
.room-card:hover .room-img img { transform: scale(1.06); }
.room-tag { position: absolute; top: 1rem; left: 1rem; z-index: 2; background: var(--gold); color: var(--lake-deep); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.4em 0.9em; border-radius: 100px; }
.room-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.room-body h3 { color: var(--lake-dark); }
.room-body > p { color: var(--muted); font-size: 0.95rem; margin: 0.6rem 0 1rem; flex: 1; }
.room-feats { list-style: none; padding: 0; margin: 0 0 1.3rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.room-feats li { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lake); background: var(--cream); padding: 0.35em 0.8em; border-radius: 100px; }
.room-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.room-foot .btn { flex: 1; }
.room-price { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); }
.room-price small { display: block; font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.room-price em { font-style: normal; font-family: var(--sans); font-size: 0.7rem; color: var(--muted); }

/* ---------- services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.service { text-align: center; padding: 2.4rem 1.5rem; border: 1px solid rgba(31,95,107,0.14); border-radius: var(--radius); transition: var(--t); }
.service:hover { border-color: var(--gold); transform: translateY(-4px); }
.service-ic { font-size: 2rem; color: var(--gold-dark); }
.service h3 { font-size: 1.25rem; color: var(--lake-dark); margin: 0.8rem 0 0.5rem; }
.service p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- explore ---------- */
.explore { background: var(--lake-deep); color: var(--cream); }
.explore .eyebrow { color: var(--gold); }
.explore-grid { display: grid; grid-template-columns: 1fr 0.8fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.explore-copy > p { color: rgba(250,246,239,0.78); margin: 1rem 0 1.6rem; }
.explore-list { list-style: none; padding: 0; margin: 0; }
.explore-list li { padding: 1.1rem 0; border-top: 1px solid rgba(250,246,239,0.16); display: flex; flex-direction: column; }
.explore-list strong { font-family: var(--serif); font-size: 1.3rem; }
.explore-list span { color: rgba(250,246,239,0.7); font-size: 0.92rem; }
.explore-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-auto-rows: 220px; gap: 1rem; grid-auto-flow: dense; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: var(--t); }
.gallery-grid figure:hover img { transform: scale(1.07); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* ---------- reviews ---------- */
.reviews { background: var(--sand); }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.reviews blockquote { background: var(--white); margin: 0; padding: 2.2rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stars { color: var(--gold); letter-spacing: 0.15em; margin-bottom: 0.8rem; }
.reviews p { font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--ink); margin: 0 0 1rem; }
.reviews cite { font-style: normal; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.contact-info h2 { margin-bottom: 1rem; }
.contact-info > p { color: var(--muted); margin-bottom: 1.8rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.contact-list li { display: flex; flex-direction: column; padding: 0.9rem 0; border-bottom: 1px solid rgba(31,95,107,0.12); }
.contact-list span { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.contact-list strong { font-size: 1.05rem; }
.contact-map { min-height: 380px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.contact-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--lake-deep); color: rgba(250,246,239,0.8); padding: 3.5rem 0 2rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; text-align: center; }
.footer-logo { height: 64px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; }
.footer-nav { display: flex; gap: 1.8rem; flex-wrap: wrap; justify-content: center; }
.footer-nav a { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-nav a:hover { color: var(--gold); }
.footer-legal { font-size: 0.78rem; color: rgba(250,246,239,0.5); margin: 0; }

/* ---------- booking drawer ---------- */
.book-panel { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.book-panel.open { visibility: visible; }
.book-backdrop { position: absolute; inset: 0; background: rgba(13,42,48,0.55); opacity: 0; transition: var(--t); }
.book-panel.open .book-backdrop { opacity: 1; }
.book-drawer {
  position: absolute; top: 0; right: 0; height: 100%; width: min(480px, 100%);
  background: var(--cream); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.22,0.61,0.36,1);
  box-shadow: -20px 0 60px rgba(13,42,48,0.3);
}
.book-panel.open .book-drawer { transform: translateX(0); }
.book-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.6rem; background: var(--lake); color: var(--white); font-family: var(--serif); font-size: 1.3rem; }
.book-close { background: none; border: none; color: var(--white); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.book-drawer-body { flex: 1; overflow: auto; }
.book-drawer-body iframe { width: 100%; height: 100%; border: 0; }
.book-placeholder { padding: 2.4rem 1.6rem; color: var(--muted); }
.book-placeholder code { background: var(--sand); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.85em; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 80%);
    background: var(--lake-deep); flex-direction: column; gap: 0;
    padding: 6rem 2rem 2rem; transform: translateX(100%); transition: var(--t);
  }
  .nav.open { transform: translateX(0); }
  .nav a { color: var(--cream) !important; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1rem; }
  .nav-toggle { display: flex; }
  .header-actions .btn-book { display: none; }
  .about-grid, .explore-grid, .contact-grid { grid-template-columns: 1fr; }
  .explore-media { order: -1; }
  .about-highlights { gap: 1.6rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .g-wide { grid-column: span 2; }
  .g-tall { grid-row: span 1; }
}
@media (max-width: 520px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .about-highlights { flex-wrap: wrap; }
}

/* =====================================================
   QA & accessibility refinements
   ===================================================== */

/* Visible keyboard focus on every interactive element */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn:focus-visible,
.nav a:focus-visible,
.lang-switch button:focus-visible,
.footer-nav a:focus-visible,
.brand:focus-visible,
.scroll-down:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
/* Over the dark hero, the gold ring needs a halo to stay visible */
.site-header:not(.scrolled) a:focus-visible,
.site-header:not(.scrolled) button:focus-visible,
.hero a:focus-visible,
.hero button:focus-visible,
.scroll-down:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 5px rgba(200, 169, 106, 0.55);
}

/* Skip-to-content link (visible only on keyboard focus) */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--lake); color: #fff; padding: 0.7rem 1.2rem; border-radius: var(--radius);
  font-size: 0.85rem; letter-spacing: 0.06em; transition: top var(--t);
}
.skip-link:focus { top: 1rem; }

/* Screen-reader-only utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Gold used as TEXT on light backgrounds — darkened for AA contrast */
.eyebrow, .service-ic, .stars { color: var(--gold-text); }
/* active language stays a gold pill with dark text in both header states;
   only nudge the inactive option's opacity for readability over the hero */
.site-header:not(.scrolled) .lang-switch button:not(.active) { opacity: 0.9; }

/* Text robustness on narrow screens */
h1, h2, h3 { overflow-wrap: break-word; }
.contact-list strong, .contact-list a { overflow-wrap: anywhere; }

/* Closed mobile menu must not be focusable (no off-screen keyboard trap) */
@media (max-width: 880px) {
  .nav { visibility: hidden; }
  .nav.open { visibility: visible; }
}

/* Gallery: single column on small phones, spans reset */
@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .g-wide, .g-tall { grid-column: auto; grid-row: auto; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; transform: none; }
  .scroll-down { animation: none; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .room-card:hover .room-img img,
  .gallery-grid figure:hover img { transform: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =====================================================
   Chat assistant widget
   ===================================================== */
.mb-chat { font-family: var(--sans); }

/* small labelled launcher button, bottom-right */
.mb-chat__launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: inline-flex; align-items: center; gap: 0.5rem; border: none; cursor: pointer;
  background: var(--lake); color: #fff; padding: 0.6rem 1.1rem 0.6rem 0.75rem; border-radius: 100px;
  font-family: var(--sans); font-size: 0.86rem; font-weight: 500; white-space: nowrap;
  box-shadow: 0 12px 30px rgba(13,42,48,0.30); transition: transform var(--t), background var(--t);
}
.mb-chat__launch:hover { background: var(--lake-dark); transform: translateY(-2px); }
.mb-chat__launch-ic { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; }
/* when the chat is open, hide the launcher (only the panel shows) */
.mb-chat.is-open .mb-chat__launch { display: none; }
/* "unread" red dot on the launcher when a teaser is showing */
.mb-chat__launch--ping::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 12px; height: 12px;
  background: #e0533d; border: 2px solid #fff; border-radius: 50%;
}

/* attention teaser bubble above the launcher */
.mb-teaser {
  position: fixed; right: 22px; bottom: 80px; z-index: 92; max-width: 250px;
  background: #fff; color: var(--ink); border-radius: 14px; border-bottom-right-radius: 4px;
  box-shadow: 0 16px 40px rgba(13,42,48,0.22); padding: 0.8rem 2rem 0.8rem 0.95rem;
  font-family: var(--sans); font-size: 0.86rem; line-height: 1.45; cursor: pointer;
  animation: mbIn 0.3s cubic-bezier(0.22,0.61,0.36,1);
}
.mb-teaser__x {
  position: absolute; top: 5px; right: 8px; background: none; border: none;
  color: var(--muted); font-size: 1.15rem; line-height: 1; cursor: pointer; padding: 0;
}
.mb-teaser__x:hover { color: var(--ink); }

@media (max-width: 480px) {
  .mb-teaser { right: 14px; bottom: 70px; max-width: calc(100vw - 90px); }
}

.mb-chat__panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 91; width: min(370px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 110px)); background: var(--cream); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(13,42,48,0.28); display: none; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
}
/* the panel only shows when the chat is open (drives display, not just [hidden]) */
.mb-chat.is-open .mb-chat__panel { display: flex; animation: mbIn 0.25s cubic-bezier(0.22,0.61,0.36,1); }
@keyframes mbIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }

.mb-chat__head { background: var(--lake); color: #fff; padding: 0.9rem 1.1rem; display: flex; align-items: center; justify-content: space-between; }
.mb-chat__head-info { display: flex; flex-direction: column; line-height: 1.2; }
.mb-chat__head-info strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.mb-chat__status { font-size: 0.72rem; color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 0.5rem; }
.mb-chat__dot { width: 7px; height: 7px; border-radius: 50%; background: #5fd38a; display: inline-block; }
.mb-chat__close { background: none; border: none; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }

.mb-chat__msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.55rem; }

.mb-msg { display: flex; }
.mb-msg--bot { justify-content: flex-start; }
.mb-msg--user { justify-content: flex-end; }
.mb-bubble {
  max-width: 82%; padding: 0.65rem 0.9rem; border-radius: 14px; font-size: 0.92rem; line-height: 1.5;
  white-space: pre-line; box-shadow: var(--shadow-sm);
}
.mb-msg--bot .mb-bubble { background: #fff; color: var(--ink); border-bottom-left-radius: 4px; }
.mb-msg--user .mb-bubble { background: var(--lake); color: #fff; border-bottom-right-radius: 4px; }
.mb-msg--bot .mb-bubble strong { font-weight: 700; color: var(--lake); }
.mb-msg--bot .mb-bubble a { color: var(--lake); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.mb-msg--bot .mb-bubble a:hover { text-decoration: none; }

.mb-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.3rem; }
.mb-chip {
  background: #fff; border: 1px solid rgba(30,58,143,0.25); color: var(--lake); cursor: pointer;
  font: inherit; font-size: 0.8rem; padding: 0.4em 0.85em; border-radius: 100px; transition: var(--t);
}
.mb-chip:hover { background: var(--lake); color: #fff; border-color: var(--lake); }

.mb-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.1rem 0 0.2rem; }
.mb-action {
  background: var(--gold); border: none; color: var(--lake-deep); cursor: pointer; font: inherit;
  font-size: 0.8rem; font-weight: 500; padding: 0.5em 1em; border-radius: 100px; transition: var(--t);
}
.mb-action:hover { background: var(--gold-dark); transform: translateY(-1px); }

.mb-typing .mb-bubble { display: flex; gap: 4px; padding: 0.8rem 0.9rem; }
.mb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: mbBlink 1.2s infinite; }
.mb-typing span:nth-child(2) { animation-delay: 0.2s; }
.mb-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mbBlink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

.mb-chat__form { display: flex; gap: 0.5rem; padding: 0.7rem; border-top: 1px solid rgba(13,42,48,0.08); background: var(--cream); }
.mb-chat__input { flex: 1; border: 1px solid rgba(13,42,48,0.18); border-radius: 100px; padding: 0.6em 1em; font: inherit; font-size: 0.9rem; background: #fff; color: var(--ink); }
.mb-chat__input:focus { outline: none; border-color: var(--lake); }
.mb-chat__send { background: var(--lake); color: #fff; border: none; width: 42px; border-radius: 50%; cursor: pointer; font-size: 1rem; transition: var(--t); flex-shrink: 0; }
.mb-chat__send:hover { background: var(--lake-dark); }

@media (max-width: 480px) {
  .mb-chat__launch { right: 14px; bottom: 14px; font-size: 0.8rem; padding: 0.55rem 1rem 0.55rem 0.7rem; }
  .mb-chat__panel { right: 12px; bottom: 12px; width: calc(100vw - 24px); height: min(78vh, 560px); }
}
