.svaic-root {
  --svaic-shadow: 0 24px 80px rgba(18, 33, 31, 0.18);
  --svaic-border: rgba(18, 65, 61, 0.12);
  font-family: inherit;
  color: #17312f;
  z-index: 9999;
}

.svaic-root.is-floating {
  position: fixed;
  bottom: 24px;
}

.svaic-root.is-floating[data-position="right"] {
  right: 24px;
}

.svaic-root.is-floating[data-position="left"] {
  left: 24px;
}

.svaic-root.is-embedded {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.svaic-launcher {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px 14px 14px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.35), transparent 40%),
    linear-gradient(135deg, var(--svaic-primary), #0f2e2b);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--svaic-shadow);
}

.svaic-launcher__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--svaic-accent), #dfbe86);
  color: #17312f;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.svaic-launcher__label {
  font-size: 14px;
  font-weight: 600;
}

.svaic-panel {
  width: min(390px, calc(100vw - 24px));
  height: min(640px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--svaic-border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.96)),
    linear-gradient(135deg, rgba(197,157,95,0.08), rgba(18,65,61,0.05));
  backdrop-filter: blur(14px);
  box-shadow: var(--svaic-shadow);
}

.svaic-root.is-floating .svaic-panel {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.svaic-root.is-floating[data-position="left"] .svaic-panel {
  left: 0;
  right: auto;
}

.svaic-root.is-open .svaic-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.svaic-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(197,157,95,0.24), transparent 45%),
    linear-gradient(135deg, var(--svaic-primary), #102d2a 70%);
}

.svaic-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

.svaic-panel__header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  color: inherit;
}

.svaic-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.svaic-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.svaic-reset,
.svaic-close {
  border: 0;
  cursor: pointer;
  color: inherit;
}

.svaic-reset {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 12px;
  font-weight: 600;
}

.svaic-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  font-size: 22px;
  line-height: 1;
}

.svaic-messages {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(197,157,95,0.09), transparent 35%),
    linear-gradient(180deg, rgba(248,243,236,0.95), #fff);
}

.svaic-message {
  display: flex;
  margin-bottom: 12px;
}

.svaic-message--assistant {
  justify-content: flex-start;
}

.svaic-message--user {
  justify-content: flex-end;
}

.svaic-message__bubble {
  max-width: 85%;
  padding: 13px 15px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 10px 24px rgba(18, 33, 31, 0.06);
}

.svaic-message--assistant .svaic-message__bubble {
  border-top-left-radius: 8px;
  background: #fff;
  color: #17312f;
}

.svaic-message--user .svaic-message__bubble {
  border-top-right-radius: 8px;
  background: linear-gradient(135deg, var(--svaic-primary), #0e332f);
  color: #fff;
}

.svaic-message__bubble a {
  color: inherit;
  text-decoration: underline;
}

.svaic-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 16px;
  background: linear-gradient(180deg, rgba(248,243,236,0), rgba(248,243,236,0.9));
}

.svaic-prompts.is-hidden {
  display: none;
}

.svaic-prompt {
  border: 1px solid rgba(18,65,61,0.12);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.85);
  color: #17312f;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.svaic-prompt:hover,
.svaic-prompt:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(197,157,95,0.6);
}

.svaic-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 18px 18px;
  border-top: 1px solid rgba(18,65,61,0.08);
  background: rgba(255,255,255,0.92);
}

.svaic-form textarea {
  flex: 1;
  min-height: 50px;
  max-height: 120px;
  resize: none;
  padding: 14px 16px;
  border: 1px solid rgba(18,65,61,0.14);
  border-radius: 18px;
  background: #fff;
  color: #17312f;
  font: inherit;
  line-height: 1.5;
}

.svaic-form textarea:focus {
  outline: none;
  border-color: rgba(18,65,61,0.42);
  box-shadow: 0 0 0 4px rgba(18,65,61,0.08);
}

.svaic-submit,
.svaic-booking-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.svaic-submit {
  background: linear-gradient(135deg, var(--svaic-accent), #d9b174);
  color: #17312f;
  cursor: pointer;
}

.svaic-submit[disabled],
.svaic-form textarea[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.svaic-footer {
  padding: 0 18px 18px;
  background: rgba(255,255,255,0.92);
}

.svaic-booking-link {
  width: 100%;
  background: rgba(18,65,61,0.08);
  color: var(--svaic-primary);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .svaic-root.is-floating {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .svaic-root.is-floating .svaic-panel,
  .svaic-root.is-floating[data-position="left"] .svaic-panel {
    right: 0;
    left: 0;
    width: 100%;
    height: min(78vh, 620px);
  }

  .svaic-launcher {
    width: 100%;
    justify-content: center;
  }

  .svaic-message__bubble {
    max-width: 92%;
  }

  .svaic-form {
    flex-direction: column;
    align-items: stretch;
  }

  .svaic-submit {
    width: 100%;
  }
}
