/* CSS Variables - Design System */
:root {
  /* Typography */
  --font-family: 'Heebo', sans-serif;
  --font-headings: 'Heebo', sans-serif;

  /* Colors - Background & Text */
  --color-text: #1a202c;
  --color-titles: #00137d;
  --color-muted: #718096;

  /* Colors - Surfaces */
  --color-surface: #ffffff;
  --color-surface-soft: #f7fafc;
  --color-surface-hero: #ebf8ff;

  /* Colors - Borders */
  --color-border-soft: #e5e7eb;
  --color-border-strong: #cbd5e0;

  /* Colors - Accent */
  --color-accent: #00137d;
  --color-accent-soft: #bce0f7;
  --color-accent-extra-soft: #eff6ff;
  --color-accent-strong: #2c5282;

  /* Colors - CTA */
  --color-cta-button: #0227ff;
  --color-cta-button-hover: #001ece;
  --text-color-cta-button: #ffffff;
  --color-icons: #2563eb;

  /* Colors - Status */
  --color-success: #38a169;
  --color-success-bg: #f0fdf4;
  --color-warning-bg: #fffaf0;
  --color-warning-border: #fbd38d;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;

  /* Border Radius */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 6px;

  /* Shadows */
  --shadow-soft: 0px 0px 19px 1px rgba(0, 0, 0, 0.09);
  --shadow-medium: 1px 2px 22px 1px rgba(0, 0, 0, 0.15);
  --shadow-faq: 0px 1px 3px 0px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Animations */
  --animation-duration-fast: 0.4s;
  --animation-duration-medium: 0.6s;
  --animation-duration-slow: 0.8s;
  --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Container */
.form-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp var(--animation-duration-medium) var(--animation-easing);
}

/* Progress Bar */
.progress-bar {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -10;
}
/*
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
  border-radius: 10px;
  transition: width var(--transition-medium);
  width: 5%;
} */

/* Form Wrapper */
.form-wrapper {
  background: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-accent-strong) 100%
  );
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  position: relative;
}

/* Form Header */
.form-header {
  background: transparent;
  padding-bottom: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 15px;
}

.form-title {
  font-family: var(--font-headings);
  font-size: 23px;
  font-weight: 400;
  color: var(--color-surface);
  line-height: 1.6;
  margin: 0;
}

.highlight-text {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-titles);
  padding: 4px 12px;
  margin: 0 3px;
  border-radius: 6px;
  font-weight: 700;
  animation: pulseForm 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

@keyframes pulseForm {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
  }
}

/* Form Steps */
.loan-form {
  padding: 30px;
  background: transparent;
  transition: height 0.4s ease-in-out;
}

.form-step {
  display: none;
  width: 100%;
}

/* Hide steps from the wrong loan type branch */
.form-step.hidden-branch {
  display: none !important;
}

.form-step.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: space-between;
  animation: fadeIn var(--animation-duration-slow) var(--animation-easing);
}

.step-content {
  margin-bottom: 32px;
  padding: 0 32px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.step-title {
  font-family: var(--font-headings);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-surface);
  margin-bottom: 32px;
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Groups */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    margin-bottom: 10px;
  }

  .form-row .form-group {
    margin-bottom: 0;
  }
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-surface);
  margin-bottom: 8px;
}

.form-group input[type='text'],
.form-group input[type='tel'],
.form-group input[type='number'] {
  text-align: center !important;
  width: 100%;
  padding: 14px 16px !important;
  font-size: 16px !important;
  font-family: var(--font-family) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: var(--radius-md) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--color-text) !important;
  transition: all var(--transition-fast) !important;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-surface);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.form-group input.error {
  border-color: var(--color-danger);
}

.field-error {
  display: block;
  color: var(--color-danger);
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}

/* Slider Styles */
.slider-container {
  text-align: center;
}

.slider-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-surface);
  margin-bottom: 22px;
  font-family: var(--font-headings);
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
/*  */

#loanAmountLabel {
  display: none !important;
}
#loanAmountValue {
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--color-accent-extra-soft) 0%,
    var(--color-accent-soft) 100%
  );
  border: 3px solid var(--color-accent-strong);
  max-width: 350px;
  margin-right: auto;
  margin-left: auto;
  color: var(--color-accent);
  padding: 3px;
  font-family: var(--font-headings) !important;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 24px rgba(2, 39, 255, 0.25), 0 0 60px rgba(2, 39, 255, 0.1);
  position: relative;
  overflow: hidden;
}
#loanAmountValue::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(2, 39, 255, 0.2) 52%,
    transparent 60%,
    transparent 100%
  );
  animation: shine 4s ease-in-out infinite;
}
@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(30deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(30deg);
  }
}

