/**
 * ============================================================================
 * ENTERPRISE REUSABLE LOAN ELIGIBILITY CALCULATOR STYLES
 * Theme: Luxury Navy (#0a2540) & Gold (#d4af37) | Glassmorphism | Responsive
 * ============================================================================
 */

:root {
  --el-primary: #0a2540;
  --el-primary-dark: #06182a;
  --el-gold: #d4af37;
  --el-gold-light: #fef08a;
  --el-gold-bg: rgba(212, 175, 55, 0.12);
  --el-emerald: #10b981;
  --el-emerald-light: #d1fae5;
  --el-amber: #f59e0b;
  --el-amber-light: #fef3c7;
  --el-rose: #f43f5e;
  --el-rose-light: #ffe4e6;
  --el-border: #e2e8f0;
  --el-card-bg: #ffffff;
  --el-radius: 1.25rem;
  --el-radius-sm: 0.75rem;
  --el-shadow: 0 20px 45px -15px rgba(10, 37, 64, 0.12), 0 0 1px 1px rgba(10, 37, 64, 0.05);
}

/* Base Eligibility Calculator Container */
.eligibility-calculator-card {
  background: var(--el-card-bg);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--el-radius);
  box-shadow: var(--el-shadow);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
}

.eligibility-calculator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981 0%, var(--el-gold) 50%, var(--el-primary) 100%);
}

/* Header & Tabs */
.el-calc-header {
  margin-bottom: 2rem;
}

/* Employment Type Pills */
.el-employment-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.el-emp-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 9999px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.el-emp-btn:hover {
  background: #f1f5f9;
  color: var(--el-primary);
  border-color: #cbd5e1;
}

.el-emp-btn.active {
  background: var(--el-primary);
  color: #ffffff;
  border-color: var(--el-primary);
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.2);
}

.el-emp-btn.active i {
  color: var(--el-gold);
}

/* Control Group / Input Row */
.el-control-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--el-radius-sm);
  padding: 1.15rem;
  margin-bottom: 1.15rem;
  transition: all 0.2s ease;
}

.el-control-group:hover,
.el-control-group:focus-within {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.05);
}

.el-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.el-control-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--el-primary);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.el-input-badge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.el-input-symbol {
  position: absolute;
  left: 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  pointer-events: none;
}

.el-numeric-input {
  width: 135px;
  height: 34px;
  padding: 0.25rem 0.5rem 0.25rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--el-primary);
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.45rem;
  text-align: right;
  transition: all 0.2s ease;
}

.el-numeric-input:focus {
  outline: none;
  border-color: var(--el-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

/* Custom Range Sliders */
.el-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #e2e8f0;
  outline: none;
  margin: 0.5rem 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.el-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--el-gold);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.el-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.2);
}

.el-range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--el-gold);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.el-range-limits {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 0.15rem;
}

/* Score Pill Badges */
.el-score-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
}

.score-excellent {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.score-good {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.score-average {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.score-poor {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

/* Right Column: Output Result Panel */
.el-result-panel {
  background: linear-gradient(135deg, #06182a 0%, #0a2540 60%, #1e3a8a 100%);
  border-radius: var(--el-radius);
  padding: 1.85rem;
  color: #ffffff;
  box-shadow: 0 20px 40px -10px rgba(10, 37, 64, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.el-result-panel::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Status Approval Banner */
.el-status-banner {
  border-radius: 0.85rem;
  padding: 0.9rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.status-banner-high {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.status-banner-moderate {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

.status-banner-low {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
}

.el-status-text {
  font-size: 0.88rem;
  font-weight: 700;
}

.el-prob-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: #ffffff;
  color: var(--el-primary);
}

/* Primary Eligible Amount Display */
.el-primary-stat {
  margin-bottom: 1.25rem;
}

.el-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #93c5fd;
  margin-bottom: 0.25rem;
}

.el-stat-huge {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 2.35rem;
  line-height: 1.1;
  color: var(--el-gold-light);
  letter-spacing: -0.5px;
}

/* Metrics Grid */
.el-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.el-metric-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
}

.el-metric-box-title {
  font-size: 0.7rem;
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.el-metric-box-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff;
}

/* Recommended Loan Card */
.el-rec-card {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 0.85rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
}

.el-rec-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--el-gold-light);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}

.el-rec-desc {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0;
  line-height: 1.35;
}

/* FOIR Utilization Gauge */
.el-foir-wrap {
  margin-bottom: 1.25rem;
}

.el-foir-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #cbd5e1;
  margin-bottom: 0.35rem;
}

.el-foir-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  overflow: hidden;
}

.el-foir-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
  transition: width 0.4s ease;
  width: 45%;
}

/* Bank Match List */
.el-bank-matches {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
  margin-bottom: 1.25rem;
}

.el-bank-matches-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.el-bank-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.el-bank-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.el-bank-chip strong {
  color: #a7f3d0;
}

/* Action CTA Button */
.el-apply-btn {
  background: linear-gradient(135deg, #d4af37 0%, #f59e0b 100%);
  color: #06182a !important;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.4);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.el-apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%);
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  .eligibility-calculator-card,
  .eligibility-calculator-card * {
    visibility: visible;
  }
  .eligibility-calculator-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none;
    border: none;
  }
  .el-apply-btn,
  .el-range-slider {
    display: none !important;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .eligibility-calculator-card {
    padding: 1.5rem 1.25rem;
  }
  .el-result-panel {
    padding: 1.5rem 1.25rem;
    margin-top: 1rem;
  }
  .el-stat-huge {
    font-size: 1.85rem;
  }
  .el-metrics-grid {
    grid-template-columns: 1fr;
  }
}
