/* ═══════════════════════════════════════════════════════
   דעת — בסיס עיצובי משותף  |  base.css  v1.0
   ───────────────────────────────────────────────────────
   TODO הפקה: הסר את @import מ-Google Fonts
   והוסף @font-face self-hosted מ-assets/fonts/
   ═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500&family=Inter:wght@400&display=swap');

/* ─── ציוני עיצוב ─── */
:root {
  --c-gold:         #C8A44E;
  --c-magenta:      #D07090;
  --c-blue:         #6080B0;
  --c-deep:         #0A0A12;
  --c-ivory:        #E8E4DF;
  --c-ivory-light:  #F5F2EE;
  --c-border:       #DDD6CE;
  --c-error:        #B0405F;
  --c-white:        #FFFFFF;

  --f-he: 'Assistant', 'Arial Hebrew', Tahoma, sans-serif;
  --f-en: 'Inter', Arial, sans-serif;

  --r-sm: 4px;
  --r-md: 6px;

  --max-w: 860px;
  --pad:   32px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button, select, textarea, input { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ─── בסיס ─── */
html {
  direction: rtl;
  font-family: var(--f-he);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-deep);
  background-color: var(--c-ivory);
  /* watercolor wash עדין — 01-design-brief §2 */
  background-image:
    radial-gradient(ellipse 80% 55% at 12% 8%,  rgba(200,164,78,  0.10) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 88% 92%, rgba(208,112,144, 0.07) 0%, transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── פוקוס נגיש ─── */
:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── מיכל עמוד ─── */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-center {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ─── כותרת אתר ─── */
.site-header {
  padding-block: 40px 0;
  text-align: center;
}

/* ─── כפתורים ─── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding-inline: 20px;
  background: var(--c-deep);
  color: var(--c-white);
  border: none;
  border-radius: var(--r-md);
  font-family: var(--f-he);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover:not(:disabled) { background: #1A1A26; }
.btn-primary:disabled              { background: #999; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding-inline: 16px;
  background: transparent;
  color: var(--c-deep);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--f-he);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--c-blue); color: var(--c-blue); }

/* ─── שדות קלט ─── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 14px;
  font-weight: 400;
  color: #444;
  line-height: 1.4;
}
.field-label .req { color: var(--c-magenta); margin-right: 2px; }

.field-input {
  width: 100%;
  height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-white);
  font-family: var(--f-he);
  font-size: 15px;
  font-weight: 300;
  color: var(--c-deep);
  transition: border-color 0.15s;
  appearance: none;
}
.field-input:focus        { border-color: var(--c-blue); outline: none; }
.field-input.has-error    { border-color: var(--c-error); }

/* שדה בולט — מספר תביעה */
.field-input--prominent {
  height: 56px;
  padding-inline: 16px;
  border-color: var(--c-gold);
  background: var(--c-ivory-light);
  font-family: var(--f-en);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.03em;
}
.field-input--prominent:focus { border-color: var(--c-gold); box-shadow: 0 0 0 2px rgba(200,164,78,0.18); }

textarea.field-input {
  height: auto;
  min-height: 88px;
  padding-block: 10px;
  resize: vertical;
  line-height: 1.6;
}

/* select */
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: '';
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-inline: 4px solid transparent;
  border-top: 5px solid #888;
  pointer-events: none;
}
.select-wrap .field-input { padding-inline-start: 28px; cursor: pointer; }

.field-hint {
  font-size: 12px;
  color: #888;
  line-height: 1.45;
}

.field-error {
  font-size: 13px;
  color: var(--c-error);
  display: none;
}
.field-error.visible { display: block; }

/* ─── קבוצות טופס ─── */
.form-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 28px;
  margin-bottom: 20px;
}

.form-card__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-deep);
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--c-border);
  letter-spacing: 0.01em;
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.field-full { grid-column: 1 / -1; }

/* ─── תיבות סימון / רדיו ─── */
.check-cards { display: flex; flex-direction: column; gap: 8px; }

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--c-ivory-light);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.check-card:hover { background: #EFEAE3; }

.check-card input[type="checkbox"],
.check-card input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--c-gold);
  flex-shrink: 0;
  margin-top: 3px;
  cursor: pointer;
}
.check-card__label { font-size: 14px; line-height: 1.55; }

/* radio grid (שורה) */
.radio-row { display: flex; flex-direction: row; gap: 8px; }
.radio-row .check-card { flex: 1; }

