/* Contacto flotante compartido: la conversación continúa en WhatsApp. */
.wa-widget {
  --wa-green: #25d366;
  --wa-dark: #075e54;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  font-family: 'Source Sans 3', Arial, sans-serif;
  color: var(--navy);
}
.wa-widget [hidden] { display: none !important; }
.wa-launcher {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 60px;
  padding: 8px 20px 8px 8px;
  border: 1px solid #dce8e1;
  border-radius: 40px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 7px 26px #03113324;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.wa-launcher:hover { color: var(--navy); text-decoration: none; box-shadow: 0 10px 30px #03113330; }
.wa-launcher-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; background: var(--wa-green); color: #063b22; border-radius: 50%; }
.wa-icon { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wa-launcher-copy { display: flex; flex-direction: column; text-align: left; line-height: 1.3; }
.wa-launcher-copy strong { font-size: 16px; font-weight: 700; color: var(--navy); }
.wa-launcher-copy small { font-size: 13px; color: #426152; margin-top: 2px; }
.wa-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: 350px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce6e0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px #03113330;
  transform-origin: bottom right;
}
.wa-panel:not([hidden]) { animation: wa-panel-in 320ms cubic-bezier(.16, 1, .3, 1) both; }
.wa-panel-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 17px 48px 17px 18px; background: var(--wa-green); color: #063b22; }
.wa-avatar { display: block; width: 50px; height: 50px; flex-shrink: 0; object-fit: cover; object-position: center; border: 2px solid #fff; border-radius: 50%; background: #e7efe9; box-shadow: 0 2px 8px #063b2226; }
.wa-panel h2 { margin: 0 0 4px; color: #063b22; font-family: Montserrat, Arial, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.3; letter-spacing: -.02em; }
.wa-panel-header p { margin: 0; font-size: 13px; line-height: 1.35; color: #164d34; }
.wa-close { position: absolute; top: 12px; right: 6px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #063b22; font-size: 28px; line-height: 1; padding: 0; }
.wa-close:hover { background: #063b2214; }
.wa-greeting { padding: 22px 20px; background-color: #efeae2; background-image: radial-gradient(#075e5412 .8px, transparent .8px); background-size: 12px 12px; }
.wa-message { padding: 15px 17px; border: 1px solid #e0e9e3; border-radius: 0 12px 12px 12px; background: #fff; box-shadow: 0 2px 5px #163c2210; }
.wa-message strong { display: block; color: var(--wa-dark); font-size: 16px; font-weight: 700; }
.wa-message p { margin: 5px 0 0; color: #3b5045; font-size: 16px; line-height: 1.5; }
.wa-form { padding: 18px 20px 20px; }
.wa-form label { display: block; margin: 0 0 7px; color: #425b4e; font-size: 13px; font-weight: 600; }
.wa-form textarea { width: 100%; min-height: 78px; max-height: 140px; margin: 0; padding: 11px 12px; border: 1px solid #cbdad0; border-radius: 8px; color: var(--navy); background: #fafcfb; font-size: 16px; line-height: 1.45; }
.wa-form textarea::placeholder { color: #6b7c72; }
.wa-submit { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 48px; padding: 10px 12px; margin-top: 13px; border: 0; border-radius: 8px; color: #063b22; background: var(--wa-green); font-size: 17px; font-weight: 700; line-height: 1.3; }
.wa-submit:hover { background: #20c45e; }
.wa-form .wa-note { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: #607367; text-align: center; }
@keyframes wa-panel-in {
  from { opacity: 0; transform: translateY(15px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (hover: hover) { .wa-launcher:hover { transform: translateY(-2px); } }
@media (max-width: 600px) {
  .wa-widget { right: 16px; bottom: calc(68px + env(safe-area-inset-bottom)); }
  .wa-launcher { min-height: 54px; gap: 9px; padding: 6px 16px 6px 6px; }
  .wa-launcher-icon { width: 40px; height: 40px; }
  .wa-launcher-copy strong { font-size: 15px; }
  .wa-launcher-copy small { font-size: 12px; }
  .wa-panel { max-height: calc(100dvh - 160px - env(safe-area-inset-bottom)); bottom: calc(100% + 10px); }
  .wa-panel-header { padding-top: 16px; padding-bottom: 16px; }
  .wa-greeting { padding: 17px; }
  .wa-form { padding: 16px 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-panel:not([hidden]) { animation: none; }
  .wa-launcher { transition: none; }
  .wa-launcher:hover { transform: none; }
}
