/* Bankopłat — global styles for what doesn't fit inline */

/* ── Fonts ─────────────────────────────────────────── */
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
/* Instrument Serif is shipped from Google Fonts as 2 subset files (latin + latin-ext).
   Declare both so the browser fetches the right one per glyph; together they cover
   basic ASCII + Polish diacritics (ąćęłńóśźż). */
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-Italic-latin.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-Italic-latinext.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Reset + base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: #2a2a2a;
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  color: #1a1614;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
button { font-family: inherit; cursor: pointer; }

/* ── App container — fluid 360–430 ────────────────── */
#root {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh; /* dynamic vh on iOS Safari */
  background: #FAF8F4;
  background-image:
    radial-gradient(ellipse at top right, rgba(255, 220, 180, 0.12), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(180, 220, 255, 0.08), transparent 50%);
  position: relative;
  overflow-x: hidden;
}
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* ── Tabular numerics (for amounts) ───────────────── */
.mono, [data-mono] {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* ── Carousel scroll-snap (dashboard) ─────────────── */
.carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

/* ── Modals (slide-up from bottom) ────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 50;
  animation: fade-in 0.2s ease-out;
}
.modal-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 430px; margin: 0 auto;
  background: #FAF8F4;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  max-height: 92vh; max-height: 92dvh;
  overflow-y: auto;
  z-index: 51;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  animation: slide-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Menu popover (start screen) ──────────────────── */
.menu-backdrop {
  position: fixed; inset: 0;
  z-index: 10;
}

/* ── Toast ────────────────────────────────────────── */
.toast {
  position: absolute;
  bottom: max(30px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  animation: toast-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

/* ── Animations ───────────────────────────────────── */
@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── Tap target floor ─────────────────────────────── */
button, [role="button"] { min-height: 44px; }

/* ── Disable iOS form input zoom ──────────────────── */
input, textarea, select { font-size: 16px; }
