/* ============================================================
   RENT VS BUY CALCULATOR STYLES (Indian Context)
   Tradesala ToolSpot | Emerald & Amber Premium Valuation Theme
   ============================================================ */

.container {
  --tool-emerald: #10b981;
  --tool-emerald-soft: rgba(16, 185, 129, 0.12);
  --tool-amber: #f59e0b;
  --tool-amber-soft: rgba(245, 158, 11, 0.12);
  --tool-primary: #10b981;
  --tool-accent: #f59e0b;
}

body.light .container {
  --tool-emerald: #059669;
  --tool-emerald-soft: rgba(5, 150, 105, 0.08);
  --tool-amber: #d97706;
  --tool-amber-soft: rgba(217, 119, 6, 0.08);
}

/* ── Layout Overflows & Responsiveness ── */
.left-col,
.right-col,
.panel,
.table-wrap,
.chart-wrap {
  min-width: 0;
  max-width: 100%;
}

/* Custom indicator pill states */
.verdict-box {
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  transition: all 0.3s ease;
}

.verdict-box.rent-better {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}

.verdict-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--tool-emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.verdict-box.rent-better .verdict-icon {
  background: var(--tool-amber-soft);
  border-color: rgba(245, 158, 11, 0.3);
}

.verdict-content {
  flex: 1;
}

.verdict-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.verdict-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}

/* Range slider custom track colors */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 100px;
  background: linear-gradient(to right, var(--slider-color, var(--tool-emerald)) 0%, var(--slider-color, var(--tool-emerald)) var(--fill, 50%), rgba(255, 255, 255, 0.07) var(--fill, 50%), rgba(255, 255, 255, 0.07) 100%);
  outline: none;
  transition: all 0.15s ease;
  cursor: pointer;
  margin: 12px 0 6px;
}

body.light .range-slider {
  background: linear-gradient(to right, var(--slider-color, var(--tool-emerald)) 0%, var(--slider-color, var(--tool-emerald)) var(--fill, 50%), rgba(0, 0, 0, 0.06) var(--fill, 50%), rgba(0, 0, 0, 0.06) 100%);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--slider-color, var(--tool-emerald));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, background-color 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: #ffffff;
}

/* Value labels */
.value-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--tool-emerald);
  background: var(--tool-emerald-soft);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  transition: all 0.2s;
}

.value-badge.amber-badge {
  color: var(--tool-amber);
  background: var(--tool-amber-soft);
  border-color: rgba(245, 158, 11, 0.25);
}

.value-badge.indigo-badge {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}

body.light .value-badge.indigo-badge {
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.25);
}

.value-badge-input {
  width: 105px;
  text-align: center;
  outline: none;
  cursor: text;
  box-sizing: border-box;
}

.value-badge-input:focus {
  border-color: var(--text-2);
  background: var(--bg-3) !important;
  color: var(--text) !important;
}

/* Stacking context wrapper for charts with radial orb glows */
.chart-container-relative {
  position: relative;
  width: 100%;
  padding: 4px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.chart-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.chart-glow-cyan {
  width: 140px;
  height: 140px;
  top: 15%;
  left: 15%;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
}

.chart-glow-purple {
  width: 150px;
  height: 150px;
  bottom: 15%;
  right: 15%;
  background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
}

/* Trigger expand glows on hovering the chart card */
.chart-container-relative:hover .chart-glow-cyan {
  transform: translate(-15px, -10px) scale(1.22);
  opacity: 0.26;
}

.chart-container-relative:hover .chart-glow-purple {
  transform: translate(15px, 10px) scale(1.22);
  opacity: 0.26;
}

/* Frosted Chart Card Wrap */
.chart-wrap {
  position: relative;
  z-index: 2;
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.005) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 12px 40px -4px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light .chart-wrap {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1.5px 0 0 rgba(255, 255, 255, 0.8), 0 8px 24px -4px rgba(0, 0, 0, 0.04);
}

/* Result metrics grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  transition: all 0.25s ease;
}

.metric-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

body.light .metric-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

body.light .metric-card:hover {
  background: rgba(0, 0, 0, 0.03);
}

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

.metric-value {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

/* Projection Schedule Table styling */
.table-wrap {
  width: 100%;
  overflow-x: hidden;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.12);
  margin-top: 16px;
}

body.light .table-wrap {
  background: rgba(255, 255, 255, 0.5);
}

.projection-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: right;
}

.projection-table th,
.projection-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-2);
}

body.light .projection-table th,
body.light .projection-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: #334155;
}

.projection-table th {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-3);
}

body.light .projection-table th {
  background: rgba(0, 0, 0, 0.015);
  color: #64748b;
}

.projection-table tr:last-child td {
  border-bottom: none;
}

.projection-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
  color: var(--text);
}

body.light .projection-table tr:hover td {
  background: rgba(0, 0, 0, 0.01);
  color: #0f172a;
}

.year-col {
  font-weight: 600;
  color: var(--text) !important;
}

/* ── Scoped Glassmorphic Panel Overrides ── */
.panel {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
}

body.light .panel {
  background: rgba(255, 255, 255, 0.65) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.04) !important;
}

/* Layout modifications for mobile */
@media (max-width: 1024px) {
  .results-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .metric-card {
    padding: 14px;
  }

  .projection-table {
    font-size: 11.5px;
  }

  .projection-table th,
  .projection-table td {
    padding: 10px 8px;
  }
}

@media (max-width: 768px) {
  .projection-table {
    font-size: 10px;
  }

  .projection-table th,
  .projection-table td {
    padding: 8px 4px;
  }
}
