/* Four Seasons Chat – styled to match fourseasonsreg.com (navy #022c57, gold #c59860) */
#fsc-root {
  --fsc-color: #022c57;
  --fsc-accent: #c59860;
  --fsc-ink: #333;
  --fsc-head-font: "hebrew condensed", "open sans hebrow condensed", "Assistant", Arial, sans-serif;
  --fsc-body-font: "Assistant", "hebrew condensed", Arial, sans-serif;
  position: fixed;
  bottom: 22px;
  z-index: 2147483000;
  font-family: var(--fsc-body-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fsc-ink);
}
#fsc-root.fsc-left { left: 22px; }
#fsc-root.fsc-right { right: 22px; }
#fsc-root *, #fsc-root *::before, #fsc-root *::after { box-sizing: border-box; }

/* ---------- robot icon ---------- */
#fsc-root .fsc-robot { display: block; overflow: visible; }
#fsc-root .fsc-r-head { fill: #fff; }
#fsc-root .fsc-r-face { fill: var(--fsc-color); }
#fsc-root .fsc-r-eyes circle { fill: #7fe3ff; }
#fsc-root .fsc-r-ear { fill: var(--fsc-accent); }
#fsc-root .fsc-r-ant { stroke: #fff; stroke-width: 1.4; stroke-linecap: round; }
#fsc-root .fsc-r-dot { fill: var(--fsc-accent); }
#fsc-root .fsc-r-mouth { stroke: var(--fsc-color); stroke-width: 1.4; stroke-linecap: round; fill: none; }
#fsc-root .fsc-r-eyes { transform-origin: 12px 12.1px; animation: fsc-blink 4.5s infinite; }
@keyframes fsc-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* ---------- launcher ---------- */
#fsc-root .fsc-launcher {
  position: relative;
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--fsc-accent); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 25%, #0d4579 0%, var(--fsc-color) 70%);
  box-shadow: 0 8px 24px rgba(2, 44, 87, .35);
  transition: transform .18s ease, box-shadow .18s ease;
}
#fsc-root .fsc-launcher .fsc-robot { width: 36px; height: 36px; }
#fsc-root .fsc-launcher:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 28px rgba(2, 44, 87, .45); }
#fsc-root .fsc-launcher:focus-visible { outline: 3px solid var(--fsc-accent); outline-offset: 3px; }
#fsc-root .fsc-launcher::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--fsc-accent); opacity: 0;
  animation: fsc-pulse 3s ease-out infinite;
}
@keyframes fsc-pulse { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(1.35); opacity: 0; } }
#fsc-root .fsc-badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  background: var(--fsc-accent); color: #fff;
  font-family: Arial, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .5px;
  line-height: 1; padding: 4px 6px; border-radius: 10px;
  border: 2px solid #fff;
}
#fsc-root .fsc-launcher.fsc-custom { background: #fff; }
#fsc-root .fsc-img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; padding: 8px; box-sizing: border-box; display: block; background: #fff; }
#fsc-root .fsc-avatar .fsc-img { padding: 3px; }
#fsc-root.fsc-open .fsc-launcher { display: none; }

/* ---------- panel ---------- */
#fsc-root .fsc-panel {
  position: absolute; bottom: 0;
  width: 380px; height: 580px; max-height: calc(100vh - 44px);
  background: #fff; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 26, 51, .32);
  animation: fsc-in .2s ease-out;
}
@keyframes fsc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#fsc-root .fsc-panel[hidden] { display: none; }
#fsc-root.fsc-left .fsc-panel { left: 0; }
#fsc-root.fsc-right .fsc-panel { right: 0; }

#fsc-root .fsc-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(0, 26, 51, .96) 0%, var(--fsc-color) 100%);
  border-bottom: 3px solid var(--fsc-accent);
  color: #fff;
}
#fsc-root .fsc-avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--fsc-color); border: 2px solid var(--fsc-accent);
  display: flex; align-items: center; justify-content: center;
}
#fsc-root .fsc-avatar .fsc-robot { width: 26px; height: 26px; }
#fsc-root .fsc-head-text { flex: 1; min-width: 0; }
#fsc-root .fsc-title { font-family: var(--fsc-head-font); font-weight: 700; font-size: 20px; line-height: 1.15; letter-spacing: .2px; }
#fsc-root .fsc-sub { font-size: 13px; opacity: .9; display: flex; align-items: center; gap: 6px; }
#fsc-root .fsc-online { width: 8px; height: 8px; border-radius: 50%; background: #61ce70; box-shadow: 0 0 0 2px rgba(97, 206, 112, .3); }
#fsc-root .fsc-head button {
  background: transparent; border: 0; color: #fff; cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
