/* ── Inflation / Purchasing Power Calculator ───────────────────────────────── */

/* ── Country buttons ──────────────────────────────────────────────────────── */

.inf-country-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.inf-country-btn {
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    color: var(--color-text-2);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
    line-height: 1.6;
}

.inf-country-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-text-1);
}

.inf-country-btn--active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #1a1a1a;
}

.inf-country-btn--hidden {
    display: none;
}

.inf-country-more {
    padding: var(--space-1) var(--space-3);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-3);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    line-height: 1.6;
    transition: border-color 0.12s, color 0.12s;
}

.inf-country-more:hover {
    border-color: var(--color-accent);
    color: var(--color-text-1);
}

/* ── Country preview (since 2020) ──────────────────────────────────────────── */

.inf-country-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-4);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-top: var(--space-1);
    margin-bottom: var(--space-10);
    text-align: center;
    min-height: 5rem;
}

.inf-preview__name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-2);
}

.inf-preview__pct {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    min-height: 1.2em;
}

.inf-preview__label {
    font-size: var(--text-xs);
    color: var(--color-text-3);
}

/* Category budgets — collapsible toggle styling */
.inf-cats-toggle {
    margin-bottom: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.inf-cats-toggle > summary {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--color-text-2);
    user-select: none;
    list-style: none;
}

.inf-cats-toggle > summary::before {
    content: '▸ ';
    font-size: 2.0em;
    line-height: 0;
    opacity: 0.6;
}

.inf-cats-toggle[open] > summary::before {
    content: '▾ ';
}

.inf-cats-body {
    padding: var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* ── Result country heading ───────────────────────────────────────────────── */

.inf-result-country {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text-1);
    text-align: center;
    margin: var(--space-2) 0 var(--space-1);
    letter-spacing: -0.01em;
}

/* ── Section headings ─────────────────────────────────────────────────────── */

.inf-section-heading {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: var(--space-4) 0 var(--space-3);
}

/* ── Category breakdown grid ──────────────────────────────────────────────── */

.inf-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.inf-cat-card {
    display: grid;
  grid-template-rows: auto 1fr;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    text-align: center;
}

.inf-cat-card__name {
    font-size: var(--text-xs);
    color: var(--color-text-3);
    margin-bottom: var(--space-1);
}

.inf-cat-card__pct {
    align-self: end;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-accent);
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.inf-cat-card__extra {
    font-size: var(--text-xs);
    color: var(--color-error);
    margin-top: var(--space-1);
    font-variant-numeric: tabular-nums;
}

/* ── Chart ────────────────────────────────────────────────────────────────── */

.inf-chart-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    margin-bottom: var(--space-2);
}

.inf-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ── Separator ────────────────────────────────────────────────────────────── */

.inf-sep {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-5) 0;
}

/* ── Share row ────────────────────────────────────────────────────────────── */

.inf-share-row {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    justify-content: flex-end;
}

/* ── Source / footnote ────────────────────────────────────────────────────── */

.inf-source-note {
    font-size: var(--text-xs);
    color: var(--color-text-3);
    margin: var(--space-2) 0;
}

/* ── Year slider ──────────────────────────────────────────────────────────── */

.inf-year-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.inf-year-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: center;
}

.inf-year-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--color-border);
    outline: none;
    cursor: pointer;
}

.inf-year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    border: 2px solid var(--color-bg);
    box-shadow: 0 0 0 1px var(--color-accent);
}

.inf-year-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    border: 2px solid var(--color-bg);
    box-shadow: 0 0 0 1px var(--color-accent);
}

.inf-year-ticks {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--color-text-3);
}

/* ── Error state ──────────────────────────────────────────────────────────── */

.inf-error {
    color: var(--color-error);
}

/* ── Country landing page ─────────────────────────────────────────────────── */

.inf-cp-preview {
    text-align: center;
    padding: var(--space-6) var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-5);
}

.inf-cp-preview__label {
    font-size: var(--text-xs);
    color: var(--color-text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-2);
}

.inf-cp-preview__pct {
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.inf-cp-countries {
    margin-bottom: var(--space-6);
}

.inf-cp-countries__label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.inf-cp-cta {
    display: flex;
    justify-content: center;
    padding: var(--space-4) 0 var(--space-2);
}