/*  */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  margin: 0 0 20px 0;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  direction: ltr;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.2);
  transition: all var(--transition-fast);
  border: 3px solid var(--color-cta-button);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 0 6px rgba(255, 255, 255, 0.3);
}

.slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  cursor: pointer;
  border: 3px solid var(--color-cta-button);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.2);
  transition: all var(--transition-fast);
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 0 6px rgba(255, 255, 255, 0.3);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  direction: ltr;
}

/* Radio Cards */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.radio-card {
  position: relative;
  cursor: pointer;
  flex: 0 0 calc(50% - 6px);
  max-width: calc(50% - 6px);
}

.radio-card input[type='radio'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card-content {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 20px 24px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all var(--transition-fast);
  font-size: 17px;
  font-weight: 500;
  color: var(--color-titles);
}

.radio-card:hover .radio-card-content {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.radio-card input[type='radio']:checked + .radio-card-content {
  border-color: var(--color-surface);
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-titles);
  border: 1px solid black;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.3);
}

input[name='loanType'] + .radio-card-content .radio-icon {
  filter: brightness(0) saturate(100%) invert(9%) sepia(82%) saturate(5041%)
    hue-rotate(226deg) brightness(92%) contrast(116%);
}

/* .radio-card input[type='radio']:checked + .radio-card-content .radio-icon {
  filter: brightness(0) saturate(100%) invert(9%) sepia(82%) saturate(5041%)
    hue-rotate(226deg) brightness(92%) contrast(116%);
} */

.radio-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: filter var(--transition-fast);
}

/* Bank icon specific styling */
.bank-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: filter var(--transition-fast);
}

/* 3-column grid layout for bank selection */
.radio-group-3col {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.radio-group-3col .radio-card {
  flex: 0 0 calc(33.333% - 8px);
  max-width: calc(33.333% - 8px);
}

/* .radio-label {
  flex: 1;
} */

/* Checkbox Styles */
.checkbox-group {
  margin-top: 8px;
  margin-bottom: 0 !important;
}

.checkbox-label {
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 300;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.checkbox-label input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

#phone {
  text-align: center !important;
}
.checkbox-text {
  font-weight: 300;
  flex: 1;
  text-align: right;
}

/* Custom circular checkbox */
.custom-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  position: relative;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-label:has(input[type='checkbox']:checked) .custom-checkbox {
  background: var(--color-surface);
  border-color: var(--color-surface);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Checkmark inside circle */
.checkbox-label:has(input[type='checkbox']:checked) .custom-checkbox::after {
  content: '✓';
  color: var(--color-accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* Disclaimer Card */
.disclaimer-card {
  margin-top: 32px;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.disclaimer-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-surface);
  margin-bottom: 20px;
  text-align: right;
  line-height: 1.4;
}

.disclaimer-text {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  text-align: right;
  direction: rtl;
}

.disclaimer-text p {
  margin-bottom: 16px;
}

.disclaimer-text p:last-child {
  margin-bottom: 0;
}

.disclaimer-text strong {
  color: var(--color-surface);
  font-weight: 600;
}

.disclaimer-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 16px;
}

/* Upsell Steps Styling */
.upsell-message {
  text-align: center;
  margin-bottom: 32px;
}

.upsell-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-surface);
  margin-bottom: 12px;
  line-height: 1.4;
}

.upsell-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 0;
}

.upsell-content {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin-top: 24px;
}

.upsell-question-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-surface);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.4;
}

.upsell-description {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  margin-bottom: 32px;
}

.user-name-display {
  color: var(--color-accent-extra-soft);
  font-weight: 700;
}

/* Conditional Fields */
.conditional-field {
  margin-top: 24px;
  animation: fadeInSlideUp 0.4s ease-out;
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input Labels */
.input-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-surface);
  margin-bottom: 10px;
  text-align: right;
  letter-spacing: 0.3px;
}

