/* Gran Hacienda / asesoría. Capa aislada: no modifica el tema ni sus módulos. */
.gh-wa-doc-card { background: var(--gh-cream); border-radius: 24px; }
.gh-wa-doc-card h2 { font: 400 2rem/1.15 var(--gh-serif); }
.gh-wa {
  --gh-wa-offset: clamp(16px, 2vw, 28px);
  --gh-wa-entrance-duration: 1200ms;
  position: fixed;
  z-index: 1030; /* Debajo del navbar y de los diálogos del sitio. */
  right: max(var(--gh-wa-offset), env(safe-area-inset-right, 0px));
  bottom: calc(var(--gh-wa-offset) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  width: max-content;
  max-width: calc(100% - max(var(--gh-wa-offset), env(safe-area-inset-left, 0px)) - max(var(--gh-wa-offset), env(safe-area-inset-right, 0px)));
  font-family: var(--gh-sans);
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--gh-forest);
  pointer-events: none;
}
.gh-wa[data-wa-position="left"] {
  right: auto;
  left: max(var(--gh-wa-offset), env(safe-area-inset-left, 0px));
  align-items: flex-start;
}
.gh-wa .gh-wa__button {
  display: grid;
  place-items: center;
  flex: none;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--gh-forest);
  background: var(--gh-lime);
  box-shadow: 0 8px 26px rgb(0 0 0 / 20%);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
  pointer-events: auto;
  transition: transform 220ms var(--gh-ease), background-color 220ms ease, box-shadow 220ms ease;
  -webkit-tap-highlight-color: transparent;
}
.gh-wa__button i::before { display: block; }
/* Solo con JS: sin script el enlace nativo permanece visible. Sin destello inicial. */
.gh-wa-js .gh-wa:not(.is-wa-shown) .gh-wa__button,
.gh-wa.is-wa-pending .gh-wa__button { visibility: hidden; opacity: 0; transform: scale(0); pointer-events: none; }
.gh-wa.is-wa-entering[data-wa-entrance="scale"] .gh-wa__button { transform-origin: center; animation: gh-wa-scale-in var(--gh-wa-entrance-duration) cubic-bezier(.16, 1, .3, 1) both; will-change: transform, opacity; }
.gh-wa.is-wa-entering[data-wa-entrance="bounce"] .gh-wa__button { animation: gh-wa-bounce var(--gh-wa-entrance-duration) both; will-change: transform, opacity; }
.gh-wa.is-wa-page-hidden .gh-wa__button { animation-play-state: paused; }
.gh-wa .gh-wa__message {
  position: relative;
  width: 326px;
  max-width: 100%;
  max-height: calc(100svh - 140px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 25px 22px;
  border: 1px solid rgb(16 49 43 / 9%);
  border-radius: 24px 24px 10px 24px;
  background: var(--gh-cream);
  box-shadow: 0 16px 50px rgb(0 0 0 / 18%);
  pointer-events: auto;
  transform-origin: bottom right;
  animation: gh-wa-message-in 440ms var(--gh-ease) both;
}
.gh-wa[data-wa-position="left"] .gh-wa__message { border-radius: 24px 24px 24px 10px; transform-origin: bottom left; }
.gh-wa .gh-wa__message[hidden] { display: none !important; }
.gh-wa.is-wa-message-closing .gh-wa__message { pointer-events: none; animation: gh-wa-message-out 240ms ease both; }
.gh-wa .gh-wa__close {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--gh-forest);
  background: transparent;
  font: 26px/1 var(--gh-sans);
  cursor: pointer;
  transition: background-color 180ms ease;
}
.gh-wa .gh-wa__eyebrow { display: block; padding-right: 12px; font-size: 10px; font-weight: 650; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; }
.gh-wa .gh-wa__greeting { margin: 15px 0 10px; color: var(--gh-forest); font: 400 30px/1.14 var(--gh-serif); letter-spacing: -.035em; overflow-wrap: anywhere; }
.gh-wa .gh-wa__copy { margin: 0 0 19px; color: var(--gh-forest); font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.gh-wa .gh-wa__mobile { display: none; }
.gh-wa .gh-wa__bubble { display: none; pointer-events: auto; }
.gh-wa .gh-wa__bubble[hidden] { display: none !important; }
.gh-wa .gh-wa__cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 12px 16px; border-radius: 12px; color: white; background: var(--gh-forest); font-size: 12px; font-weight: 600; line-height: 1.45; text-decoration: none; transition: background-color 180ms ease; }
.gh-wa__cta > span[aria-hidden] { font-size: 19px; line-height: 1; }
.gh-wa__cta > :is(.gh-wa__desktop, .gh-wa__mobile) { min-width: 0; overflow-wrap: anywhere; }
.gh-wa a.gh-wa__cta { color: white; } /* Superar el color de enlaces del tema base. */
.gh-wa .gh-wa__note { display: block; margin-top: 12px; color: var(--gh-forest); font-size: 10px; text-align: center; }
.gh-wa :is(a, button):focus-visible { outline: 3px solid var(--gh-water); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .gh-wa .gh-wa__button:hover { color: var(--gh-forest); background: var(--gh-mint); transform: translateY(-3px); box-shadow: 0 12px 30px rgb(0 0 0 / 24%); }
  .gh-wa .gh-wa__close:hover { background: rgb(16 49 43 / 7%); }
  .gh-wa .gh-wa__cta:hover { color: white; background: var(--gh-grove); }
}
.gh-wa .gh-wa__button:active { transform: scale(.94); }
/* Ocultar también del teclado mientras el menú móvil ocupa la pantalla. */
body:has(.gh-navbar.is-open) .gh-wa { visibility: hidden; }
@keyframes gh-wa-scale-in {
  0% { transform: scale(0); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes gh-wa-bounce {
  0% { transform: translateY(16px) scale(.86); opacity: .25; }
  35% { transform: translateY(-13px) scale(1.035); opacity: 1; }
  58% { transform: translateY(3px) scale(.985); }
  78% { transform: translateY(-4px) scale(1.01); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes gh-wa-message-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes gh-wa-message-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (max-width: 575.98px) {
  .gh-wa { gap: 10px; }
  .gh-wa .gh-wa__button { width: 54px; height: 54px; font-size: 27px; }
  .gh-wa .gh-wa__message {
    display: none !important;
  }
  .gh-wa .gh-wa__bubble { display: flex; width: var(--gh-wa-mobile-width, 288px); max-width: 100%; padding: 14px 18px 14px 22px; border-radius: 22px 22px 11px 22px; box-shadow: 0 8px 26px rgb(0 0 0 / 16%); }
  .gh-wa[data-wa-position="left"] .gh-wa__bubble { border-radius: 22px 22px 22px 11px; }
  .gh-wa .gh-wa__close { top: 2px; right: 2px; font-size: 24px; }
  .gh-wa .gh-wa__eyebrow { padding-right: 28px; font-size: 9px; letter-spacing: .1em; }
  .gh-wa .gh-wa__greeting { margin: 8px 0 6px; padding-right: 18px; font-size: 25px; line-height: 1.16; }
  .gh-wa .gh-wa__copy { margin-bottom: 12px; font-size: 13px; line-height: 1.55; }
  .gh-wa .gh-wa__cta { min-height: 44px; }
  .gh-wa .gh-wa__note { margin-top: 8px; line-height: 1.4; }
  .gh-wa .gh-wa__desktop { display: none; }
  .gh-wa .gh-wa__mobile { display: inline; }
}
/* El mismo panel editorial gh-vc-view, con formulario de contacto aislado.
   Estas reglas permiten usarlo también en la muestra sin cargar todo el catálogo. */
.gh-wa-agenda { --gh-vc-view-pad: clamp(16px, 3vw, 48px); box-sizing: border-box; position: fixed; inset: 0; width: 100%; max-width: none; height: 100svh; max-height: none; margin: 0; padding: var(--gh-vc-view-pad); border: 0; color: var(--gh-forest); background: transparent; overflow: auto; overscroll-behavior: contain; font: 400 1rem/1.6 var(--gh-sans); pointer-events: auto; }
.gh-wa-agenda:not([open]) { display: none; }
.gh-wa-agenda[open] { display: grid; place-items: safe center; }
.gh-wa-agenda::backdrop { background: rgba(5,25,20,.68); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.gh-wa-agenda .gh-vc-view__panel { box-sizing: border-box; width: min(100%, 680px); min-height: 0; padding: clamp(24px, 3vw, 36px); border: 1px solid rgba(255,255,255,.5); border-radius: 30px; background: var(--gh-cream); box-shadow: 0 32px 100px rgba(0,0,0,.22); overflow-wrap: anywhere; }
.gh-wa-agenda .gh-vc-view__bar { display: flex; position: sticky; z-index: 2; top: 0; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: .75rem; background: var(--gh-cream); }
.gh-wa-agenda .gh-vc-view__bar > span, .gh-wa-agenda .gh-vc-kicker { color: var(--gh-grove); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.gh-wa-agenda .gh-vc-view__close { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; color: var(--gh-forest); background: var(--gh-lime); font: 400 1.8rem/1 var(--gh-sans); cursor: pointer; }
.gh-wa-agenda .gh-vc-view__heading { padding-block: .25rem 1.25rem; text-align: center; }
.gh-wa-agenda .gh-vc-view__heading h2 { margin: .75rem 0 1rem; color: var(--gh-forest); font: 400 clamp(2rem, 5vw, 3.2rem)/1.03 var(--gh-serif); letter-spacing: -.05em; text-wrap: balance; }
.gh-wa-agenda .gh-vc-view__heading p { max-width: 54ch; margin: 0 auto; color: #52665e; font-size: .85rem; }
.gh-wa-agenda__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.gh-wa-agenda__fields label { display: grid; align-content: start; gap: .4rem; min-width: 0; color: var(--gh-forest); font-size: .8rem; font-weight: 600; }
.gh-wa-agenda__fields small { display: contents; font-size: inherit; font-weight: 400; }
.gh-wa-agenda__full { grid-column: 1 / -1; }
.gh-wa-agenda__fields :is(input,select,textarea) { box-sizing: border-box; display: block; width: 100%; min-width: 0; min-height: 52px; padding: .85rem 1rem; -webkit-appearance: none; appearance: none; border: 1px solid rgba(16,49,43,.25); border-radius: 14px; color: var(--gh-forest); background: var(--gh-white); font: 400 16px/1.4 var(--gh-sans); transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease; }
/* Keep native selection/keyboard behavior, not the compact macOS menulist skin. */
.gh-wa-agenda__fields select.gh-select__control { height: 52px; padding-right: 3.25rem; cursor: pointer; }
.gh-wa-agenda__fields .gh-select__shell::after { right: 1.2rem; width: .5rem; height: .5rem; }
.gh-wa-agenda__fields :is(input,select,textarea):hover:not(:disabled) { border-color: var(--gh-grove); }
.gh-wa-agenda__fields :is(input,select,textarea):focus { border-color: var(--gh-grove); box-shadow: 0 0 0 4px rgba(161,209,132,.25); }
.gh-wa-agenda__fields :is(input,select,textarea):disabled { opacity: 1; color: #52665e; -webkit-text-fill-color: #52665e; background: #eceee7; border-color: rgba(16,49,43,.14); box-shadow: none; cursor: not-allowed; }
.gh-wa-agenda__fields .gh-select__shell:has(select:disabled)::after { color: #52665e; }
.gh-wa-agenda__fields textarea { resize: vertical; }
.gh-wa-agenda :is(input,select,textarea,button,a):focus-visible { outline: 3px solid var(--gh-water); outline-offset: 3px; }
.gh-wa-agenda [data-vc-view-title]:focus { outline: none; }
.gh-wa-agenda__status { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 10px; color: var(--gh-forest); background: rgba(161,209,132,.22); font-size: .8rem; }
.gh-wa-agenda__status:empty { display: none; }
.gh-wa-agenda__status.is-error { background: var(--gh-sand); }
.gh-wa-agenda__submit { width: 100%; min-height: 48px; margin-top: 1.25rem; padding: .75rem 1.1rem; border: 0; border-radius: 999px; color: white; background: var(--gh-forest); font: 600 .8rem/1.4 var(--gh-sans); cursor: pointer; }
.gh-wa-agenda :disabled { opacity: .55; cursor: not-allowed; }
.gh-wa-agenda__privacy { margin: .75rem 0 1.25rem; color: #52665e; font-size: .75rem; }
.gh-wa-agenda .gh-vc-view__footer { padding-top: 1rem; border-top: 1px solid var(--gh-line); }
.gh-wa-agenda__fallback { color: var(--gh-forest); font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.gh-wa-agenda form[hidden] { display: none !important; }
@media (max-width: 575.98px) {
  .gh-wa-agenda { --gh-vc-view-pad: 12px; }
  .gh-wa-agenda .gh-vc-view__panel { padding: 20px; border-radius: 22px; }
  .gh-wa-agenda__fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .gh-wa-agenda__fields :is(input,select,textarea), .gh-wa-agenda__fields .gh-select__shell::after { transition: none; }
  .gh-wa .gh-wa__button, .gh-wa .gh-wa__message, .gh-wa .gh-wa__cta, .gh-wa .gh-wa__close { animation: none !important; transition: none !important; }
  .gh-wa .gh-wa__button:hover, .gh-wa .gh-wa__button:active { transform: none; }
}
@media (forced-colors: active) {
  .gh-wa-agenda__fields :is(input,select,textarea) { -webkit-appearance: auto; appearance: auto; color: CanvasText; background: Canvas; border-color: ButtonText; box-shadow: none; }
  .gh-wa-agenda__fields :is(input,select,textarea):disabled { color: GrayText; -webkit-text-fill-color: GrayText; border-color: GrayText; }
  .gh-wa-agenda__fields .gh-select__shell::after { display: none; }
}
