/* assets/calc.css — Calculadora de câmbio (usa os tokens de ../AEROCASH/assets/css/style.css) */

.calc-hero .hero h1, .calc-hero h1 { max-width: 12ch; }

/* Formulário: valor + moeda */
.calc-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); padding-top: 0; }
.field input[type="number"] {
    width: 100%; border: 0; border-bottom: 2px solid var(--line); background: transparent; padding: 4px 0 6px;
    font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1.1; color: var(--ink); border-radius: 0; min-height: 50px;
    -moz-appearance: textfield; appearance: textfield;
}
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.field input[type="number"]:focus, .calc-select:focus { outline: none; border-bottom-color: var(--money); }
.calc-select {
    width: 100%; border: 0; border-bottom: 2px solid var(--line); background: transparent; padding: 8px 28px 8px 0; min-height: 50px;
    font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--ink); border-radius: 0; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2362757A' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 4px center;
    text-overflow: ellipsis;
}
.quick-currencies { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.quick-currencies .chip { padding: 6px 12px; font-weight: 600; }

/* Extremos */
.calc-extremes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; padding-top: 48px; }
.extreme h2, .calc-all h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.05; }
.extreme-sub { color: var(--muted); font-size: .92rem; margin: 6px 0 12px; max-width: 52ch; }
.extreme-list { list-style: none; border-top: 2px solid var(--ink); }
.extreme-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 2px; border-bottom: 1px dashed var(--line); }
.x-code, .r-code { font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1; }
.x-name { min-width: 0; color: var(--ink-2); }
.x-name small { display: block; color: var(--muted); font-size: .82rem; }
.x-val { font-family: var(--display); font-weight: 800; font-size: 1.45rem; font-variant-numeric: tabular-nums; }

/* Todas as moedas */
.calc-all { padding-top: 56px; padding-bottom: 56px; }
.calc-all-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.calc-filter { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 14px; min-width: min(320px, 100%); }
.calc-filter:focus-within { border-color: var(--money); }
.calc-filter i { color: var(--muted); }
.calc-filter input { border: 0; background: transparent; padding: 10px 0; width: 100%; outline: none; }
.continent-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.continent-tabs .chip { padding: 7px 12px; }
.continent-tabs small { opacity: .65; margin-left: 2px; }

.continent { margin-bottom: 28px; }
.continent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.continent-head h3 { font-family: var(--display); font-weight: 800; font-size: 1.6rem; }
.continent-head h3 i { font-size: 1.1rem; color: var(--money); margin-right: 4px; }
.continent-head a { font-weight: 600; font-size: .92rem; }