/* Form Inputs (for currency and text fields) */
.form-input,
.input-group input {
  width: 100%;
  padding: 16px 20px !important;
  font-size: 18px !important;
  font-family: var(--font-family) !important;
  font-weight: 500 !important;
  border: 2px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: var(--radius-md) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: var(--color-text) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-align: center !important;
  direction: rtl !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.form-input::placeholder,
.input-group input::placeholder {
  color: rgba(0, 19, 125, 0.35);
  font-weight: 400;
  font-size: 16px;
}

.form-input:focus,
.input-group input:focus {
  outline: none;
  border-color: var(--color-surface);
  background: var(--color-surface);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.form-input:hover:not(:focus),
.input-group input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Input Group Container */
.input-group {
  margin-bottom: 0;
}

/* Input Row - Side by Side Layout */
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .input-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Step Subtitle */
.step-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  margin-top: -16px;
  margin-bottom: 24px;
  font-weight: 300;
}

/* Disclaimer Box */
.disclaimer-box {
  margin-top: 32px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
}

.disclaimer-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-surface);
  margin-bottom: 16px;
  text-align: right;
}

.disclaimer-content {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
  margin-bottom: 20px;
}

.disclaimer-content p {
  margin-bottom: 12px;
}

.disclaimer-content strong {
  color: var(--color-surface);
  font-weight: 600;
}

/* Buttons */
.form-actions {
  display: flex;
  gap: 12px;
  padding: 0 32px;
  /* margin-top: 32px; */
}

.btn {
  flex: 1;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font-family);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width var(--transition-medium), height var(--transition-medium);
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  color: var(--color-titles);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  color: var(--color-titles) !important;
}

.btn-primary.btn-disabled {
  background: linear-gradient(135deg, #d0d0d0 0%, #a0a0a0 100%);
  color: #666;
  cursor: pointer;
  opacity: 0.6;
}

.btn-primary.btn-disabled:hover {
  background: linear-gradient(135deg, #d0d0d0 0%, #a0a0a0 100%);
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-surface);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Completion Step */
.completion-step .step-content {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.completion-message {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--color-success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--color-success);
  animation: scaleIn var(--animation-duration-medium) var(--animation-easing);
}

.completion-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-surface);
  margin-bottom: 16px;
  line-height: 1.3;
}

.completion-text {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

/* Loader */
.loader {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-surface);
  border-radius: 50%;
  margin: 32px auto 0;
  animation: spin 1s linear infinite;
}

/* Loading State */
.form-step.loading {
  pointer-events: none !important;
  /* opacity: 0.5;
  filter: blur(3px);
  transition: opacity 0.15s ease, filter 0.15s ease; */
}

.loading-spinner {
  position: relative;
  /* top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); */
  /* padding: 20px 40px; */
  /* background: rgba(255, 255, 255, 0.98); */
  /* border-radius: var(--radius-md); */
  /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color-cta-button);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100;
  white-space: nowrap;
  text-align: center;
  margin-top: 13px;
}

.loading-spinner.active {
  opacity: 1;
  visibility: visible;
}

.loading-spinner .checkmark {
  color: #22c55e;
  font-weight: 700;
}

/* Fade Out Animation for Steps */
.step.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* Error Alert */
.alert {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  display: none;
  z-index: 9999;
  max-width: 90%;
  width: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: slideDown var(--animation-duration-fast) var(--animation-easing)
    forwards;
}

.alert.show {
  display: block;
}

.alert-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.alert-warning {
  background: var(--color-warning-bg);
  color: #92400e;
  border: 1px solid var(--color-warning-border);
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  .form-header {
    padding: 0 20px;
    margin-bottom: 0;
  }

  .form-title {
    font-size: 20px;
  }

  .form-subtitle {
    font-size: 14px;
  }

  .loan-form {
    padding: 28px 0px;
    /* min-height: 550px; */
  }

  .step-content {
    padding: 0 20px;
    padding-top: 20px;
    margin-bottom: 16px;
  }

  .form-actions {
    padding: 0 20px;
  }

  .step-title {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .slider-value {
    font-size: 36px;
    margin-bottom: 24px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }

  .radio-group:not(.radio-group-3col) {
    grid-template-columns: 1fr;
  }

  /* 3-column grid becomes 2 column on mobile */
  .radio-group-3col .radio-card {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
  }

  .radio-card-content {
    padding: 16px 18px;
    font-size: 15px;
  }

  .radio-icon {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .form-title {
    font-size: 22px;
  }

  .form-subtitle {
    font-size: 13px;
  }

  .step-title {
    font-size: 18px;
  }

  .slider-value {
    font-size: 32px;
  }

  .completion-title {
    font-size: 22px;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mt-4 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.mb-4 {
  margin-bottom: 32px;
}