﻿/* Siversa WhatsApp gate modal — shared by /, /pos/, /pos/download/ */
.sv-wa-modal__product,
.sv-wa-modal__title {
  font-family: var(--font-display, Inter, system-ui, -apple-system, "Segoe UI", sans-serif);
}
.sv-wa-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sv-wa-modal.is-open { display: flex; }

body.sv-wa-lock { overflow: hidden; }

.sv-wa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 27, 73, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: svWaFade 0.2s var(--ease);
}

.sv-wa-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border: 1px solid rgba(228, 234, 245, 0.95);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(6, 27, 73, 0.28);
  padding: 0 26px 22px;
  text-align: left;
  overflow-x: hidden;
  animation: svWaPop 0.24s var(--ease);
}

.sv-wa-modal__dialog::before {
  content: "";
  display: block;
  height: 5px;
  margin: 0 -26px;
  background: linear-gradient(90deg, var(--blue-deep) 0%, var(--blue) 55%, var(--orange) 100%);
}

.sv-wa-modal__dialog::-webkit-scrollbar { width: 6px; }

.sv-wa-modal__dialog::-webkit-scrollbar-thumb {
  background: rgba(11, 76, 194, 0.18);
  border-radius: var(--radius-btn);
}

.sv-wa-modal__close {
  position: absolute;
  top: 18px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(11, 76, 194, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sv-wa-modal__close svg { width: 15px; height: 15px; }

.sv-wa-modal__close:hover {
  background: #fff;
  color: var(--blue-deep);
  border-color: #c9daf8;
}

.sv-wa-modal__head {
  /* Isolar do `header {}` global da homepage (pill / sombra / altura fixa). */
  display: block;
  position: relative;
  width: auto;
  max-width: none;
  height: auto;
  min-height: 0;
  margin: 0 -26px 4px;
  padding: 16px 56px 16px 26px;
  pointer-events: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 122, 0, 0.1) 0%, transparent 42%),
    linear-gradient(180deg, #eef4ff 0%, #f7faff 68%, #ffffff 100%);
  border-bottom: 1px solid rgba(11, 76, 194, 0.1);
  transition: none;
}

.sv-wa-modal__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sv-wa-modal__logo-wrap {
  position: relative;
  flex-shrink: 0;
}

.sv-wa-modal__logo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(11, 76, 194, 0.16);
}

.sv-wa-modal__avatar-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  border: 2px solid var(--white);
  display: grid;
  place-items: center;
}

.sv-wa-modal__avatar-badge svg { width: 9px; height: 9px; }

.sv-wa-modal__brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sv-wa-modal__product {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--blue);
}

.sv-wa-modal__product-pos {
  color: var(--orange);
}

.sv-wa-modal__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5f6f88;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sv-wa-modal__tag i {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  animation: svWaDot 2.4s ease-out infinite;
}

.sv-wa-modal__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 14px 0 6px;
  color: var(--blue-deep);
}

.sv-wa-modal__sub {
  margin: 0 0 2px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-body);
}

.sv-wa-modal__form { margin-top: 6px; }

.sv-wa-field { margin-top: 14px; }

.sv-wa-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-deep);
}

.sv-wa-field input,
.sv-wa-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--blue-deep);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.sv-wa-field textarea {
  min-height: 78px;
  resize: vertical;
  line-height: 1.5;
}

.sv-wa-field input::placeholder,
.sv-wa-field textarea::placeholder { color: #9AA6B8; }

.sv-wa-field input:focus,
.sv-wa-field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 76, 194, 0.12);
}

.sv-wa-field.has-error input,
.sv-wa-field.has-error textarea {
  border-color: #E53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.sv-wa-field__error {
  display: none;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: #C62828;
}

.sv-wa-field.has-error .sv-wa-field__error { display: block; }

.sv-wa-modal__submit {
  margin-top: 18px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  border: 0;
  border-radius: var(--radius-btn);
  padding: 12px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.sv-wa-modal__submit svg {
  width: 17px;
  height: 17px;
  color: #fff;
  fill: currentColor;
}

.sv-wa-modal__submit:hover {
  background: #1EBE5A;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.3);
}

.sv-wa-modal__hint {
  margin-top: 10px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-tagline);
}

.sv-wa-modal__contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(11, 76, 194, 0.1);
}

.sv-wa-modal__contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.15s ease;
}

.sv-wa-modal__contact svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  color: var(--orange);
}

.sv-wa-modal__contact--wa svg {
  color: #25D366;
  width: 13px;
  height: 13px;
}

.sv-wa-modal__contact:hover {
  color: var(--blue-deep);
  text-decoration: underline;
}

@keyframes svWaFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes svWaPop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes svWaDot {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Mobile/tablet: ecrÃ£ inteiro, como o modal de vÃ­deo/download */
@media (max-width: 768px) {
  .sv-wa-modal {
    padding: 0;
    align-items: stretch;
  }

  .sv-wa-modal__dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    padding: 0 20px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: none;
    animation: svWaSheet 0.28s var(--ease);
    scrollbar-width: none;
  }

  .sv-wa-modal__dialog::before {
    margin: 0 -20px;
    height: calc(5px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    box-sizing: content-box;
  }

  .sv-wa-modal__dialog::-webkit-scrollbar { width: 0; }

  .sv-wa-modal__close {
    top: calc(18px + env(safe-area-inset-top, 0px));
    right: 14px;
    width: 34px;
    height: 34px;
  }

  .sv-wa-modal__head {
    margin: 0 -20px 4px;
    padding: 16px 56px 16px 20px;
  }

  .sv-wa-modal__title { font-size: 20px; }

  .sv-wa-field { margin-top: 14px; }

  .sv-wa-field textarea { min-height: 76px; }

  .sv-wa-field input,
  .sv-wa-field textarea {
    font-size: 16px;
    padding: 13px 14px;
  }

  .sv-wa-modal__submit {
    margin-top: 20px;
    padding: 15px 18px;
    font-size: 15px;
  }

  .sv-wa-modal__hint { margin-top: 10px; }

  .sv-wa-modal__contacts {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

@media (min-width: 561px) and (max-width: 768px) {
  .sv-wa-modal__dialog {
    padding-left: max(20px, calc((100% - 480px) / 2));
    padding-right: max(20px, calc((100% - 480px) / 2));
  }

  .sv-wa-modal__close { right: max(20px, calc((100% - 480px) / 2)); }
}

@keyframes svWaSheet {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-wa-modal__backdrop,
  .sv-wa-modal__dialog,
  .sv-wa-modal__tag i { animation: none; }
  .sv-wa-modal__submit:hover { transform: none; }
}
