/* ═══════════════════════════════════════════════════
   feedback.css, סגנון לכפתור הצף ולמודאל המשוב.
   ═══════════════════════════════════════════════════ */

/* ─── הכפתור הצף, פינה שמאלית-עליונה (RTL: ימנית) של ה-nav ─── */
#feedback-fab {
  position: fixed;
  bottom: 95px;
  left: 22px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #25d366;   /* ירוק וואטסאפ, משדר תקשורת ותמיכה (בקשת עומר 3/6, כמו דף הבית) */
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(6px);
  transition: background 0.18s, transform 0.18s, border-color 0.18s;
}
#feedback-fab:hover {
  background: #1ebe5d;   /* ירוק וואטסאפ כהה ב-hover (לא כתום, זון המשוב ירוק) */
  border-color: #fff;
  transform: scale(1.08);
}

/* ─── המודאל ─── */
#feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Rubik', Arial, sans-serif;
  direction: rtl;
}
#feedback-modal.shown {
  display: flex;
}
#feedback-modal .fb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 46, 0.78);
  backdrop-filter: blur(4px);
}
#feedback-modal .fb-card {
  position: relative;
  background: #fff;
  color: var(--navy);
  border-radius: 18px;
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: fb-pop 0.22s ease-out;
}
@keyframes fb-pop {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}
#feedback-modal .fb-x {
  position: absolute;
  top: 8px;
  left: 12px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #888;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
/* ─── Greeting block, תמונה של עומר + שני שורות טקסט ─── */
#feedback-modal .fb-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1ede5;
}
#feedback-modal .fb-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  border: 2px solid var(--orange);
}
#feedback-modal .fb-greeting-text {
  flex: 1;
  min-width: 0;
}
#feedback-modal h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
}
#feedback-modal .fb-sub {
  margin: 0;
  color: #555;
  font-size: 0.83rem;
  line-height: 1.5;
}
/* תווית "מה הסוג?" מעל הכפתורים. הלקוח שעוזב את הקריאה למעלה מתחיל לכתוב,
   והתווית הזאת מבטיחה שהוא יראה את הכפתורים גם אם הוא דילג על הכותרת. */
#feedback-modal .fb-types-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
#feedback-modal .fb-types-label.fb-need-attention {
  color: var(--orange-deep);
  animation: fb-attention 1.2s ease-in-out infinite;
}
@keyframes fb-attention {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}
#feedback-modal .fb-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
}
/* פולס מסביב לכל הכפתורים אם הלקוח כתב טקסט בלי לבחור סוג. עדין, לא צרחני. */
#feedback-modal .fb-types.fb-need-attention {
  border-radius: 14px;
  animation: fb-types-pulse 1.6s ease-in-out infinite;
}
@keyframes fb-types-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 133, 74, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(232, 133, 74, 0); }
}
#feedback-modal .fb-type {
  background: #f6f6f8;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.15s;
}
#feedback-modal .fb-type:hover {
  border-color: var(--tcolor, var(--orange));
  background: #fff;
}
#feedback-modal .fb-type.selected {
  border-color: var(--tcolor, var(--orange));
  background: color-mix(in srgb, var(--tcolor, var(--orange)) 12%, white);
  color: var(--tcolor, var(--navy));
}
#feedback-modal .fb-icon { display: flex; align-items: center; justify-content: center; }
#feedback-modal .fb-icon svg { display: block; }
#feedback-modal #fb-text {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--navy);
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
#feedback-modal #fb-text:focus { border-color: var(--orange); }
#feedback-modal #fb-text:focus-visible {
  outline: 2px solid var(--orange-deep, #e8854a);
  outline-offset: 2px;
}
#feedback-modal .fb-extras {
  margin-top: 10px;
}
/* סקשן פרטי קשר, מופיע רק בסוג "שאלה לעומר". שם + טלפון + אימייל. */
#feedback-modal .fb-contact-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy, #1a4a6b);
  margin-bottom: 8px;
}
#feedback-modal .fb-field {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 8px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
}
#feedback-modal .fb-field:focus { border-color: var(--orange); }
#feedback-modal .fb-field:focus-visible {
  outline: 2px solid var(--orange-deep, #e8854a);
  outline-offset: 2px;
}
#feedback-modal .fb-field.fb-invalid { border-color: #dc2626; }
#feedback-modal .fb-contact-hint {
  font-size: 0.74rem;
  color: #8a7f72;
  margin-top: 2px;
  line-height: 1.45;
}
/* honeypot, hidden from users + bots that use display:none won't see it */
#feedback-modal #fb-honeypot {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
#feedback-modal .fb-error {
  color: #b91c1c;
  font-size: 0.82rem;
  min-height: 18px;
  margin-top: 8px;
}
#feedback-modal .fb-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
#feedback-modal .fb-cancel,
#feedback-modal .fb-submit {
  flex: 1;
  padding: 12px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
#feedback-modal .fb-cancel {
  background: #f3f4f6;
  color: #4b5563;
}
#feedback-modal .fb-submit {
  background: linear-gradient(135deg, var(--orange), #e8834e);
  color: #fff;
}
/* כפתור disabled, opacity מעט גבוהה יותר כדי שהטקסט (ה-hint) יהיה קריא,
   אחרת הלקוח לא רואה "↑ בחרו סוג למעלה" וכו'. */
#feedback-modal .fb-submit:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  background: linear-gradient(135deg, #aaa, #888);
}
#feedback-modal .fb-thanks {
  display: none;
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: 18px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  box-sizing: border-box;
}
#feedback-modal .fb-thanks.shown { display: flex; }
#feedback-modal .fb-thanks-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #4ade80;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
#feedback-modal .fb-thanks-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 8px;
}
#feedback-modal .fb-thanks-sub {
  font-size: 0.9rem;
  color: #666;
}

@media (max-width: 600px) {
  /* 2/6/2026, 2x2 גם במובייל (בקשת עומר), במקום 4 שורות אחת מתחת לשנייה. */
  #feedback-modal .fb-types { grid-template-columns: repeat(2, 1fr); }
  #feedback-modal .fb-type { flex-direction: column; justify-content: center; gap: 5px; padding: 12px 6px; }
}
