/* Asistente guiado y acceso de contacto compartidos por las páginas del sitio. */
.green-chat-launch {
  position: fixed;
  z-index: 910;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid #84a18c;
  border-radius: 28px;
  background: var(--green-800);
  color: white;
  font: 650 15px/1.3 var(--font-body);
  box-shadow: 0 3px 14px #04160f24;
}
.green-chat-launch:hover { background: var(--green-700); }
.green-chat-icon {
  position: relative;
  width: 19px;
  height: 15px;
  border: 1.7px solid currentColor;
  border-radius: 5px 5px 5px 0;
}
.green-chat-icon::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 3px;
  width: 9px;
  height: 2px;
  background: currentColor;
}
body:has(.green-chat-launch) .back-to-top { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 58px); }
body.nav-open .green-chat-launch { visibility: hidden; }
#green-chat {
  position: fixed;
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  margin: 0;
  padding: 0;
  width: min(385px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 32px));
  max-height: min(620px, calc(100dvh - 32px));
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  box-shadow: 0 12px 52px #04160f38;
}
#green-chat[open] { display: flex; flex-direction: column; }
#green-chat::backdrop { background: rgb(4 22 15 / 30%); }
#green-chat [hidden] { display: none !important; }
#green-chat .gc-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 8px 20px;
  background: var(--green-950);
  color: white;
}
#green-chat .gc-header h2 { margin: 0; color: white; font-size: 21px; }
#green-chat button { cursor: pointer; }
#green-chat .gc-close, #green-chat .gc-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: 600 14px/1.35 var(--font-body);
}
#green-chat .gc-close { gap: 8px; }
#green-chat .gc-close span { font-size: 22px; }
#green-chat .gc-body { padding: 18px 21px 22px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#green-chat .gc-back { color: var(--green-700); margin: -8px 0 5px; padding-left: 0; }
#green-chat .gc-question { margin: 0; font-size: 24px; line-height: 1.2; }
#green-chat .gc-question:focus { outline: none; }
#green-chat .gc-context, #green-chat .gc-help { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
#green-chat .gc-options { display: grid; margin-top: 16px; border-top: 1px solid var(--line); }
#green-chat .gc-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 47px;
  padding: 10px 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--green-700);
  font: 650 15px/1.4 var(--font-body);
  text-align: left;
}
#green-chat .gc-choice::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px;
  border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
#green-chat .gc-choice:hover { background: var(--soft); }
#green-chat .gc-form { display: grid; gap: 11px; margin-top: 16px; }
#green-chat .gc-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
#green-chat .gc-form input {
  display: block; width: 100%; min-height: 44px; box-sizing: border-box;
  padding: 8px 10px; border: 1px solid #82988a; border-radius: 5px;
  background: white; color: var(--ink); font: 400 16px/1.4 var(--font-body);
}
#green-chat .gc-primary {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  width: 100%; min-height: 46px; margin-top: 4px; border: 0; border-radius: 6px;
  padding: 10px 14px; background: var(--green-700); color: white;
  font: 650 15px/1.4 var(--font-body); text-align: center;
}
#green-chat .gc-review dl { margin: 16px 0; }
#green-chat .gc-review dt { margin-top: 9px; color: var(--muted); font-size: 13px; }
#green-chat .gc-review dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
#green-chat .gc-review .gc-primary { margin-top: 14px; }
#green-chat :is(a, button, input):focus-visible, .green-chat-launch:focus-visible { outline: 3px solid #449a60; outline-offset: 2px; }
#green-chat .gc-close:focus-visible { outline-color: #dbf0e1; }
@media (max-width: 500px) {
  .green-chat-launch { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  #green-chat {
    inset: auto 8px max(8px, env(safe-area-inset-bottom)) auto;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}
