.lead365-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(11, 45, 77, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lead365-popup-overlay.lead365-open {
  display: flex;
}

.lead365-popup-modal {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 36px);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #d6e2ec;
  box-shadow: 0 28px 90px rgba(11, 45, 77, 0.28);
  color: #142536;
  font-family: "Lato", Arial, sans-serif;
}

.lead365-popup-modal::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, #1269d3 0 70%, #f4b860 70% 92%, #b42333 92%);
}

.lead365-popup-content {
  padding: 30px 26px 26px;
}

.lead365-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #d6e2ec;
  background: #f7fafc;
  color: #0b2d4d;
  font-size: 24px;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.lead365-popup-close:hover {
  transform: scale(1.06);
  background: #eaf3fa;
}

.lead365-popup-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #e9fbf0;
  color: #12683a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lead365-popup-title {
  margin: 0 42px 10px 0;
  font-family: "Lato", Arial, sans-serif;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #0b2d4d;
}

.lead365-popup-subtitle {
  margin: 0 0 22px;
  color: #526579;
  font-size: 15.5px;
  line-height: 1.45;
}

.lead365-popup-form {
  display: grid;
  gap: 13px;
}

.lead365-field-label {
  display: block;
  margin-bottom: 7px;
  color: #142536;
  font-size: 13px;
  font-weight: 800;
}

.lead365-popup-input {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid #b9cbd9;
  outline: none;
  padding: 0 14px;
  background: #ffffff;
  color: #142536;
  font-size: 16px;
  font-weight: 700;
}

.lead365-popup-input:focus {
  border-color: #1269d3;
  box-shadow: 0 0 0 4px rgba(18, 105, 211, 0.18);
}

.lead365-popup-close:focus-visible,
.lead365-popup-submit:focus-visible,
.lead365-passport-option:has(input:focus-visible) {
  outline: 3px solid #1269d3;
  outline-offset: 3px;
}

.lead365-passport-group {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid #b9cbd9;
  border-radius: 14px;
  background: #f7fafc;
}

.lead365-passport-group legend {
  padding: 0 4px;
  color: #142536;
  font-size: 13px;
  font-weight: 800;
}

.lead365-passport-group > p {
  margin: -2px 0 2px;
  color: #526579;
  font-size: 12px;
}

.lead365-passport-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d6e2ec;
  border-radius: 12px;
  background: #ffffff;
  color: #142536;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.lead365-passport-option:has(input:checked) {
  border-color: #1269d3;
  background: #eaf3fa;
}

.lead365-passport-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #1269d3;
}

.lead365-popup-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #d6e2ec;
  background: #f7fafc;
  color: #526579;
  font-size: 12.5px;
  line-height: 1.35;
}

.lead365-popup-consent input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: #25d366;
}

.lead365-popup-submit {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  background: #25d366;
  color: #0b2e1a;
  font-size: 16px;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.lead365-popup-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(37, 211, 102, 0.32);
}

.lead365-popup-submit:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.lead365-popup-fallback {
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
  color: #526579;
}

.lead365-popup-fallback a {
  color: #0c55ae;
  font-weight: 900;
  text-decoration: none;
}

.lead365-popup-message {
  display: none;
  padding: 11px 12px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.35;
}

.lead365-popup-message.lead365-show {
  display: block;
}

.lead365-popup-message.lead365-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.lead365-popup-message.lead365-success {
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
  color: #166534;
}

.lead365-popup-message.lead365-info {
  background: #eef7ff;
  border: 1px solid #b7d7f7;
  color: #0b2d4d;
}

.lead365-popup-form[data-no-passport-complete="true"] .lead365-popup-consent {
  display: none;
}

@media (max-width: 520px) {
  .lead365-popup-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .lead365-popup-modal {
    border-radius: 22px 22px 18px 18px;
    max-height: calc(100vh - 24px);
  }

  .lead365-popup-content {
    padding: 28px 20px 22px;
  }

  .lead365-popup-title {
    font-size: 27px;
    margin-right: 44px;
  }

  .lead365-popup-subtitle {
    font-size: 14.5px;
  }

  .lead365-popup-submit {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead365-popup-close,
  .lead365-popup-submit {
    scroll-behavior: auto;
    transition: none;
  }
}
