/* VAT Signup — FDDC Branding */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-primary: #3550a0;
  --blue-accent:  #2ea3f2;
  --blue-cta:     #0C71C3;
  --blue-cta-hover: #0a5fa3;
  --text-dark:    #1a1f36;
  --text-mid:     #4a5568;
  --text-light:   #718096;
  --border:       #d1d9e6;
  --border-focus: #2ea3f2;
  --bg:           #f7f9fc;
  --card-bg:      #ffffff;
  --error-red:    #e53e3e;
  --success-green:#276749;
  --radius:       10px;
}

html, body {
  min-height: 100%;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  color: var(--text-dark);
  background: linear-gradient(160deg, #eef2fb 0%, #f7f9fc 50%, #eaf5ff 100%);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

.page-wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Header */
.site-header {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 24px 0 20px;
}

.logo {
  height: 72px;
  width: auto;
  object-fit: contain;
}

/* Card */
.card {
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(53, 80, 160, 0.10), 0 1px 3px rgba(0,0,0,0.06);
  padding: 32px 28px 36px;
}

/* Form header */
.title {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.subtitle {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Field groups */
.field-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.req {
  color: var(--error-red);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.18);
}

input.invalid,
select.invalid {
  border-color: var(--error-red);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

/* Select wrapper with custom arrow */
.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-mid);
  pointer-events: none;
}

.select-wrap select {
  padding-right: 40px;
  cursor: pointer;
}

/* Field-level errors */
.field-error {
  font-size: 13px;
  color: var(--error-red);
  min-height: 18px;
  line-height: 1.4;
}

/* Alert banners */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.alert-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: var(--error-red);
}

/* Submit button */
.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--blue-cta);
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, transform 0.1s;
  margin-top: 8px;
  letter-spacing: 0.01em;
  min-height: 54px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-cta-hover);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* Success state */
#success-section {
  text-align: center;
  padding: 16px 0 8px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #e6f4ea;
  color: var(--success-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-primary);
  margin-bottom: 12px;
}

.success-msg {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: 24px;
  padding-bottom: 8px;
  text-align: center;
}

.site-footer a {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: var(--blue-accent);
}

/* Mobile refinements */
@media (max-width: 480px) {
  body {
    padding: 16px 12px 40px;
    align-items: flex-start;
  }

  .card {
    padding: 24px 20px 28px;
  }

  .logo {
    height: 60px;
  }

  .title {
    font-size: 20px;
  }

  input[type="text"],
  input[type="email"],
  select {
    font-size: 16px; /* prevent iOS zoom */
    padding: 15px 14px;
  }

  .btn-primary {
    padding: 17px;
    font-size: 17px;
  }
}
