*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #2b71e7;
  color: #1a1a1a;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  overflow-x: hidden;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: #2b71e7;
  color: #fff;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}

.content {
  flex: 1;
  padding: 28px 22px 24px;
  background: #fff;
  overflow-x: hidden;
  width: 100%;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: #2f2f2f;
  margin-bottom: 10px;
  text-align: center;
}

.page-subtitle {
  font-size: 15px;
  color: #4a4a4a;
  margin-bottom: 28px;
  line-height: 1.4;
  text-align: center;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #b8c9dc;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 28px;
}

.input-icon {
  color: #2b71e7;
  display: inline-flex;
  flex-shrink: 0;
}

.tax-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #2b71e7;
  background: transparent;
  min-width: 0;
}

.tax-input::placeholder {
  color: #7aa3d8;
}

.clear-btn {
  border: none;
  background: transparent;
  color: #2b71e7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2px;
  -webkit-tap-highlight-color: transparent;
}

.consent-label {
  font-size: 15px;
  color: #333;
  margin-bottom: 16px;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 36px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #2b71e7;
  border-radius: 3px;
  margin-top: 2px;
  position: relative;
  background: #fff;
}

.checkbox-item input:checked + .checkbox-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #2b71e7;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-size: 14px;
  line-height: 1.45;
  color: #333;
}

.checkbox-text a {
  color: #333;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.submit-btn {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: #a3b5c9;
  cursor: not-allowed;
  transition: background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.submit-btn:not(:disabled) {
  background: #2b71e7;
  cursor: pointer;
}

.field-group {
  margin-bottom: 24px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.field-label {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.info-btn {
  border: none;
  background: transparent;
  color: #2b71e7;
  display: inline-flex;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card-form .input-wrap {
  margin-bottom: 0;
  min-width: 0;
}

.card-number-row {
  display: flex;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.card-part-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.card-part-small {
  flex: 0 0 96px;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.card-part-small .tax-input {
  text-align: center;
}

.expiry-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.expiry-wrap {
  width: 72px;
  flex-shrink: 0;
}

.expiry-input {
  text-align: center;
}

.expiry-sep {
  font-size: 20px;
  color: #7aa3d8;
  font-weight: 500;
}

.card-form .submit-btn {
  margin-top: 12px;
}

.resend-text {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #4a4a4a;
}

.resend-btn {
  border: none;
  background: none;
  color: #2b71e7;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.sms-code-input {
  letter-spacing: 0.08em;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.success-icon {
  margin-bottom: 24px;
}

.success-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  text-decoration: none;
  background: #2b71e7;
  cursor: pointer;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  border: 4px solid #e5e5e5;
  border-top-color: #2b71e7;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.cvv-wrap {
  max-width: 120px;
}

.footer {
  background: #2b71e7;
  padding: 18px 20px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-logo {
  height: 50px;
  width: auto;
  display: block;
}

@media (max-width: 380px) {
  .content {
    padding: 24px 16px 20px;
  }

  .page-title {
    font-size: 24px;
  }

  .checkbox-text {
    font-size: 13px;
  }

  .card-number-row {
    gap: 8px;
  }

  .card-part-small {
    flex: 0 0 84px;
    width: 84px;
    min-width: 84px;
    max-width: 84px;
  }

  .input-wrap {
    padding: 12px 10px;
  }
}
