/* --- DESIGN SYSTEM & VARIABLES --- */
:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Color Palette */
  --primary-gradient: linear-gradient(135deg, #094db2 0%, #1e6bf2 100%);
  --secondary-gradient: linear-gradient(to bottom, #10b981 0%, #059669 100%);
  --blue-primary: #094db2;
  --blue-light: #eff6ff;
  --blue-hover: #1d4ed8;
  --cyan-accent: #22d3ee;
  
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --text-white: #ffffff;
  
  --bg-page: #f3f4f6;
  --bg-card: #ffffff;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --border-focus: #3b82f6;
  
  /* Layout */
  --max-width: 480px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-drawer: 0 -10px 25px -5px rgba(0, 0, 0, 0.15);
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* --- RESET & BASIC STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Full Screen Viewport */
.app-container {
  width: 100%;
  max-width: none;
  margin: 0;
  background-color: var(--bg-card);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Centralized content container to keep readability on wide screens */
.content-container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
  position: relative;
}

/* Wide layout container for forms */
.form-container-wide {
  max-width: 480px;
  margin: 0 auto;
}

/* --- HEADER / HERO SECTION --- */
.hero-card {
  background: var(--primary-gradient);
  color: var(--text-white);
  padding: 20px 0; /* Vertical padding only, horizontal padding handled by content-container */
  position: relative;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Dynamic abstract shapes in background */
.hero-card::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.logo-badge {
  background-color: var(--text-white);
  border-radius: 12px;
  padding: 10px 16px;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.logo-badge:hover {
  transform: scale(1.02);
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.hero-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 10px;
}

.hero-title {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 4px;
}

.hero-amount {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.hero-amount span {
  font-weight: 600;
}

.hero-illustration-container {
  width: 100px;
  flex-shrink: 0;
}

.hero-illustration {
  width: 100%;
  height: auto;
  display: block;
}

.hero-highlight {
  font-size: 13px;
  margin-top: 15px;
  opacity: 0.9;
}

.hero-highlight span {
  color: var(--cyan-accent);
  font-weight: 600;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.feature-item {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.feature-icon {
  width: 22px;
  height: 22px;
  margin: 0 auto 6px auto;
  color: var(--cyan-accent);
  display: block;
}

.feature-text {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

/* --- LANGUAGE SWITCHER --- */
.lang-selector-container {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 100;
}

.lang-select {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-primary);
  background-color: var(--text-white);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.lang-select:focus {
  border-color: var(--border-focus);
}

/* --- MAIN FORM SECTION --- */
.form-section {
  padding: 24px 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: #302f32;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-gray);
  font-weight: 300;
  margin-bottom: 24px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-gray);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}

/* Mobile Input Field Group */
.input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--transition-fast);
  margin-bottom: 20px;
}

.input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.country-prefix {
  background-color: var(--bg-light);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 14px 18px;
  border-right: 1px solid var(--border-color);
  user-select: none;
}

.phone-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 18px;
  color: var(--text-dark);
}

.phone-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.error-message {
  color: #ef4444;
  font-size: 12px;
  font-weight: 500;
  margin-top: -15px;
  margin-bottom: 15px;
  padding-left: 4px;
  display: none;
}

/* Consents checkboxes */
.consents-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.consent-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  outline: none;
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.consent-checkbox:checked {
  background-color: var(--blue-primary);
  border-color: var(--blue-primary);
}

.consent-checkbox::before {
  content: '✓';
  color: var(--text-white);
  font-size: 11px;
  font-weight: bold;
  display: none;
}

.consent-checkbox:checked::before {
  display: block;
}

.consent-text {
  font-size: 12px;
  color: var(--text-gray);
  line-height: 1.4;
  user-select: none;
}

.consent-text a {
  color: var(--blue-primary);
  text-decoration: none;
  font-weight: 500;
}

.consent-text a:hover {
  text-decoration: underline;
}

/* Action Buttons */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--blue-primary);
  color: var(--text-white);
  border: none;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--blue-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  transform: none;
}

/* --- BOTTOM DRAWER (OTP VERIFICATION) --- */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-content {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: var(--max-width);
  background-color: var(--bg-card);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-drawer);
  z-index: 1001;
  transition: transform var(--transition-normal);
}

.drawer-backdrop.active .drawer-content {
  transform: translate(-50%, 0);
}

.drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--bg-light);
  cursor: pointer;
  color: var(--text-gray);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.drawer-close:hover {
  background-color: #e5e7eb;
}

.drawer-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  margin-top: 8px;
}

.drawer-subtitle {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 24px;
}

/* OTP Digits Input Group */
.otp-container {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 24px;
}

.otp-input {
  width: 15%;
  height: 52px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-light);
  text-align: center;
  font-family: var(--font-family);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  outline: none;
  transition: all var(--transition-fast);
}

