/* Demo lead-capture modal — Phase 1 mobile-friendly styles */

.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 16px;
  box-sizing: border-box;
}

.demo-modal__panel {
  background: #fff;
  border-radius: 14px;
  padding: 22px 24px 18px;
  width: 100%;
  max-width: 440px;
  margin: auto;
  position: relative;
  max-height: min(92vh, 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.demo-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-modal__title {
  font-family: "Figtree", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0d0e10;
  margin: 0 0 3px;
  padding-right: 36px;
}

.demo-modal__intro {
  font-size: 13px;
  color: #888;
  margin: 0 0 14px;
  line-height: 1.45;
}

.demo-modal__intro a {
  color: #4782a2;
  font-weight: 600;
}

.demo-modal__success {
  display: none;
  text-align: center;
  padding: 12px 0 6px;
}

.demo-modal__success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #eef6ff;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-modal__success h4 {
  font-family: "Figtree", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0d0e10;
  margin: 0 0 5px;
}

.demo-modal__success p {
  font-size: 12px;
  color: #676879;
  margin: 0 0 4px;
}

.demo-modal__success .demo-modal__thanks {
  font-size: 11px;
  color: #bbb;
  margin: 0;
}

.demo-modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.demo-modal__field {
  margin-bottom: 8px;
}

.demo-modal__field--last {
  margin-bottom: 10px;
}

.demo-modal__label {
  font-size: 12px;
  font-weight: 600;
  color: #0d0e10;
  display: block;
  margin-bottom: 4px;
}

.demo-modal__required {
  color: #e53935;
}

.demo-modal__input,
.demo-modal__phone-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
  font-family: "Figtree", sans-serif;
}

.demo-modal__input:focus,
.demo-modal__phone-input:focus {
  border-color: #4782a2;
}

.demo-modal__phone-wrap {
  display: flex;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.demo-modal__phone-wrap:focus-within {
  border-color: #4782a2;
}

.demo-modal__country-wrap {
  position: relative;
  border-right: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.demo-modal__country {
  appearance: none;
  -webkit-appearance: none;
  background: #f8f9fa;
  border: none;
  outline: none;
  padding: 10px 26px 10px 8px;
  font-size: 14px;
  font-weight: 600;
  color: #4782a2;
  cursor: pointer;
  font-family: "Figtree", sans-serif;
  height: 100%;
  min-width: 82px;
}

.demo-modal__country-arrow {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #4782a2;
  font-size: 9px;
}

.demo-modal__phone-input {
  flex: 1;
  border: none;
  border-radius: 0;
  min-width: 0;
}

.demo-modal__error {
  display: none;
  color: #e53935;
  font-size: 11px;
  margin: 4px 0 0;
}

.demo-modal__global-error {
  display: none;
  background: #fff0f0;
  border-left: 4px solid #e53935;
  color: #c62828;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 10px;
}

.demo-modal__submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #5a9bbf 0%, #4782a2 50%, #3a6f8a 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: "Figtree", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
}

.demo-modal__submit:hover {
  opacity: 0.92;
}

.demo-modal__privacy {
  text-align: center;
  font-size: 11px;
  color: #bbb;
  margin: 8px 0 0;
}

@media (max-width: 480px) {
  .demo-modal__panel {
    padding: 18px 16px 16px;
    border-radius: 12px;
  }

  .demo-modal__title {
    font-size: 18px;
  }

  .demo-modal__row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .demo-modal__row .demo-modal__field {
    margin-bottom: 8px;
  }
}
