.whatsapp-widget {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 1035;
  font-family: inherit;
}

.whatsapp-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 12px 17px;
  border: 0;
  border-radius: 999px;
  background: #0b6f3a;
  color: #fff;
  box-shadow: 0 8px 24px rgba(7, 53, 32, 0.3);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.whatsapp-trigger:hover { background: #07572d; }
.whatsapp-trigger:focus-visible,
.whatsapp-close:focus-visible,
.whatsapp-contact-link:focus-visible {
  outline: 3px solid #f08a3c;
  outline-offset: 3px;
}

.whatsapp-icon { width: 21px; height: 21px; flex: 0 0 21px; fill: currentColor; }

.whatsapp-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(340px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid #d7e2e8;
  border-radius: 16px;
  background: #fff;
  color: #173247;
  box-shadow: 0 14px 42px rgba(11, 39, 56, 0.24);
}

.whatsapp-panel[hidden] { display: none !important; }

.whatsapp-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.whatsapp-panel-heading h2 {
  margin: 0 0 4px;
  color: #07354d;
  font-size: 1.05rem;
  line-height: 1.25;
}

.whatsapp-panel-heading p {
  margin: 0;
  color: #526777;
  font-size: 0.86rem;
  line-height: 1.45;
}

.whatsapp-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #d7e2e8;
  border-radius: 50%;
  background: #f5f8fa;
  color: #173247;
  cursor: pointer;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
}

.whatsapp-contact-list { display: grid; gap: 8px; }

.whatsapp-contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #d7e2e8;
  border-radius: 10px;
  background: #f7fafb;
  color: #07354d;
  text-decoration: none;
}

.whatsapp-contact-link:hover { border-color: #0b6f3a; background: #eef8f1; color: #07354d; }
.whatsapp-contact-copy { display: grid; gap: 3px; }
.whatsapp-contact-copy strong { font-size: 0.93rem; }
.whatsapp-contact-copy small { color: #526777; font-size: 0.76rem; }
.whatsapp-contact-arrow { color: #0b6f3a; font-size: 1.15rem; font-weight: 800; }

.whatsapp-note {
  margin: 12px 0 0;
  color: #526777;
  font-size: 0.74rem;
  line-height: 1.45;
}

@media (max-width: 480px) {
  .whatsapp-widget {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .whatsapp-trigger {
    width: 56px;
    min-width: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 50%;
  }
  .whatsapp-trigger > span { display: none; }
  .whatsapp-icon { width: 24px; height: 24px; flex-basis: 24px; }
  .whatsapp-panel { width: min(340px, calc(100vw - 28px)); padding: 16px; }
}
