/* =========================================================================
   Dental Arc — "Arc" assistant widget
   ========================================================================= */
.ac { --ac-teal: #21B7B0; --ac-deep: #0f5e5a; --ac-ink: #1f1f1f; --ac-ink2: #555; --ac-line: rgba(31, 31, 31, .09); --ac-paper: #fbfaf7; --ac-ease: cubic-bezier(.2, .8, .2, 1); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
body.has-assistant .floating-whatsapp-btn { display: none; } /* WhatsApp lives inside the assistant */
body.ac-lock { overflow: hidden; }
body:has(.bk-overlay.active) .ac-launch { opacity: 0; pointer-events: none; }

/* launcher */
.ac-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 2900; display: flex; align-items: center; gap: 12px;
  padding: 7px 18px 7px 7px; border: 0; border-radius: 999px; cursor: pointer; color: #fff; text-align: left;
  background: linear-gradient(135deg, #17625e, #0c4441); box-shadow: 0 18px 40px -14px rgba(8, 40, 38, .65), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .35s var(--ac-ease), box-shadow .35s var(--ac-ease), opacity .3s;
  animation: acIn .7s var(--ac-ease) 1.2s both;
}
.ac-launch:hover { transform: translateY(-2px); box-shadow: 0 24px 46px -14px rgba(8, 40, 38, .7); }
.ac-launch:focus-visible { outline: 2px solid var(--ac-teal); outline-offset: 3px; }
.ac-launch-mark { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); }
.ac-launch-text { display: grid; line-height: 1.15; }
.ac-launch-text b { font-size: .95rem; font-weight: 600; }
.ac-launch-text small { font-size: .72rem; opacity: .75; }
.ac-launch-dot { position: absolute; left: 40px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #3ddc97; border: 2px solid #0f4f4b; }
.ac.is-open .ac-launch { opacity: 0; pointer-events: none; transform: scale(.9); }
@keyframes acIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }

/* panel */
.ac-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 2950; width: min(410px, calc(100vw - 32px)); height: min(680px, calc(100vh - 44px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: var(--ac-paper);
  box-shadow: 0 40px 100px -30px rgba(8, 30, 29, .55), 0 0 0 1px rgba(15, 94, 90, .08);
  transform-origin: bottom right; animation: acPanel .45s var(--ac-ease);
}
.ac-panel[hidden] { display: none; }
@keyframes acPanel { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.ac-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 16px 14px 16px 16px; color: #fff; background: linear-gradient(135deg, #17625e 0%, #0c4441 100%); overflow: hidden; }
.ac-head::after { content: ''; position: absolute; right: -50px; top: -80px; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(159, 227, 221, .25); box-shadow: 0 0 0 22px rgba(159, 227, 221, .05); pointer-events: none; }
.ac-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); }
.ac-title { flex: 1; display: grid; line-height: 1.2; }
.ac-title b { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; font-size: 1.2rem; }
.ac-title small { display: flex; align-items: center; gap: 6px; font-size: .74rem; opacity: .8; }
.ac-title small i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; }
.ac-icon-btn { position: relative; z-index: 1; width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; transition: background .25s; }
.ac-icon-btn:hover { background: rgba(255, 255, 255, .22); }
.ac-icon-btn svg { width: 17px; height: 17px; }

.ac-body { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; overscroll-behavior: contain; }
.ac-body::-webkit-scrollbar { width: 6px; } .ac-body::-webkit-scrollbar-thumb { background: rgba(15, 94, 90, .2); border-radius: 3px; }

