/* ──────────────────────────────────────────────────────────────
   Vikki Sunny Beach — Universal popup form styles.
   Globally enqueued (works site-wide, not only on SB landing),
   so [data-vsb-popup-open] triggers from homepage-redesign,
   single-object, etc. render the popup with full styling.
   Selectors are NOT scoped under .vsb-page on purpose.
   ────────────────────────────────────────────────────────────── */

.vsb-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .2s ease;
}
.vsb-popup-overlay.is-open {
  display: flex;
  opacity: 1;
}
.vsb-popup-overlay.is-open .vsb-popup {
  transform: scale(1);
  opacity: 1;
}
.vsb-popup {
  position: relative;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.96);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
  font-family: 'Montserrat', system-ui, sans-serif;
}
.vsb-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background .15s;
}
.vsb-popup__close:hover { background: rgba(0,0,0,0.06); }
.vsb-popup__close::before,
.vsb-popup__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: #14345b;
  transform-origin: center;
}
.vsb-popup__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.vsb-popup__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.vsb-popup__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #14345b;
  margin: 0 0 0.5rem;
  padding-right: 2rem;
  line-height: 1.2;
}
.vsb-popup__subtitle {
  font-size: 0.9rem;
  color: #6B7480;
  margin: 0 0 1.5rem;
  line-height: 1.45;
}
.vsb-popup__form { margin: 0; }
.vsb-popup__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.vsb-popup__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #2B2B2B;
  letter-spacing: 0.02em;
}
.vsb-popup__input {
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #D6DEE5;
  border-radius: 4px;
  background: #fff;
  color: #2B2B2B;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.vsb-popup__input:focus {
  outline: none;
  border-color: #f4892d;
  box-shadow: 0 0 0 3px rgba(244, 137, 45, 0.15);
}
.vsb-popup__input.has-error {
  border-color: #B5533A;
}
.vsb-popup__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.vsb-popup__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem;
  background: #f4892d;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background .15s;
}
.vsb-popup__submit:hover:not(:disabled) { background: #e07818; }
.vsb-popup__submit:disabled {
  cursor: wait;
  opacity: 0.7;
}
.vsb-popup__submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 0.5rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vsb-spin 0.7s linear infinite;
}
.vsb-popup__submit.is-loading .vsb-popup__submit-spinner { display: inline-block; }
.vsb-popup__submit.is-loading .vsb-popup__submit-label { opacity: 0.6; }

@keyframes vsb-spin {
  to { transform: rotate(360deg); }
}

.vsb-popup__privacy {
  font-size: 0.75rem;
  color: #6B7480;
  margin: 1rem 0 0;
  line-height: 1.4;
  text-align: center;
}
.vsb-popup__success {
  text-align: center;
  padding: 2rem 0 0.5rem;
}
.vsb-popup__success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #2da66e;
  color: #fff;
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.vsb-popup__success-text {
  font-size: 1rem;
  color: #14345b;
  line-height: 1.5;
  margin: 0;
}
.vsb-popup__error {
  background: #fdecec;
  border: 1px solid #B5533A;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.vsb-popup__error-text {
  font-size: 0.85rem;
  color: #B5533A;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .vsb-popup { padding: 1.5rem 1.25rem; }
  .vsb-popup__title { font-size: 1.4rem; }
}

/* ──────────────────────────────────────────────────────────────
   intl-tel-input overrides (country flag + dial-code dropdown
   inside our popup phone input).
   ────────────────────────────────────────────────────────────── */
.vsb-popup .iti {
  width: 100%;
  display: block;
}
.vsb-popup .iti__flag-container {
  z-index: 5;
}
.vsb-popup .iti--allow-dropdown input[type="tel"].vsb-popup__input {
  padding-left: 52px;
  width: 100%;
}
.vsb-popup .iti__country-list {
  z-index: 10001;          /* above popup overlay (z:10000) */
  max-height: 220px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.9rem;
  border: 1px solid #D6DEE5;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
/* dropdownContainer:body виносить dropdown у <body> — селектор .vsb-popup
   більше не зачіпає, тому правила дублюємо для глобального .iti--container. */
.iti--container {
  z-index: 10001;          /* above popup overlay (z:10000) */
}
.iti--container .iti__country-list {
  max-height: 220px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.9rem;
  border: 1px solid #D6DEE5;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  background: #fff;
}
.iti--container .iti__country.iti__highlight {
  background: rgba(244, 137, 45, 0.08);
}
.vsb-popup .iti__country.iti__highlight {
  background: rgba(244, 137, 45, 0.08);
}
.vsb-popup .iti__selected-flag {
  background: transparent;
  outline: none;
}
.vsb-popup .iti__selected-flag:hover,
.vsb-popup .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
  background: rgba(20, 52, 91, 0.04);
}
.vsb-popup .iti__arrow {
  border-top-color: #14345b;
}