#fsc-root .fsc-head button:hover { background: rgba(255, 255, 255, .14); color: var(--fsc-accent); }

#fsc-root .fsc-log {
  flex: 1; overflow-y: auto; padding: 18px 14px;
  background: #f6f4f0;
  display: flex; flex-direction: column; gap: 10px;
}
#fsc-root .fsc-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 12px;
  word-wrap: break-word; overflow-wrap: anywhere; white-space: normal;
  font-size: 15.5px;
}
#fsc-root .fsc-bot { align-self: flex-start; background: #fff; border: 1px solid #ece6dc; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
#fsc-root .fsc-user { align-self: flex-end; background: var(--fsc-color); color: #fff; }
#fsc-root .fsc-err { align-self: flex-start; background: #fdecec; color: #8a1c1c; border: 1px solid #f5c2c2; }
#fsc-root[dir="rtl"] .fsc-bot, #fsc-root[dir="rtl"] .fsc-err { border-top-right-radius: 3px; }
#fsc-root[dir="ltr"] .fsc-bot, #fsc-root[dir="ltr"] .fsc-err { border-top-left-radius: 3px; }
#fsc-root[dir="rtl"] .fsc-user { border-top-left-radius: 3px; }
#fsc-root[dir="ltr"] .fsc-user { border-top-right-radius: 3px; }
#fsc-root .fsc-msg strong { color: var(--fsc-color); font-weight: 700; }
#fsc-root .fsc-user strong { color: #fff; }
#fsc-root .fsc-msg a { color: #9f7b43; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
#fsc-root .fsc-user a { color: #fff; }

#fsc-root .fsc-typing { display: flex; gap: 4px; padding: 14px 16px; }
#fsc-root .fsc-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--fsc-accent);
  animation: fsc-dot 1.2s infinite ease-in-out;
}
#fsc-root .fsc-typing span:nth-child(2) { animation-delay: .15s; }
#fsc-root .fsc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes fsc-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

#fsc-root .fsc-form {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px; border-top: 1px solid #ece6dc; background: #fff;
}
#fsc-root .fsc-input {
  flex: 1; resize: none; border: 1px solid #d9d2c5; border-radius: 10px;
  padding: 10px 12px; font: inherit; font-size: 15.5px; color: inherit;
  max-height: 110px; outline: none; background: #fff; margin: 0; min-height: 44px;
}
#fsc-root .fsc-input:focus { border-color: var(--fsc-accent); box-shadow: 0 0 0 3px rgba(197, 152, 96, .2); }
#fsc-root .fsc-send {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 10px;
  background: var(--fsc-accent); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: background .15s ease;
}
#fsc-root .fsc-send:hover { background: #9f7b43; }
#fsc-root .fsc-send:disabled { opacity: .5; cursor: default; }
#fsc-root[dir="rtl"] .fsc-send svg { transform: scaleX(-1); }

/* Phones/tablets: the site shows a 71px contact bar at the bottom – sit above it, level with the WhatsApp button */
@media (max-width: 767px) {
  #fsc-root { bottom: 70px; }
}
@media (max-width: 480px) {
  #fsc-root { bottom: 70px; }
  #fsc-root.fsc-left { left: 16px; }
  #fsc-root.fsc-right { right: 16px; }
  #fsc-root .fsc-launcher { width: 58px; height: 58px; }
  #fsc-root .fsc-launcher .fsc-robot { width: 32px; height: 32px; }
  #fsc-root.fsc-open { left: 0; right: 0; bottom: 0; top: 0; }
  #fsc-root .fsc-panel { position: fixed; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #fsc-root .fsc-launcher, #fsc-root .fsc-panel { transition: none; animation: none; }
  #fsc-root .fsc-launcher::after, #fsc-root .fsc-r-eyes, #fsc-root .fsc-typing span { animation: none; }
}