/* welcome */
.ac-welcome { margin: auto 0; padding: 8px 6px 4px; text-align: center; }
.ac-welcome-mark { width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--ac-teal), var(--ac-deep)); box-shadow: 0 14px 30px -12px rgba(15, 94, 90, .6); }
.ac-welcome-mark svg { width: 26px; height: 26px; }
.ac-welcome h3 { margin: 0 0 6px; font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 1.6rem; color: var(--ac-ink); }
.ac-welcome p { margin: 0 auto 18px; max-width: 300px; font-size: .88rem; line-height: 1.6; color: var(--ac-ink2); }
.ac-suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ac-suggest button { padding: 12px 12px; border-radius: 14px; border: 1px solid var(--ac-line); background: #fff; color: var(--ac-ink); font: 500 .82rem/1.3 'Plus Jakarta Sans', system-ui, sans-serif; text-align: left; cursor: pointer; transition: border-color .25s, transform .25s var(--ac-ease), box-shadow .25s; }
.ac-suggest button:hover { border-color: rgba(33, 183, 176, .5); transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(15, 94, 90, .5); }

/* quick replies under the latest answer */
.ac-replies { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; animation: acMsg .35s var(--ac-ease); }
.ac-replies button { padding: 9px 13px; border-radius: 12px; border: 1px solid rgba(33, 183, 176, .45); background: #fff; color: var(--ac-deep); font: 600 .8rem/1.2 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ac-ease); }
.ac-replies button:hover, .ac-replies button:focus-visible { background: var(--ac-deep); color: #fff; transform: translateY(-1px); }
.ac-suggest { max-height: 252px; overflow-y: auto; }

/* messages */
.ac-msg { max-width: 88%; font-size: .9rem; line-height: 1.6; color: var(--ac-ink); animation: acMsg .35s var(--ac-ease); }
@keyframes acMsg { from { opacity: 0; transform: translateY(6px); } }
.ac-msg p { margin: 0 0 8px; } .ac-msg p:last-child { margin-bottom: 0; }
.ac-msg ul, .ac-msg ol { margin: 4px 0 8px; padding-left: 20px; } .ac-msg li { margin: 2px 0; }
.ac-msg a { color: var(--ac-deep); text-decoration: underline; text-underline-offset: 2px; }
.ac-user { align-self: flex-end; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--ac-deep); color: #fff; }
.ac-bot { align-self: flex-start; padding: 12px 14px; border-radius: 18px 18px 18px 4px; background: #fff; border: 1px solid var(--ac-line); box-shadow: 0 8px 20px -16px rgba(0, 0, 0, .25); }
.ac-error { align-self: stretch; max-width: none; padding: 12px 14px; border-radius: 14px; background: #fff4f2; color: #9b2c1f; font-size: .85rem; }
.ac-error button { margin-top: 6px; padding: 0; border: 0; background: none; color: inherit; font: 600 .82rem 'Plus Jakarta Sans', system-ui, sans-serif; text-decoration: underline; cursor: pointer; }
.ac-typing { display: inline-flex; gap: 4px; padding: 4px 0; } .ac-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-teal); animation: acDot 1.1s infinite ease-in-out; } .ac-typing i:nth-child(2) { animation-delay: .15s; } .ac-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes acDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ac-caret { display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--ac-teal); border-radius: 1px; animation: acBlink 1s steps(2) infinite; }
@keyframes acBlink { 50% { opacity: 0; } }

/* cards */
.ac-cards { animation: acMsg .4s var(--ac-ease); }
.ac-rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 2px 2px 8px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.ac-rail::-webkit-scrollbar { display: none; }
.ac-tcard { flex: 0 0 min(250px, 78%); scroll-snap-align: start; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--ac-line); box-shadow: 0 14px 30px -24px rgba(0, 0, 0, .4); }
.ac-rail .ac-tcard:only-child { flex-basis: 100%; }
.ac-tcard-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; overflow: hidden; cursor: zoom-in; background: #eef4f3; }
.ac-tcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ac-ease); }
.ac-tcard-media:hover img { transform: scale(1.05); }
.ac-tcard-media span { position: absolute; right: 8px; bottom: 8px; padding: 4px 9px; border-radius: 999px; font-size: .7rem; background: rgba(255, 255, 255, .9); color: var(--ac-ink); }
.ac-tcard-body { padding: 12px 14px 14px; }
.ac-tcard small, .ac-ccard small, .ac-bcard small, .ac-pop-body > small, .ac-pop-hero small { display: block; font-size: .64rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ac-deep); }
.ac-tcard h4, .ac-ccard h4, .ac-bcard h4, .ac-slots h4, .ac-info h4 { margin: 3px 0 4px; font-family: 'Playfair Display', Georgia, serif; font-weight: 500; font-size: 1.12rem; line-height: 1.2; color: var(--ac-ink); }
.ac-tcard p { margin: 0 0 10px; font-size: .8rem; line-height: 1.5; color: var(--ac-ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-fee { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-bottom: 12px; }
.ac-fee span { font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #8a8a8a; }
.ac-fee b { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; font-size: 1.05rem; color: var(--ac-ink); }
.ac-fee small { flex-basis: 100%; font-size: .74rem; color: #8a8a8a; }
.ac-tcard-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.ac-btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer; background: var(--ac-ink); color: #fff; font: 600 .8rem/1.2 'Plus Jakarta Sans', system-ui, sans-serif; text-decoration: none; transition: background .25s, transform .25s var(--ac-ease); }
.ac-btn:hover { background: var(--ac-deep); transform: translateY(-1px); }
.ac-btn-light { background: #fff; color: var(--ac-deep); } .ac-btn-light:hover { background: #9fe3dd; color: var(--ac-ink); }
.ac-link { padding: 0 0 2px; border: 0; border-bottom: 1px solid currentColor; background: none; cursor: pointer; color: var(--ac-ink2); font: 500 .8rem/1.2 'Plus Jakarta Sans', system-ui, sans-serif; text-decoration: none; }
.ac-link:hover { color: var(--ac-deep); }
.ac-link-light { color: rgba(255, 255, 255, .85); } .ac-link-light:hover { color: #fff; }

.ac-ccard { padding: 16px; border-radius: 16px; color: #fff; background: linear-gradient(150deg, #17625e, #0c4441); }
.ac-ccard small { color: #9fe3dd; } .ac-ccard h4 { color: #fff; }
.ac-urgent { display: flex; gap: 8px; margin: 6px 0 14px; font-size: .8rem; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.ac-urgent i { flex: none; width: 7px; height: 7px; margin-top: .45em; border-radius: 50%; background: #9fe3dd; }

.ac-slots, .ac-info, .ac-bcard { padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--ac-line); }
.ac-slots p { margin: 4px 0 0; font-size: .8rem; color: var(--ac-ink2); }
.ac-day { margin-top: 12px; } .ac-day > b { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 600; color: var(--ac-ink); }
.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-chips button { display: grid; gap: 1px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(15, 94, 90, .2); background: #f3faf9; cursor: pointer; color: var(--ac-deep); font: 600 .8rem/1.2 'Plus Jakarta Sans', system-ui, sans-serif; text-align: left; transition: background .2s, color .2s, border-color .2s; }
.ac-chips button small { font-weight: 500; font-size: .68rem; opacity: .75; }
.ac-chips button:hover { background: var(--ac-deep); border-color: var(--ac-deep); color: #fff; }
.ac-hint { font-size: .74rem !important; color: #8a8a8a !important; margin-top: 10px !important; }
.ac-bcard { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.ac-bcard img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }
.ac-bcard p { margin: 0 0 10px; font-size: .8rem; color: var(--ac-ink2); }
.ac-info { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.ac-info-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: #e8f6f5; color: var(--ac-deep); }
.ac-info-ico svg { width: 18px; height: 18px; }
.ac-info p { margin: 0 0 8px; font-size: .82rem; line-height: 1.55; color: var(--ac-ink2); }
.ac-muted { color: #7a7a7a !important; }
.ac-hours { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: .8rem; }
.ac-hours li { display: grid; grid-template-columns: 44px 1fr; color: var(--ac-ink2); } .ac-hours b { font-weight: 500; color: var(--ac-ink); }

/* composer */
.ac-compose { display: flex; align-items: flex-end; gap: 8px; margin: 6px 12px 4px; padding: 6px 6px 6px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--ac-line); box-shadow: 0 10px 24px -20px rgba(0, 0, 0, .4); transition: border-color .25s; }
.ac-compose:focus-within { border-color: rgba(33, 183, 176, .6); }
.ac-compose textarea { flex: 1; min-height: 24px; max-height: 120px; padding: 8px 0; border: 0; outline: 0; resize: none; background: none; font: .9rem/1.45 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--ac-ink); }
.ac-compose button { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: linear-gradient(135deg, var(--ac-teal), var(--ac-deep)); transition: transform .25s var(--ac-ease), opacity .25s; }
.ac-compose button svg { width: 18px; height: 18px; }
.ac-compose button:hover { transform: scale(1.06); }
.ac.is-busy .ac-compose button { opacity: .45; pointer-events: none; }
.ac-foot { margin: 0; padding: 4px 0 10px; text-align: center; font-size: .68rem; color: #9a9a9a; }

/* popup (treatment gallery, concern guide) */
.ac-pop { position: fixed; inset: 0; z-index: 3100; display: grid; place-items: center; padding: 16px; background: rgba(8, 24, 23, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.ac-pop[hidden] { display: none; }
.ac-pop.is-in { opacity: 1; }
.ac-pop-card { position: relative; width: min(620px, 100%); max-height: min(88vh, 760px); overflow-y: auto; border-radius: 20px; background: var(--ac-paper); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .6); transform: translateY(14px) scale(.98); transition: transform .4s var(--ac-ease); }
.ac-pop.is-in .ac-pop-card { transform: none; }
.ac-pop-x { position: absolute; right: 12px; top: 12px; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; background: rgba(255, 255, 255, .92); color: var(--ac-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.ac-pop-x svg { width: 18px; height: 18px; }
.ac-gal-main { aspect-ratio: 16 / 10; background: #eef4f3; }
.ac-gal-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-gal-thumbs { display: flex; gap: 8px; padding: 10px 18px 0; overflow-x: auto; }
.ac-gal-thumbs button { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; opacity: .65; transition: opacity .2s, border-color .2s; }
.ac-gal-thumbs button.is-on, .ac-gal-thumbs button:hover { opacity: 1; border-color: var(--ac-teal); }
.ac-gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ac-pop-body { padding: 20px 24px 26px; }
.ac-pop-body h3, .ac-pop-hero h3 { margin: 4px 0 10px; font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 1.8rem; line-height: 1.1; color: var(--ac-ink); }
.ac-pop-body p { margin: 0 0 12px; font-size: .9rem; line-height: 1.7; color: var(--ac-ink2); }
.ac-pop-body h5 { margin: 16px 0 8px; font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #8a8a8a; }
.ac-ticks { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.ac-ticks li { position: relative; padding-left: 20px; font-size: .86rem; line-height: 1.5; color: var(--ac-ink); }
.ac-ticks li::before { content: ''; position: absolute; left: 0; top: .5em; width: 9px; height: 5px; border-left: 1.5px solid var(--ac-deep); border-bottom: 1.5px solid var(--ac-deep); transform: rotate(-45deg); }
.ac-note { font-size: .76rem !important; color: #8a8a8a !important; }
.ac-pop-hero { padding: 28px 24px 22px; color: #fff; background: linear-gradient(150deg, #17625e, #0c4441); }
.ac-pop-hero small { color: #9fe3dd; } .ac-pop-hero h3 { color: #fff; }
.ac-pop-hero p { margin: 0; font-size: .86rem; line-height: 1.6; color: rgba(255, 255, 255, .85); }

/* phones: full-height sheet, compact launcher */
@media (max-width: 600px) {
  .ac-launch { right: 14px; bottom: 14px; padding: 6px; }
  .ac-launch-text { display: none; }
  .ac-launch-dot { left: auto; right: 4px; top: 4px; }
  .ac-panel { inset: 0; right: 0; bottom: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; animation-name: acSheet; }
  @keyframes acSheet { from { transform: translateY(30px); opacity: 0; } }
  .ac-compose { margin-bottom: max(6px, env(safe-area-inset-bottom)); }
  .ac-pop { padding: 0; place-items: end center; }
  .ac-pop-card { width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-launch, .ac-panel, .ac-msg, .ac-cards { animation: none; }
}

/* launcher: floating logo only */
.ac-launch { padding: 0; width: 62px; height: 62px; justify-content: center; gap: 0; border-radius: 50%; }
.ac-launch-mark { width: 62px; height: 62px; background: none; border: 0; }
.ac-launch-mark img { width: 32px; height: auto; }
.ac-launch-text { display: none; }
.ac-launch-dot { left: auto; right: 3px; top: 3px; width: 12px; height: 12px; }
.ac-launch::after { /* soft breathing ring */
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid rgba(33, 183, 176, .45);
  animation: acRing 2.8s ease-out infinite; pointer-events: none;
}
@keyframes acRing { 0% { opacity: .9; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.18); } }
.ac-launch::before { /* hover label */
  content: 'Ask Arc'; position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%);
  padding: 7px 12px; border-radius: 999px; background: #fff; color: #0f5e5a; font: 600 .78rem/1 'Plus Jakarta Sans', system-ui, sans-serif;
  white-space: nowrap; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.ac-launch:hover::before, .ac-launch:focus-visible::before { opacity: 1; transform: translate(0, -50%); }
@media (max-width: 600px) { .ac-launch { width: 56px; height: 56px; } .ac-launch-mark { width: 56px; height: 56px; } .ac-launch::before { display: none; } }
@media (prefers-reduced-motion: reduce) { .ac-launch::after { animation: none; } }
/* keep the hero's "Watch the studio film" clear of the floating button */
@media (min-width: 761px) and (max-width: 1440px) { body.has-assistant .cine-base { padding-right: 96px; } }
