/* TravelCity.fun — travel currency converter and cheat sheet (tool-currency.js)
   Every class is prefixed cc-. Colours and type come from site.css tokens.
   The local currency runs on the coral line, the traveler's own on the sky line. */

.cc{font-family:var(--display);padding-bottom:1rem}
.cc [hidden]{display:none}
.cc-noscript{padding:1rem;border:2px solid var(--ink);border-radius:var(--radius);background:var(--surface);margin-bottom:1.5rem}

/* ---------- Layout ---------- */
.cc-grid{display:grid;gap:1.5rem}
.cc-grid > *{min-width:0}
.cc-side{display:grid;gap:1.5rem;align-content:start}
@media (min-width:62rem){
  .cc-grid{grid-template-columns:minmax(0,1fr) minmax(0,25rem);align-items:start}
}

/* ---------- Panels ---------- */
.cc-panel{background:var(--surface);border:1px solid var(--rule);border-radius:calc(var(--radius)*2);padding:clamp(1rem,3vw,1.5rem);margin:0}
.cc-h{font-size:1.3rem;padding-bottom:.7rem;border-bottom:.3rem solid var(--cc-c,var(--ink));margin-bottom:1.1rem}
.cc-mm{--cc-c:var(--sun)}
.cc-card{--cc-c:var(--grape)}
.cc-sheet{--cc-c:var(--lagoon);margin-top:1.5rem}
.cc-hint{color:var(--ink-soft);font-size:.85rem;line-height:1.4;margin-top:.6rem}
.cc-text{font-size:.95rem;line-height:1.5}

/* ---------- Converter: two stops on one line ---------- */
.cc-line{position:relative;display:grid;gap:.5rem;padding-left:2rem}
.cc-line::before{content:"";position:absolute;left:.4rem;top:1.6rem;bottom:1.6rem;width:.35rem;border-radius:.2rem;background:var(--ink)}
.cc-stop{position:relative;display:grid;gap:.75rem;grid-template-columns:minmax(0,1fr)}
.cc-stop-local{--cc-c:var(--coral)}
.cc-stop-my{--cc-c:var(--sky)}
.cc-dot{position:absolute;left:-2rem;top:1.05rem;width:1.15rem;height:1.15rem;border-radius:50%;background:var(--surface);border:.3rem solid var(--cc-c)}
@media (min-width:34rem){
  .cc-stop{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end}
}

.cc-field{display:flex;flex-direction:column;gap:.35rem;min-width:0}
.cc-field label{font-weight:600;font-size:.95rem;line-height:1.3}
.cc-field select{width:100%;min-height:3.5rem;padding:.5rem .75rem;font:600 1.05rem var(--display);color:var(--ink);background:var(--surface);border:2px solid var(--ink);border-radius:var(--radius)}
.cc-amt{width:100%;min-width:0;min-height:3.5rem;padding:.4rem .8rem;font:700 1.6rem var(--display);color:var(--ink);background:var(--surface);border:2px solid var(--ink);border-bottom:.35rem solid var(--cc-c,var(--ink));border-radius:var(--radius);font-variant-numeric:tabular-nums}
.cc-field select:focus-visible,.cc-amt:focus-visible{outline:3px solid var(--sky);outline-offset:2px}

