/* ===================================================================
   Beita Donation Portal — Base reset + RTL defaults.
   Imported after tokens.css.
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  direction: rtl;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-hebrew);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p { margin: 0; }
h1 { font-size: var(--fs-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); line-height: 1.1;  color: var(--gray-900); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-h2); letter-spacing: var(--ls-h2); line-height: 1.2;  color: var(--gray-900); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-h3); line-height: 1.3;  color: var(--gray-900); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-h4); line-height: 1.4;  color: var(--gray-900); }
p  { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--gray-700); }
small { font-size: var(--fs-caption); color: var(--gray-500); }

a {
  color: var(--blue-600);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--blue-700); }
a:focus-visible {
  outline: var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Latin-only spans (URLs, error codes, English brand names) — keep them
   LTR to avoid mirroring. Apply via class. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-latin);
}

img, svg, video { max-width: 100%; height: auto; display: block; }

button {
  font-family: inherit;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Tabular numerals on money fields */
.tabular-nums {
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

/* Currency — always ₪{n}, no decimals on body amounts */
.currency {
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

/* Screen-reader-only — for visually hidden but accessible content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Container — clamp to layout max-width */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}
@media (max-width: 720px) {
  .container { padding-inline: var(--sp-base); }
}

/* Surface — generic light card */
.surface {
  background: var(--white);
  border: var(--border-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* Stack/cluster — flexbox helpers */
.stack { display: flex; flex-direction: column; }
.stack-xs   { gap: var(--sp-xs); }
.stack-sm   { gap: var(--sp-sm); }
.stack-md   { gap: var(--sp-md); }
.stack-base { gap: var(--sp-base); }
.stack-lg   { gap: var(--sp-lg); }
.stack-xl   { gap: var(--sp-xl); }

.cluster { display: flex; flex-direction: row; align-items: center; }
.cluster-xs   { gap: var(--sp-xs); }
.cluster-sm   { gap: var(--sp-sm); }
.cluster-md   { gap: var(--sp-md); }
.cluster-base { gap: var(--sp-base); }

.between { display: flex; align-items: center; justify-content: space-between; }
.center  { display: flex; align-items: center; justify-content: center; }

/* Spacers */
.mt-xs { margin-top: var(--sp-xs); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-base { margin-top: var(--sp-base); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }

/* Focus ring — global accessible default */
:focus-visible {
  outline: var(--border-focus);
  outline-offset: 2px;
}

/* Hidden helper that works alongside aria-hidden */
[hidden], .hidden { display: none !important; }

/* Subtle pulse for loading states */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.shimmer {
  background: linear-gradient(
    90deg,
    var(--gray-100) 25%,
    var(--gray-200) 37%,
    var(--gray-100) 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
}
