.aw-contact-launcher {
  position: fixed;
  inset-inline-end: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9990;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(234, 210, 154, 0.7);
  border-radius: 999px;
  background: #0a3e4f;
  color: #fff;
  box-shadow: 0 16px 38px -16px rgba(5, 40, 50, 0.85);
  font: 800 0.95rem/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, bottom .3s cubic-bezier(.2,.8,.25,1), opacity .2s ease;
}

/* Elevate contact launcher above sticky bottom bar when visible */
.sticky-bar.visible ~ .aw-contact-launcher,
body:has(.sticky-bar.visible) .aw-contact-launcher,
body.has-visible-sticky-bar .aw-contact-launcher {
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 64px);
}

@media (max-width: 640px) {
  .aw-contact-launcher {
    min-height: 40px;
    padding: 8px 15px;
    font-size: 0.86rem;
    inset-inline-end: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .sticky-bar.visible ~ .aw-contact-launcher,
  body:has(.sticky-bar.visible) .aw-contact-launcher,
  body.has-visible-sticky-bar .aw-contact-launcher {
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 60px);
  }
}

.aw-contact-launcher:hover,
.aw-contact-launcher:focus-visible {
  background: #14618a;
}

.aw-contact-layer[hidden] {
  display: none;
}

.aw-contact-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  align-items: end;
  direction: rtl;
  font-family: Arial, Helvetica, sans-serif;
}

.aw-contact-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 40, 50, 0.58);
  opacity: 0;
  cursor: pointer;
  transition: opacity 220ms ease;
}

.aw-contact-sheet {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(88vh, 820px);
  margin-inline: auto;
  padding: 22px clamp(18px, 4vw, 34px) max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid rgba(22, 49, 58, 0.13);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #fff;
  color: #16313a;
  box-shadow: 0 -28px 80px -32px rgba(5, 40, 50, 0.75);
  transform: translateY(105%);
  transition: transform 260ms ease;
}

.aw-contact-layer.is-open .aw-contact-overlay {
  opacity: 1;
}

.aw-contact-layer.is-open .aw-contact-sheet {
  transform: translateY(0);
}

.aw-contact-handle {
  width: 46px;
  height: 5px;
  margin: -7px auto 14px;
  border-radius: 999px;
  background: rgba(22, 49, 58, 0.2);
}

.aw-contact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.aw-contact-head h2 {
  margin: 0 0 5px;
  color: #16313a;
  font: 900 clamp(1.45rem, 4vw, 2rem)/1.2 Arial, Helvetica, sans-serif;
}

.aw-contact-head p {
  margin: 0;
  color: #60757d;
  line-height: 1.55;
}

.aw-contact-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(22, 49, 58, 0.14);
  border-radius: 50%;
  background: #f6f2e9;
  color: #16313a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.aw-contact-form {
  display: grid;
  gap: 13px;
}

.aw-contact-field {
  display: grid;
  gap: 6px;
}

.aw-contact-field label {
  color: #16313a;
  font-weight: 800;
}

.aw-contact-field input,
.aw-contact-field textarea {
  width: 100%;
  border: 1px solid rgba(22, 49, 58, 0.18);
  border-radius: 11px;
  padding: 11px 12px;
  background: #fbfaf6;
  color: #16313a;
  font: inherit;
}

.aw-contact-field input {
  min-height: 46px;
}

.aw-contact-field textarea {
  min-height: 112px;
  resize: vertical;
}

.aw-contact-field input:focus,
.aw-contact-field textarea:focus {
  outline: 3px solid rgba(20, 97, 138, 0.18);
  border-color: #14618a;
}

.aw-contact-fields-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.aw-contact-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.aw-contact-submit,
.aw-contact-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 11px;
  padding: 11px 18px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.aw-contact-submit {
  border: 0;
  background: linear-gradient(135deg, #f0e3bf, #cdb069);
  color: #2a2410;
  cursor: pointer;
}

.aw-contact-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.aw-contact-status {
  display: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  line-height: 1.5;
}

.aw-contact-status.show {
  display: block;
}

.aw-contact-status.success {
  background: #e9f7ee;
  color: #17633b;
}

.aw-contact-status.error {
  background: #fbefed;
  color: #942e25;
}

.aw-contact-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 19px 0 13px;
  color: #60757d;
  font-size: 0.9rem;
}

.aw-contact-divider::before,
.aw-contact-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(22, 49, 58, 0.13);
}

.aw-contact-whatsapp {
  width: 100%;
  background: #187a47;
  color: #fff;
}

.aw-contact-privacy {
  margin: 11px 0 0;
  color: #60757d;
  font-size: 0.83rem;
  line-height: 1.5;
  text-align: center;
}

.aw-contact-privacy a {
  color: #14618a;
  font-weight: 800;
}

body.aw-contact-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .aw-contact-launcher {
    inset-inline-end: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .aw-contact-fields-pair {
    grid-template-columns: 1fr;
  }

  .aw-contact-sheet {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aw-contact-overlay,
  .aw-contact-sheet {
    transition: none;
  }
}