.cc-swap-row{display:flex;align-items:center;min-height:3rem}
.cc-swap{display:inline-flex;align-items:center;gap:.5rem;min-height:3rem;margin-left:-2.95rem;padding:.3rem 1.1rem .3rem .3rem;font:700 .95rem var(--display);color:var(--ink);background:var(--surface);border:0;border-radius:999px;cursor:pointer}
.cc-swap svg{flex:none;box-sizing:content-box;padding:.45rem;border-radius:50%;background:var(--ink);color:#fff}
.cc-swap:hover svg{background:var(--sky)}
.cc-swap:focus-visible{outline:3px solid var(--sky);outline-offset:2px}

/* ---------- Result ---------- */
.cc-result{margin-top:1.1rem;padding:clamp(1rem,3vw,1.25rem);background:var(--ink);color:#fff;border-radius:var(--radius)}
.cc-out{font-size:clamp(1.5rem,6.5vw,2.2rem);font-weight:800;letter-spacing:-.03em;line-height:1.15;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.cc-rates{display:flex;flex-wrap:wrap;gap:.2rem 1.25rem;margin-top:.6rem;color:#C9D1E8;font-size:.95rem;font-variant-numeric:tabular-nums}
.cc-source{margin-top:.8rem;font-weight:600;font-size:.92rem;line-height:1.4}
.cc-source [role="status"]{font-weight:400;color:var(--ink-soft)}
.cc-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.cc-btn{min-height:2.75rem;padding:.55rem 1rem;font-size:.92rem}
.cc-status{min-height:1.3rem;margin-top:.5rem;font-size:.88rem;color:var(--ink-soft)}

/* ---------- Shortcut, card or cash ---------- */
.cc-mm-line{font-size:1.25rem;font-weight:700;line-height:1.3;text-wrap:balance}
.cc-field-fee{margin-top:1rem}
.cc-box{display:flex;align-items:center;max-width:11rem;min-height:3rem;background:var(--surface);border:2px solid var(--ink);border-radius:var(--radius)}
.cc-box:focus-within{outline:3px solid var(--sky);outline-offset:2px}
.cc-box input{flex:1;width:100%;min-width:0;min-height:2.75rem;padding:.4rem .7rem;font:600 1.15rem var(--display);color:var(--ink);background:transparent;border:0;border-radius:var(--radius);font-variant-numeric:tabular-nums}
.cc-box input:focus{outline:none}
.cc-unit{flex:none;padding-right:.8rem;color:var(--ink-soft);font-weight:700}
.cc-fee-out{margin-top:1rem;padding:.8rem 1rem;border-left:.3rem solid var(--grape);background:var(--paper);border-radius:0 var(--radius) var(--radius) 0;font-weight:600;font-size:.98rem;line-height:1.45}

/* ---------- Cheat sheet ---------- */
.cc-sheet-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;padding-bottom:.7rem;border-bottom:.3rem solid var(--cc-c);margin-bottom:1rem}
.cc-sheet-head .cc-h{border:0;padding:0;margin:0}
.cc-sheet-rate{font-weight:700;font-variant-numeric:tabular-nums}
.cc-tables{display:grid;gap:1.5rem 2.5rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr));align-items:start;margin-top:1rem}
.cc-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.cc-table caption{text-align:left;font-weight:700;font-size:1.05rem;padding-bottom:.5rem}
.cc-table th,.cc-table td{padding:.5rem 0 .5rem .75rem;text-align:right;border-bottom:1px solid var(--rule);white-space:nowrap}
.cc-table th:first-child{padding-left:0;text-align:left}
.cc-table thead th{font-size:.88rem;color:var(--ink-soft);border-bottom:2px solid var(--ink);white-space:normal;vertical-align:bottom}
.cc-table tbody th{font-weight:700}
.cc-table tbody td{font-weight:500}
.cc-table tbody td:nth-child(2){font-weight:700}
.cc-table-local tbody th:first-child{border-left:.3rem solid var(--coral);padding-left:.75rem}
.cc-table-my tbody th:first-child{border-left:.3rem solid var(--sky);padding-left:.75rem}
.cc-sheet-foot{margin-top:1rem;font-size:.88rem;line-height:1.4}
@media (max-width:30rem){
  .cc-sheet{padding-inline:.75rem}
  .cc-tables{overflow-x:auto}
  .cc-table{font-size:.82rem}
  .cc-table th,.cc-table td{padding-left:.45rem}
  .cc-table-local tbody th:first-child,.cc-table-my tbody th:first-child{padding-left:.4rem}
}

/* ---------- Explanatory content ---------- */
.cc-prose{max-width:42.5rem;padding:1.5rem 0 3rem}

/* ---------- Print: the cheat sheet alone ---------- */
@media print{
  body *:not(:has(.cc-sheet)):not(.cc-sheet):not(.cc-sheet *){display:none}
  body *{visibility:hidden}
  .cc-sheet,.cc-sheet *{visibility:visible}
  .cc-sheet{position:absolute;left:0;top:0;width:100%;margin:0;padding:0;border:0}
  .cc-sheet .cc-btn,.cc-sheet .cc-screen{display:none}
  .cc-tables{grid-template-columns:1fr 1fr;gap:2rem}
  .cc-table th,.cc-table td{padding-top:.3rem;padding-bottom:.3rem}
  .cc-table tbody th{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