.rates { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r-lg); overflow: hidden; }
.rates th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--muted); padding: 10px 16px; border-bottom: 2px solid var(--paper-2); }
.rates td { padding: 10px 16px; border-bottom: 1px dashed var(--paper-2); vertical-align: baseline; }
.rates tr:last-child td { border-bottom: 0; }
.rates tr:target td { background: var(--amber-soft); }
.rates .num { text-align: right; white-space: nowrap; }
.r-name { color: var(--ink-2); margin-left: 6px; }
.r-country-inline { display: none; }
.r-val { font-family: var(--display); font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.rate-col { color: var(--muted); font-size: .85rem; }
.empty-filter { color: var(--muted); padding: 20px 0; }
.calc-source { color: var(--muted); font-size: .85rem; margin-top: 8px; }

/* Ranking */
.rank-head { background: var(--ink); color: #fff; padding: 28px 0 30px; }
.rank-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.3rem, 5vw, 3.4rem); line-height: 1; }
.rank-head p { color: #B7C7C5; margin-top: 6px; }
.rank-controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin-top: 18px; }
.rank-controls label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: #B7C7C5; }
.rank-controls select { background: var(--card); color: var(--ink); border: 0; border-radius: var(--r-sm); padding: 10px 12px; font-weight: 600; min-width: 220px; max-width: 100%; }
.rank-body { padding-top: 24px; padding-bottom: 48px; }
.rank-pos { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--muted); width: 64px; }
.rank-pos.top { color: var(--amber-2); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 20px; }
.pager a, .pager span { min-width: 40px; text-align: center; padding: 8px 12px; border-radius: var(--r-sm); background: var(--card); text-decoration: none; color: var(--ink); font-weight: 600; }
.pager span { background: var(--ink); color: #fff; }

@media (max-width: 760px) {
    .calc-fields { grid-template-columns: 1fr; gap: 12px; }
    .field input[type="number"] { font-size: 1.8rem; }
    .calc-select { font-size: 1.2rem; }
    .calc-extremes { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }
    .extreme-list li { grid-template-columns: 54px minmax(0, 1fr) auto; }
    .x-val { font-size: 1.2rem; }
    .calc-all { padding-top: 40px; }
    .calc-filter { width: 100%; }
    .continent-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
    .continent-tabs .chip { flex-shrink: 0; }
    .rates th, .rates td { padding: 9px 12px; }
    .country-col, .rate-col { display: none; }
    .r-name { display: block; margin-left: 0; font-size: .88rem; }
    .r-country-inline { display: block; color: var(--muted); font-size: .8rem; }
    .r-val { font-size: 1.2rem; }
    .rank-controls select { min-width: 0; width: 100%; }
    .rank-controls label { width: 100%; }
    .rank-pos { width: 44px; }
}

/* Poder de compra */
.power { padding-top: 52px; }
.power-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.power-head p { color: var(--ink-2); margin: 10px 0 20px; max-width: 70ch; }
.power-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.power-col h3 { font-family: var(--display); font-weight: 800; font-size: 1.6rem; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.power-mais h3 { color: var(--money-2); border-color: var(--money); }
.power-menos h3 { color: var(--stamp); border-color: var(--stamp); }
.power-list { list-style: none; }
.power-list li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 2px; border-bottom: 1px dashed var(--line); }
.p-mult { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.power-mais .p-mult { color: var(--money-2); }
.power-menos .p-mult { color: var(--stamp); }
.p-country { min-width: 0; font-weight: 600; }
.p-country > small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.p-say { display: block; margin-left: 0 !important; font-size: .82rem; font-weight: 400; color: var(--muted); }
.p-bigmac { text-align: right; font-size: .8rem; color: var(--muted); white-space: nowrap; line-height: 1.35; }
.p-bigmac strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.p-bigmac em { font-style: normal; font-weight: 600; }
.p-bigmac em.disagree { color: #fff; background: var(--stamp); border-radius: 4px; padding: 0 5px; }
.power-note { color: var(--muted); font-size: .84rem; margin-top: 14px; max-width: 90ch; }

@media (max-width: 760px) {
    .power { padding-top: 40px; }
    .power-grid { grid-template-columns: 1fr; gap: 28px; }
    .power-list li { grid-template-columns: 62px minmax(0, 1fr); }
    .p-good { font-size: .8rem; }
    .p-mult { font-size: 1.45rem; }
    .p-bigmac { grid-column: 2; text-align: left; white-space: normal; }
    .p-bigmac br { display: none; }
    .p-bigmac em { margin-left: 6px; }
}

/* Explicação por produto (Big Mac): preço lá e aqui, na mesma moeda */
.p-goods { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; padding: 8px 10px; background: var(--paper); border-radius: var(--r-sm); font-weight: 400; }
.p-good { display: flex; gap: 8px; align-items: baseline; font-size: .84rem; color: var(--ink-2); }
.p-good i { color: #C8102E; width: 14px; flex: none; }
.p-good strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.p-good small { color: var(--muted); }
.p-good-x { font-style: normal; font-size: .82rem; font-weight: 600; color: var(--money-2); padding-left: 22px; }
.power-menos .p-good-x { color: var(--stamp); }
.p-good-x.disagree { color: var(--amber-2); }
