.reserva-chat-widget,
.reserva-chat-launcher,
.reserva-chat-invite {
  --chat-green: #1f9d55;
  --chat-green-dark: #147a40;
  --chat-ink: #17352a;
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

.reserva-chat-widget *,
.reserva-chat-launcher *,
.reserva-chat-invite * { box-sizing: border-box; }

.reserva-chat-widget {
  position: fixed;
  z-index: 40;
  left: 20px;
  bottom: 20px;
  display: flex;
  width: min(350px, calc(100vw - 40px));
  height: min(500px, calc(100vh - 40px));
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(18, 83, 48, .18);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(6, 33, 22, .22);
  color: #17231f;
}

.reserva-chat-widget.is-callout-highlighted {
  animation: reserva-chat-callout-highlight 2.2s ease;
}

.reserva-chat-widget[hidden],
.reserva-chat-launcher[hidden],
.reserva-chat-invite[hidden] { display: none !important; }

.reserva-chat-header {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px 11px 16px;
  background: var(--chat-green);
  color: #fff;
}

.reserva-chat-header strong { font-size: 15px; letter-spacing: .01em; }
.reserva-chat-minimize {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.reserva-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px 8px;
  background: #f4f7f5;
  overscroll-behavior: contain;
}

.reserva-chat-message {
  display: flex;
  margin: 0 0 9px;
  flex-direction: column;
  align-items: flex-start;
}

.reserva-chat-message.is-visitor { align-items: flex-end; }
.reserva-chat-bubble {
  max-width: 88%;
  padding: 9px 11px 7px;
  border-radius: 12px 12px 12px 3px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(8, 45, 29, .08);
  color: #1f3028;
  font-size: 14px;
  line-height: 1.38;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reserva-chat-message.is-visitor .reserva-chat-bubble {
  border-radius: 12px 12px 3px 12px;
  background: #dff5e7;
}

.reserva-chat-link {
  color: #08783d;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.reserva-chat-link:hover { color: #045a2d; }

.reserva-chat-image-link {
  display: block;
  width: min(100%, 320px);
  margin-top: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: #edf4f0;
  line-height: 0;
}

.reserva-chat-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.reserva-chat-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.reserva-chat-link-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #08783d;
  border-radius: 9px;
  background: #08783d;
  box-shadow: 0 2px 5px rgba(8, 120, 61, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.reserva-chat-link-button:hover {
  border-color: #045a2d;
  background: #045a2d;
  color: #fff;
  transform: translateY(-1px);
}

.reserva-chat-link-button:focus-visible {
  outline: 3px solid rgba(8, 120, 61, 0.28);
  outline-offset: 2px;
}

.reserva-chat-link-icon {
  font-size: 14px;
  line-height: 1;
}

.reserva-chat-time {
  display: block;
  margin-top: 3px;
  color: #728079;
  font-size: 10px;
  text-align: right;
}

.reserva-chat-status {
  padding: 4px 12px 8px;
  background: #f4f7f5;
  color: #66746d;
  font-size: 12px;
  text-align: center;
}

.reserva-chat-error {
  padding: 7px 12px;
  background: #fff2f2;
  color: #a52525;
  font-size: 12px;
}

.reserva-chat-controls {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  padding: 10px 12px 12px;
  border-top: 1px solid #e3ebe6;
  background: #fff;
}

.reserva-chat-guidance {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #9ed8b1;
  border-radius: 9px;
  background: #eaf8ee;
  color: #126738;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.reserva-chat-option,
.reserva-chat-send,
.reserva-chat-voice {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #b9d4c3;
  border-radius: 9px;
  background: #fff;
  color: var(--chat-green-dark);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.reserva-chat-option:hover,
.reserva-chat-option:focus-visible { background: #eff9f2; border-color: var(--chat-green); }
.reserva-chat-option:disabled,
.reserva-chat-send:disabled,
.reserva-chat-voice:disabled { cursor: wait; opacity: .55; }

.reserva-chat-form { display: flex; gap: 7px; }
.reserva-chat-form input,
.reserva-chat-form textarea {
  min-width: 0;
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 110px;
  padding: 9px 10px;
  resize: none;
  border: 1px solid #c9d7ce;
  border-radius: 9px;
  background: #fff;
  color: #1d3027;
  font: inherit;
  font-size: 16px;
  outline: none;
}

.reserva-chat-form input:focus,
.reserva-chat-form textarea:focus { border-color: var(--chat-green); box-shadow: 0 0 0 3px rgba(31, 157, 85, .12); }
.reserva-chat-send {
  min-width: 66px;
  border-color: var(--chat-green);
  background: var(--chat-green);
  color: #fff;
  text-align: center;
}

.reserva-chat-voice {
  position: relative;
  width: 42px;
  min-width: 42px;
  padding: 0;
  border-color: #b9d4c3;
  background: #fff;
  color: var(--chat-green-dark);
  text-align: center;
}

.reserva-chat-voice:hover,
.reserva-chat-voice:focus-visible {
  border-color: var(--chat-green);
  background: #eff9f2;
}

.reserva-chat-voice:focus-visible {
  outline: 3px solid rgba(31, 157, 85, .16);
  outline-offset: 1px;
}

.reserva-chat-voice-icon {
  display: block;
  font-size: 19px;
  line-height: 1;
}

.reserva-chat-voice.is-listening {
  border-color: #c93434;
  background: #fff0f0;
  color: #b32626;
}

.reserva-chat-voice.is-listening::after {
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(201, 52, 52, .42);
  border-radius: 7px;
  content: '';
  animation: reserva-chat-listening 1.25s ease-out infinite;
}

.reserva-chat-notification-offer {
  margin-bottom: 9px;
  padding: 11px;
  border: 1px solid #c9e4d2;
  border-radius: 11px;
  background: #f2fbf5;
  color: #173e25;
}

.reserva-chat-notification-offer strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.reserva-chat-notification-offer p,
.reserva-chat-notification-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.reserva-chat-notification-actions {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

.reserva-chat-notification-yes,
.reserva-chat-notification-no {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #acd4ba;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.reserva-chat-notification-yes {
  border-color: var(--chat-green);
  background: var(--chat-green);
  color: #fff;
}

.reserva-chat-notification-no {
  background: #fff;
  color: #28533a;
}

.reserva-chat-notification-status {
  margin-bottom: 7px;
  color: #356246;
}

@keyframes reserva-chat-listening {
  0% { opacity: .9; transform: scale(.82); }
  100% { opacity: 0; transform: scale(1.12); }
}

.reserva-chat-launcher {
  position: fixed;
  z-index: 40;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  width: auto;
  min-width: 190px;
  height: 58px;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 7px 16px 7px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--chat-green);
  box-shadow: 0 12px 28px rgba(18, 114, 57, .35);
  color: #fff;
  cursor: pointer;
  font-size: 0;
  font-weight: 700;
}

.reserva-chat-launcher-icon {
  position: relative;
  display: block;
  width: 31px;
  height: 27px;
}

.reserva-chat-launcher-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  color: #fff;
  line-height: 1.1;
}

.reserva-chat-launcher-text strong {
  font-size: 14px;
  font-weight: 800;
}

.reserva-chat-launcher-text small {
  font-size: 11px;
  font-weight: 600;
  opacity: .88;
}

.reserva-chat-launcher-bubble {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #fff;
  filter: drop-shadow(0 2px 2px rgba(7, 67, 32, .16));
}

.reserva-chat-launcher-bubble::after {
  position: absolute;
  width: 8px;
  height: 8px;
  background: inherit;
  clip-path: polygon(0 0, 100% 20%, 18% 100%);
  content: '';
}

.reserva-chat-launcher-bubble.is-back {
  top: 1px;
  right: 0;
  width: 20px;
  height: 18px;
  opacity: .94;
}

.reserva-chat-launcher-bubble.is-back::after { right: 1px; bottom: -3px; }
.reserva-chat-launcher-bubble.is-front {
  left: 0;
  bottom: 1px;
  width: 22px;
  height: 20px;
  box-shadow: 0 0 0 3px var(--chat-green);
}
.reserva-chat-launcher-bubble.is-front::after { left: 2px; bottom: -3px; transform: scaleX(-1); }

.reserva-chat-launcher.has-new::after {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ffcc33;
  content: '';
}

.reserva-chat-invite {
  position: fixed;
  z-index: 41;
  left: 20px;
  bottom: 88px;
  display: flex;
  width: min(275px, calc(100vw - 40px));
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 12px 11px 12px 14px;
  border: 1px solid rgba(18, 83, 48, .14);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(6, 33, 22, .2);
  color: var(--chat-ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.reserva-chat-invite span {
  flex: 1 1 auto;
}

.reserva-chat-invite-close {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #edf7f0;
  color: var(--chat-green-dark);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

@keyframes reserva-chat-mobile-attention {
  0%, 72%, 100% { transform: translateY(0); }
  80% { transform: translateY(-4px); }
  88% { transform: translateY(0); }
  94% { transform: translateY(-2px); }
}

@keyframes reserva-chat-callout-highlight {
  0%, 100% { box-shadow: 0 18px 48px rgba(6, 33, 22, .22); }
  18%, 58% { box-shadow: 0 0 0 6px rgba(89, 213, 201, .48), 0 22px 58px rgba(6, 33, 22, .34); }
}

@media (max-width: 760px) {
  .reserva-chat-widget {
    left: 10px;
    right: 10px;
    bottom: calc(10px + var(--chat-keyboard-offset, 0px));
    width: auto;
    height: min(560px, 72vh);
    height: min(560px, 72dvh);
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
    transition: height .22s ease;
  }
  .reserva-chat-widget:focus-within {
    height: min(720px, calc(var(--chat-visual-height, 100dvh) - 20px));
  }
  .reserva-chat-launcher {
    left: 12px;
    bottom: 12px;
    width: auto;
    min-width: 190px;
    height: 58px;
    justify-content: flex-start;
    gap: 11px;
    padding: 7px 16px 7px 13px;
    border-radius: 999px;
    animation: reserva-chat-mobile-attention 2.8s ease 2.2s 1;
  }
  .reserva-chat-launcher-icon {
    width: 31px;
    min-width: 31px;
  }
  .reserva-chat-launcher-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    color: #fff;
    line-height: 1.1;
  }
  .reserva-chat-launcher-text strong {
    font-size: 14px;
    font-weight: 800;
  }
  .reserva-chat-launcher-text small {
    font-size: 11px;
    font-weight: 600;
    opacity: .88;
  }
  .reserva-chat-invite {
    position: fixed;
    z-index: 41;
    left: 12px;
    bottom: 80px;
    display: flex;
    width: min(275px, calc(100vw - 24px));
    min-height: 58px;
    align-items: center;
    gap: 10px;
    padding: 12px 11px 12px 14px;
    border: 1px solid rgba(18, 83, 48, .14);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(6, 33, 22, .2);
    color: var(--chat-ink);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
  }
  .reserva-chat-invite span {
    flex: 1 1 auto;
  }
  .reserva-chat-invite-close {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #edf7f0;
    color: var(--chat-green-dark);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
  }
  .reserva-chat-has-mobile-bar .reserva-chat-widget {
    bottom: calc(72px + var(--chat-keyboard-offset, 0px));
    height: min(520px, 68dvh);
    max-height: calc(100dvh - 84px);
  }
  .reserva-chat-has-mobile-bar .reserva-chat-widget:focus-within {
    height: calc(var(--chat-visual-height, 100dvh) - 84px);
  }
  .reserva-chat-has-mobile-bar .reserva-chat-launcher { bottom: 76px; }
  .reserva-chat-has-mobile-bar .reserva-chat-invite { bottom: 144px; }
}

@media (prefers-reduced-motion: reduce) {
  .reserva-chat-widget, .reserva-chat-launcher { scroll-behavior: auto; }
  .reserva-chat-launcher { animation: none; }
  .reserva-chat-widget.is-callout-highlighted { animation: none; }
  .reserva-chat-voice.is-listening::after { animation: none; }
}
