/* css/pwa.css — שלב 0 (01_PWA_Offline_Install): תוספות בלבד, בלי נגיעה ב-styles.css.
   safe-area: עם viewport-fit=cover התוכן יכול להגיע מתחת לחריץ/לסרגל הבית.
   במכשיר בלי חריץ כל ה-inset הם 0, כך שמשתמש קיים רואה בדיוק מה שראה עד היום. */
.screen {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  box-sizing: border-box;
}
.share-fab    { bottom: calc(64px  + env(safe-area-inset-bottom)); }
.feedback-fab { bottom: calc(120px + env(safe-area-inset-bottom)); }
.install-fab  { bottom: calc(176px + env(safe-area-inset-bottom)); }

/* ═══ באנרים בראש המסך (js/pwa-update.js) — כמו .sys-banner ב-Daily Balance: בהירים, בתוך הזרימה ═══
   המארח נכנס כילד ראשון של המסך הפעיל (אחרי פס המשתמשת), ללא position — לכן לא חופף ל-FABs
   (שבתחתית) ולא ל-safe-area (המסך מרוכך). מאפיינים לוגיים בלבד (RTL/LTR). */
.np-banners { flex-shrink: 0; align-self: stretch; padding: 8px 12px 0; }
.np-banners[hidden] { display: none; }
.np-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 8px; padding: 10px 14px; border-radius: 14px;
  font-family: var(--font-body, 'Assistant', sans-serif); font-size: 13px; font-weight: 600; line-height: 1.45;
  background: #EAF6FD; color: var(--navy, #1E293B); border: 1px solid rgba(14,165,233,.28);
}
.np-banner > span { min-width: 0; }
.np-banner-offline { background: #EEF2FF; border-color: #C7D2FE; justify-content: flex-start; }
.np-banner .np-btn { flex-shrink: 0; }

/* ═══ כרטיס התקנה + מדריך (js/pwa-install.js) — מבנה כמו ב-Daily Balance, צבעים וגופנים של EyeFocus ═══
   כפתור ראשי: גרדיאנט --gradient-cta עם טקסט --navy (ניגודיות 5.28:1 בקצה התכלת, 5.88:1 בקצה הטורקיז;
   ר' test/contrast.test.mjs). משני: ירוק/תכלת שקוף עם --accent-text. אין טקסט לבן על הגרדיאנט. */
.np-sheet-back {
  position: fixed; inset: 0; z-index: 2147483200; background: rgba(15,23,42,.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.np-sheet {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--white, #fff); color: var(--text, #1E293B); border-radius: 24px 24px 0 0;
  padding: 12px 20px calc(18px + env(safe-area-inset-bottom));
  font-family: var(--font-body, 'Assistant', sans-serif); font-size: 15px; font-weight: 500; line-height: 1.55;
  box-shadow: 0 -8px 32px rgba(15,23,42,.25); user-select: text;
}
.np-sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--border, #E2E8F0); margin: 2px auto 10px; }
.np-sheet-logo { display: block; margin: 0 auto 8px; width: 56px; height: 56px; object-fit: contain; }
.np-sheet-title { font-family: var(--font-ui, 'Rubik', sans-serif); font-size: 19px; font-weight: 800; color: var(--navy, #1E293B); text-align: center; margin-bottom: 8px; }
.np-sub { margin: 6px 0 10px; font-weight: 700; text-align: center; }
.np-lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted, #526079); margin-bottom: 4px; }
.np-hint { margin: 6px 0 10px; font-size: 13px; color: var(--muted, #526079); }
.np-field { margin-top: 14px; }
.np-steps { margin: 10px 0 14px; padding-inline-start: 22px; line-height: 1.7; font-weight: 700; }
.np-row, .np-row-gap { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; align-items: center; }
.np-btn {
  border: 0; border-radius: 999px; padding: 13px 20px; min-height: 44px; cursor: pointer;
  font-family: var(--font-ui, 'Rubik', sans-serif); font-size: 14px; font-weight: 900;
  background: var(--gradient-cta, linear-gradient(135deg, #0EA5E9 0%, #14B8A6 100%)); color: var(--navy, #1E293B);
  box-shadow: var(--glow-primary, 0 4px 12px rgba(14,165,233,.15)); transition: transform .12s, filter .15s;
}
.np-btn:hover { filter: brightness(0.95); }
.np-btn:active { transform: scale(0.96); }
.np-btn:focus-visible, .np-sheet a:focus-visible { outline: 3px solid var(--accent-dark, #0284C7); outline-offset: 2px; }
.np-btn-wide { width: 100%; }
.np-btn-sm { padding: 9px 16px; min-height: 40px; font-size: 13px; }
.np-btn-sec {
  background: var(--accent-soft, rgba(14,165,233,.08)); color: var(--accent-text, #0369A1);
  border: 1px solid rgba(14,165,233,.35); box-shadow: none; font-weight: 800;
}
.np-btn-ghost { background: transparent; color: var(--accent-text, #0369A1); box-shadow: none; text-decoration: underline; font-weight: 700; padding-inline: 10px; }
.np-sheet-foot { display: flex; justify-content: center; margin-top: 8px; }
.np-status { min-height: 1.4em; margin: 6px 0; font-weight: 700; color: var(--green-text, #0F766E); }
.np-status-bad { color: var(--red-text, #BE123C); }
.np-textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--border, #E2E8F0); border-radius: 14px; padding: 10px; font: 13px/1.4 ui-monospace, Menlo, monospace; direction: ltr; user-select: text; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.np-textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(14,165,233,.12); border-color: var(--accent, #0EA5E9); }
.np-arrow { color: var(--accent-text, #0369A1); display: flex; justify-content: center; margin-top: 4px; }
.np-arrow-top { position: fixed; top: calc(8px + env(safe-area-inset-top)); inset-inline-end: 24px; }
@media (prefers-reduced-motion: no-preference) {
  .np-arrow svg { animation: npBob 1.2s ease-in-out infinite; }
  @keyframes npBob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(6px) } }
}
/* כרטיס שורה (slot-card) — בתוך מסך הסיכום של האימון. כרטיס זכוכית משלו; לא ברשימת ה-glass המשותפת. */
.np-slot-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 12px 14px; text-align: start;
  background: var(--glass-bg, rgba(255,255,255,.85)); border: 1px solid var(--border, #E2E8F0);
  border-radius: 18px; box-shadow: 0 2px 10px rgba(15,23,42,.06);
}
.np-sc-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--text, #1E293B); min-width: 0; flex: 1 1 160px; }
.np-sc-text b { font-family: var(--font-ui, 'Rubik', sans-serif); color: var(--navy, #1E293B); font-size: 15px; }
.np-sc-text span { color: var(--muted, #526079); }
@media (prefers-reduced-motion: reduce) { .np-btn { transition: none; } }

/* לוגו שנכשל בטעינה (בלי רשת) — מוחלף בטקסט ה-alt (js/pwa-update.js) */
.np-logo-fallback { display: inline-block; font: 900 28px/1.2 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: #0B2A4A; letter-spacing: .3px; text-align: center; }

/* ═══ שלב 1א — חיבור ל-Daily Balance (05 §4–§6) ═══
   כפתור בצבעי DB (#1F5DD1 → #6246EA) עם טקסט לבן, כפי שהאפיון קובע (ניגודיות לבן על שני הקצוות ≥ 4.5:1,
   נבדק ב-test/contrast.test.mjs). הכרטיסים מתחת לכפתור הראשי בסיכום היום: ניווט נקי, מאפיינים לוגיים בלבד (RTL/LTR). */
.np-db-connect { margin: 14px 0 4px; text-align: center; }
.np-db-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box;
  min-height: 48px; padding: 12px 16px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #1F5DD1 0%, #6246EA 100%); color: #FFFFFF;
  font-family: var(--font-ui, 'Rubik', sans-serif); font-size: 15px; font-weight: 800; line-height: 1.2;
  box-shadow: 0 4px 14px rgba(70, 70, 220, .28);
}
.np-db-btn:focus-visible, .np-db-return:focus-visible { outline: 3px solid var(--accent, #0EA5E9); outline-offset: 2px; }
.np-db-icon { width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; object-fit: cover; }
.np-db-help { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--muted, #526079); }
.np-db-copied {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.5; text-align: start;
  background: #EEF2FF; color: var(--navy, #1E293B); border: 1px solid #C7D2FE;
}
.np-db-copied[hidden], .np-db-field[hidden] { display: none; }
.np-db-field { margin-top: 8px; font-size: 12px; }

/* סיכום היום: "חזרה ל-Daily Balance" / כרטיס "סמנו ✓" (iPhone מותקן) */
.np-db-return, .np-db-check {
  display: flex; align-items: center; gap: 12px; box-sizing: border-box; width: 100%; margin: 10px 0 0; padding: 12px 14px;
  border-radius: 16px; text-align: start; text-decoration: none;
  background: #EEF2FF; border: 1px solid #C7D2FE; color: var(--navy, #1E293B);
}
.np-db-return-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.np-db-return-text strong { font-family: var(--font-ui, 'Rubik', sans-serif); font-size: 15px; font-weight: 800; color: var(--navy, #1E293B); }
.np-db-return-text small { font-size: 12.5px; color: #475569; }

/* ═══ שלב 1א — תיקונים אחרי בדיקה בטלפון ═══ */
/* כפתור ראשי שהוא קישור (סיום וחזרה ל-Daily Balance): נראה בדיוק כמו .start-btn */
.np-db-primary { display: block; box-sizing: border-box; text-align: center; text-decoration: none; margin-inline: auto; }
.np-db-primary:focus-visible, .np-textlink:focus-visible, .np-bell-btn:focus-visible, .np-db-bar:focus-visible { outline: 3px solid var(--accent, #0EA5E9); outline-offset: 2px; }
/* קישור טקסט קטן מתחת לכפתור הראשי */
.np-textlink {
  display: block; margin: 12px auto 0; padding: 8px 10px; background: none; border: 0; cursor: pointer; text-align: center;
  font-family: var(--font-body, 'Assistant', sans-serif); font-size: 14px; font-weight: 700; line-height: 1.4;
  color: var(--accent-text, #0369A1); text-decoration: underline; text-underline-offset: 3px;
}
/* פס רשת הביטחון בראש מסך התוכנית */
.np-db-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; width: 100%; max-width: 340px; margin: 0 auto 12px;
  padding: 10px 14px; border-radius: 14px; text-decoration: none; cursor: pointer; text-align: start;
  background: #EEF2FF; border: 1px solid #C7D2FE; color: var(--navy, #1E293B);
  font-family: var(--font-ui, 'Rubik', sans-serif); font-size: 14px; font-weight: 800; line-height: 1.35;
}
.np-db-bar > span { min-width: 0; }
/* פעמון תזכורת — זהה ל-.icon-btn.small.bell-btn של Daily Balance: עיגול 30px, מסגרת #E9E6DE, רקע לבן, בלי צל, אייקון 15px בצבע #1F5DD1.
   אזור הלחיצה ≥ 44px בעזרת ::before שקוף (30 + 2×7), בלי לשנות את הגודל הנראה */
.np-bell-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; align-self: center;
  width: 30px; height: 30px; padding: 0; margin-inline-start: 2px;
  border-radius: 50%; border: 1px solid #E9E6DE; background: #FFFFFF; color: #1F5DD1; cursor: pointer;
  box-shadow: none; transition: transform .1s;
}
.np-bell-btn::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.np-bell-btn svg { width: 15px; height: 15px; }
.np-bell-btn:active { transform: scale(.94); }
/* העברת פרופילים (iPhone): כותרת, צעדים, "אפשרויות נוספות" מקופל, וקישור קטן בתחתית מסך הכניסה באפליקציה המותקנת */
.np-xfer-title { margin: 0 0 4px; font-family: var(--font-ui, 'Rubik', sans-serif); font-size: 15px; font-weight: 800; color: var(--navy, #1E293B); }
.np-step-lbl { font-weight: 800; font-size: 14px; }
.np-more { margin-top: 10px; }
.np-more > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent-text, #0369A1); padding: 8px 0; min-height: 24px; }
.np-more[open] > summary { margin-bottom: 6px; }
.np-xfer-linkwrap { margin-top: 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