.otp-input:focus {
  background-color: var(--bg-card);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.otp-timer-container {
  text-align: center;
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 24px;
}

.otp-timer-countdown {
  color: #10b981;
  font-weight: 600;
  margin-top: 4px;
}

.btn-resend-otp {
  background: none;
  border: none;
  color: var(--blue-primary);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 4px;
}

.btn-resend-otp:disabled {
  color: var(--text-light);
  cursor: not-allowed;
  text-decoration: none;
}

/* --- DETAILED DISCLOSURES SECTION (FOOTER) --- */
.disclosures-section {
  padding: 24px 20px 40px 20px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: #666666;
  line-height: 1.7;
}

.disclosures-section p {
  margin-bottom: 12px;
}

.disclosures-section strong {
  color: #374151;
  font-weight: 600;
}

.disclosures-section ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.disclosures-section li {
  margin-bottom: 6px;
}

.disclosures-heading {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-top: 24px;
  margin-bottom: 10px;
}

/* --- FAQ WIDGET --- */
.faq-section {
  padding: 24px 20px;
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

.faq-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-gray);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.faq-subtitle {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.faq-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-question {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  padding-right: 15px;
}

.faq-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-gray);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
  background-color: var(--bg-light);
}

.faq-answer {
  padding: 16px;
  font-size: 12.5px;
  color: var(--text-gray);
  border-top: 1px solid var(--border-color);
  line-height: 1.5;
}

.faq-answer p {
  margin-bottom: 6px;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}

/* FAQ Support Card */
.faq-support-card {
  background-color: var(--bg-card);
  border: 1px dashed var(--blue-primary);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.faq-support-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.faq-support-text {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 16px;
  line-height: 1.4;
}

.btn-phone-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--blue-light);
  color: var(--blue-primary);
  border: none;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-phone-support:hover {
  background-color: var(--blue-primary);
  color: var(--text-white);
}

.support-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* --- LOADER / SPINNER SCREEN --- */
.spinner-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.spinner-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spinner-outer {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  width: 100%;
  height: 100%;
  border: 4px border-transparent;
  border-top-color: var(--blue-primary);
  border-right-color: var(--blue-primary);
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-ping {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  opacity: 0.3;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

.spinner-inner-rupee {
  position: absolute;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-white);
  font-size: 26px;
  font-weight: bold;
  background: linear-gradient(135deg, var(--blue-primary) 0%, #4f46e5 100%);
  box-shadow: var(--shadow-md);
  animation: pulse-opacity 1.5s ease-in-out infinite alternate;
}

.spinner-inner-rupee svg {
  width: 24px;
  height: 24px;
  color: var(--text-white);
}

.spinner-text {
  margin-top: 24px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 500;
  color: #1f2937;
  text-align: center;
  max-width: 300px;
}

.spinner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  background-color: var(--blue-primary);
  border-radius: 50%;
  animation: bounce 1s infinite;
}

.spinner-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.spinner-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  width: calc(100% - 40px);
  max-width: 400px;
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.toast-container.active {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-message {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dark);
}

.toast-success {
  border-left: 5px solid #10b981;
}
.toast-success .toast-icon {
  color: #10b981;
}

.toast-warning {
  border-left: 5px solid #f59e0b;
}
.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-error {
  border-left: 5px solid #ef4444;
}
.toast-error .toast-icon {
  color: #ef4444;
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ping {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  80%, 100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes pulse-opacity {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- SUCCESS ELIGIBILITY MODAL --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: 24px;
  padding: 32px 24px;
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-gray);
  cursor: pointer;
  text-decoration: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background-color: #e5e7eb;
  color: var(--text-dark);
}

.success-icon-bg {
  width: 72px;
  height: 72px;
  background-color: #d1fae5;
  color: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.success-check-icon {
  width: 36px;
  height: 36px;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #10b981;
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 13.5px;
  color: var(--text-gray);
  margin-bottom: 24px;
}

.eligible-amount-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1.5px dashed var(--blue-primary);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 24px;
  position: relative;
}

.eligible-amount-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue-primary);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.eligible-amount-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--blue-primary);
  line-height: 1;
}

.eligible-amount-value span {
  font-size: 24px;
  font-weight: 600;
  margin-right: 2px;
}

.eligible-badge {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--blue-primary);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

.modal-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  text-align: left;
  padding: 0 8px;
}

.modal-feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dark);
}

.m-feat-icon {
  width: 16px;
  height: 16px;
  color: #10b981;
  flex-shrink: 0;
}

.btn-modal-cta {
  display: block;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  padding: 15px;
  animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
  0% {
    box-shadow: 0 0 0 0 rgba(9, 77, 178, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(9, 77, 178, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(9, 77, 178, 0);
  }
}