/* ─── תיבת הודעה / notice ─── */
.notice-bar {
  border-inline-start: 3px solid var(--c-gold); /* גבול ימני ב-RTL */
  background: var(--c-ivory-light);
  padding: 16px 20px;
  border-radius: var(--r-sm) 0 0 var(--r-sm);   /* פינות עגולות בצד שמאל */
}
.notice-bar__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-deep);
  margin-bottom: 8px;
}
.notice-bar li {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  padding-inline-start: 4px;
}
.notice-bar li::before { content: '— '; color: var(--c-gold); }

/* ─── Info banner (auto-reject warning) ─── */
.warn-banner {
  display: none;
  background: #FDF5F7;
  border: 1px solid #ECC8D0;
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--c-error);
  line-height: 1.55;
}
.warn-banner.visible { display: block; }

/* ─── Note strip ─── */
.note-strip {
  background: var(--c-ivory-light);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 13px;
  color: #666;
  line-height: 1.65;
  margin-top: 8px;
}

/* ─── File input ─── */
.file-input-wrap { position: relative; }
.file-input-wrap input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-input-face {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding-inline: 12px;
  border: 1px dashed var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-white);
  font-size: 14px;
  color: #777;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.file-input-wrap:hover .file-input-face,
.file-input-face.has-file {
  border-color: var(--c-blue);
  border-style: solid;
  background: #F7F8FC;
}
.file-input-face.has-file { color: var(--c-deep); }

/* ─── Spinner ─── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── ניווט / header ─── */
.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-white);
}
.nav-logo { font-family: var(--f-he); font-size: 22px; font-weight: 300; color: var(--c-gold); letter-spacing: 0.08em; }
.nav-back  { font-size: 14px; color: #666; display: flex; align-items: center; gap: 6px; }
.nav-back:hover { color: var(--c-blue); }

/* ─── Page title block ─── */
.page-hero {
  padding: 36px var(--pad) 28px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-white);
  margin-bottom: 28px;
}
.page-hero__title { font-size: 26px; font-weight: 300; letter-spacing: 0.01em; line-height: 1.2; }
.page-hero__sub   { font-size: 14px; color: #888; margin-top: 6px; font-weight: 300; }

/* ─── Centered card (OTP / Success / Rejected) ─── */
.card-centered {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  text-align: center;
}

/* ─── OTP boxes ─── */
.otp-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  direction: ltr;
  margin-block: 28px 8px;
}
.otp-box {
  width: 46px;
  height: 58px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-white);
  font-family: var(--f-en);
  font-size: 24px;
  font-weight: 400;
  text-align: center;
  color: var(--c-deep);
  transition: border-color 0.15s;
  caret-color: var(--c-gold);
}
.otp-box:focus { border-color: var(--c-blue); outline: none; }
.otp-box.has-error { border-color: var(--c-error); }

/* ─── Status icons ─── */
.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 24px;
}
.status-icon--success { background: rgba(200,164,78,0.12); }
.status-icon--info    { background: rgba(208,112,144,0.10); }

/* ─── Footer ─── */
.site-footer {
  padding: 20px var(--pad) 28px;
  text-align: center;
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 13px;
}
.footer-links a { color: #888; transition: color 0.15s; }
.footer-links a:hover { color: var(--c-blue); }
.footer-copy { margin-top: 8px; font-size: 12px; color: #bbb; }

/* ─── Public ID badge ─── */
.public-id {
  font-family: var(--f-en);
  font-size: 17px;
  font-weight: 400;
  color: var(--c-gold);
  letter-spacing: 0.06em;
  background: rgba(200,164,78,0.08);
  border: 1px solid rgba(200,164,78,0.3);
  border-radius: var(--r-sm);
  padding: 6px 16px;
  display: inline-block;
  margin-bottom: 8px;
}

/* ─── Resend countdown ─── */
.resend-row { margin-top: 20px; font-size: 13px; color: #888; }
.resend-row button {
  background: none;
  border: none;
  color: var(--c-blue);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  font-family: var(--f-he);
}
.resend-row button:disabled { color: #aaa; cursor: default; }

/* ─── רספונסיביות ─── */
@media (max-width: 719px) {
  .fields-grid { grid-template-columns: 1fr; }
  .radio-row   { flex-direction: column; }
}

@media (max-width: 639px) {
  :root { --pad: 16px; }
  .form-card  { padding: 20px 16px 24px; }
  .page-hero  { padding: 24px var(--pad) 20px; }
  .page-hero__title { font-size: 22px; }
  .card-centered { padding: 32px 24px; }
}

@media (max-width: 479px) {
  .otp-row { gap: 7px; }
  .otp-box { width: 40px; height: 52px; font-size: 20px; }
}
