/* =========================================================
   DTI Calculator - Unified Dynamic Color Theme
   ========================================================= */

/* Box Sizing & Clean Layout */
.fcu-tool-shell--dti-ratio-calc, 
.fcu-tool-shell--dti-ratio-calc *, 
.fcu-tool-shell--dti-ratio-calc *::before, 
.fcu-tool-shell--dti-ratio-calc *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.fc-tool-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 35px auto;
  padding: 0 0 25px 0;
  border: none;
  border-bottom: 1.5px solid #e2e8f0;
  box-sizing: border-box;
}

/* Header Section */
.fc-tool-header {
  text-align: center;
  padding: 20px 15px;
  background: #f0f7ff;
  border-radius: 12px;
  margin-bottom: 0;
}

.fc-tool-title {
  color: #0a3d62;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.3;
}

.fc-tool-subtitle {
  color: #64748b;
  font-size: 15px;
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

/* Input Grid Container */
.fc-tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.fc-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f9fafb;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}

.fc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fc-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.fc-required {
  color: #ef4444;
}

.fc-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease-in-out;
}

.fc-input:focus {
  border-color: #0a3d62;
  box-shadow: 0 0 0 3px rgba(10, 61, 98, 0.15);
}

/* Custom Styled Range Slider */
.fc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  margin-top: 10px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: background 0.15s ease-in-out;
}

.fc-slider:hover {
  background: #cbd5e1;
}

.fc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0a3d62;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(10, 61, 98, 0.3);
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.fc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #072c47;
}

.fc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0a3d62;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(10, 61, 98, 0.3);
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.fc-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  background: #072c47;
}

/* Action Button */
.fc-btn-primary {
  width: 100%;
  margin-top: 28px;
  background: #0a3d62;
  color: #ffffff;
  border: none;
  padding: 16px;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease-in-out, transform 0.1s ease-in-out;
  box-shadow: 0 4px 12px rgba(10, 61, 98, 0.2);
}

.fc-btn-primary:hover {
  background: #072c47;
}

.fc-btn-primary:active {
  transform: scale(0.99);
}

/* Results Section Styling */
.fc-results-wrapper {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed #e2e8f0;
  animation: fcFadeIn 0.4s ease-in-out;
}

/* Dynamic Badge */
.fc-badge {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.fc-badge-good { background-color: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.fc-badge-warn { background-color: #fefce8; color: #a16207; border: 1px solid #fef08a; }
.fc-badge-bad  { background-color: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Results Grid */
.fc-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* =========================================================
   Result Cards & Dynamic Value Colors
   ========================================================= */

/* कार्ड का डिफ़ॉल्ट रूप */
.fc-res-card {
  background-color: #0a3d62;
  color: #ffffff;
  padding: 18px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: none;
  transition: background-color 0.3s ease;
}

.fc-card-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  margin-bottom: 10px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.fc-card-single {
  padding-top: 4px;
}

/* वैल्यू का बेस स्टाइल */
.fc-single-val {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  display: block;
  transition: color 0.3s ease;
}

/* 1. उत्कृष्ट / सुरक्षित स्थिति (DTI <= 35%) */
.fc-res-card.is-good {
  background-color: #064e3b; /* गहरा एमराल्ड हरा बैकग्राउंड */
}
.fc-res-card.is-good .fc-single-val {
  color: #34d399; /* साफ़ चमकता हुआ हल्का हरा */
}

/* 2. मध्यम जोखिम (DTI 36% - 50%) */
.fc-res-card.is-warn {
  background-color: #78350f; /* गहरा अम्बर बैकग्राउंड */
}
.fc-res-card.is-warn .fc-single-val {
  color: #fde047; /* साफ़ चमकता हुआ पीला/गोल्ड */
}

/* 3. उच्च जोखिम / रिजेक्शन (DTI > 50%) */
.fc-res-card.is-bad {
  background-color: #7f1d1d; /* गहरा लाल बैकग्राउंड */
}
.fc-res-card.is-bad .fc-single-val {
  color: #fca5a5; /* साफ़ चमकता हुआ हल्का लाल */
}

.fc-card-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  margin-bottom: 10px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.fc-card-single {
  padding-top: 4px;
}

.fc-single-val {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  display: block;
}

/* DTI Progress Bar */
.fc-progress-container {
  width: 100%;
  background: #e2e8f0;
  height: 18px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fc-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 20px;
  transition: width 0.6s ease-in-out, background-color 0.4s ease;
}

/* Advisory Box */
.fc-advisory-box {
  padding: 20px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.fc-lt-adv-good { background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 5px solid #16a34a; color: #0f172a; }
.fc-lt-adv-warn { background: #fefce8; border: 1px solid #fef08a; border-left: 5px solid #ca8a04; color: #0f172a; }
.fc-lt-adv-bad  { background: #fef2f2; border: 1px solid #fecaca; border-left: 5px solid #dc2626; color: #0f172a; }

.fc-lt-alert-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* अस्वीकरण Footer */
.fc-disclaimer {
  font-size: 12px;
  color: #64748b;
  text-align: justify;
  line-height: 1.6;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  margin-top: 20px;
  margin-bottom: 10px;
}

@keyframes fcFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Breakpoints */
@media (max-width: 850px) {
  .fc-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .fc-results-grid {
    grid-template-columns: 1fr;
  }
  
  .fc-tool-wrapper {
    padding: 10px;
  }
  
  .fc-tool-title {
    font-size: 22px;
  }
  
  .fc-badge {
    font-size: 16px;
    padding: 12px 14px;
  }
}