/* ===== SUMMARY STRIP ===== */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.summary-block {
  background: #f4f6f9;
  border-radius: 6px;
  padding: 10px;
  font-size: 0.8rem;
}

.summary-block span {
  display: block;
  color: #666;
}

.summary-block strong {
  font-size: 1.05rem;
}

.summary-block.highlight {
  background: #eef4ff;
  border: 1px solid #d5e3ff;
}

/* ===== STATUS-BASED COLORS FOR REMAINING ===== */
.summary-block.highlight.good {
  background: #e7f5ec;
  border: 1px solid #cde9d5;
  color: #2e7d32;
}

.summary-block.highlight.neutral {
  background: #fff6e6;
  border: 1px solid #ffe0b2;
  color: #ff9800;
}

.summary-block.highlight.bad {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #c0392b;
}

/* make value stronger */
.summary-block.highlight strong {
  font-size: 1.2rem;
  font-weight: 700;
}

/* ===== STATUS ===== */
.budget-status {
  font-size: 0.85rem;      /* ✅ same scale as other helper text */
  font-weight: 400;        /* ✅ NOT bold anymore */
  margin-top: 8px;
  margin-bottom: 6px;
  color: #333;
}

.budget-status.good { color: #2e7d32; }
.budget-status.neutral { color: #ff9800; }
.budget-status.bad { color: #c0392b; }

/* ===== BAR (HERO VISUAL) ===== */
.cost-bar {
  display: flex;
  width: 100%;
  height: 26px;
  margin: 14px 0 10px;
  border-radius: 6px;
  overflow: hidden;
  background: #e6e9ef;
}

/* segments */
.segment {
    height: 100%;
    transition: opacity 0.2s ease; /* ✅ smooth fade */
}

/* colors */
.segment.housing { background: #2c5aa0; }
.segment.food { background: #4caf50; }
.segment.utilities { background: #ff9800; }
.segment.transport { background: #8e24aa; }
.segment.other { background: #9e9e9e; }
.segment.remaining { background: #2e7d32; }
.segment.deficit { background: #c0392b; }

/* ===== CAPTION ===== */
.chart-caption {
  font-size: 0.8rem;
  color: #666;
  margin-top: 6px;
}

/* ===== LEGEND (COMPACT) ===== */
.cost-legend {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f7f8fb;
    border: 1px solid #e2e6ee;
}

.legend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.legend-row:hover {
    background: rgba(0, 0, 0, 0.03);
}


.legend-left {
    display: flex;
    align-items: center;
    gap: 8px;
}


.legend-row span:last-child {
    font-weight: 600;
    color: #222;
}

.legend-row .dot {
  flex-shrink: 0;
}

/* label + value sit together */
.legend-row span {
  display: inline-block;
}


/* left side (dot + label) */
.legend-left {
  display: contents;
}

/* dot */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* dot colors */
.dot.housing { background: #2c5aa0; }
.dot.food { background: #4caf50; }
.dot.utilities { background: #ff9800; }
.dot.transport { background: #8e24aa; }
.dot.other { background: #9e9e9e; }
.dot.remaining { background: #2e7d32; }
.dot.deficit { background: #c0392b; }

/* ===== INCOME RATIO ===== */
.income-ratio {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 10px;
}

/* ===== COUNTRY REFERENCE ===== */
.country-reference {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.ref-item {
    background: #f7f8fb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.82rem;
    border: 1px solid #e2e6ee;
}


.ref-item span {
  display: block;
  color: #666;
}

.ref-item strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.income-compare {
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 6px;
margin-top: 6px
}

/* ===== RESULT TEXT SPACING ===== */
.budget-status {
  margin-top: 10px;
  margin-bottom: 6px;
}

.income-compare {
  margin-bottom: 6px;
}

.income-ratio {
  margin-bottom: 14px;
}

/* ===== MAKE RATIO MORE PROMINENT ===== */
.income-ratio {
  font-weight: 600;
  color: #222;
}

/* ===== EMPHASIZE REMAINING BLOCK ===== */
.summary-block.highlight {
  background: #eef4ff;
  border: 1px solid #d5e3ff;
}

/* ===== MAKE REMAINING VALUE STRONGER ===== */
.summary-block.highlight strong {
  font-size: 1.15rem;
  font-weight: 700;
}

/* ===== SECTION BREATHING SPACE ===== */
.chart-caption {
  margin-top: 12px;
  margin-bottom: 6px;
}

.status-context {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 2px;
}

.cost-explainer {
  padding-left: 16px;
  margin-top: 10px;
}

.cost-explainer li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cost-explainer strong {
  display: inline-block;
  min-width: 90px;
}

/* ===== MODE SWITCH ===== */

.mode-switch {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 620px;
    margin: 0 auto 16px; /* ✅ centers horizontally inside card */
    padding: 4px;
    border-radius: 999px;
    background: #f4f6f9;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.08);

}

.mode-option {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 2;
    user-select: none;
}

.mode-option.active {
    font-weight: 600;
    color: #2f6fdd;
}

.mode-option {
    transition: color 0.15s ease;
}

.mode-option:hover {
    color: #2f6fdd;
}




.mode-highlight {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(33.333% - 3px);
    height: calc(100% - 8px);
    background: white;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    z-index: 1;
}

/* ===== MODE HELPER TEXT ===== */

.mode-helper {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
    margin: 2px auto 14px;
    max-width: 620px; /* align with switch */
}

.mode-helper div {
    text-align: center;
    flex: 1;
padding: 0 6px;
}

/* ===== INPUT STYLE (APPLE-LIKE) ===== */

.calc-input input,
.calc-input select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #d8dde5;
    background: #ffffff; /* ✅ pure white */
    font-size: 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}


.calc-input input:hover,
.calc-input select:hover {
    background: #ffffff;
}

.calc-input input:focus,
.calc-input select:focus {
    outline: none;
    border-color: #b7c6ff;
    box-shadow: 0 0 0 2px rgba(120, 140, 255, 0.15);
}


.calc-input label {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 4px;
    display: block;
}

.calc-input input,
.calc-input select {
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.spending-header-inline {
    font-size: 0.85rem;
    color: #333;
    margin-top: 12px;
    margin-bottom: 6px;
}

.spending-header-inline span {
    color: #000;
    font-weight: 600;
    margin-left: 4px;
}

.status-main {
    font-weight: 600;
    font-size: 0.85rem;
}

.status-main.good {
    color: #2e7d32;
}

.status-main.neutral {
    color: #ff9800;
}

.status-main.bad {
    color: #c0392b;
}

.status-sub {
    color: #333;
    font-weight: 400;
}