/* ═══════════════════════════════════════════════════
   NHN Creator — Wizard & Index
   עובד עם או בלי nhn-local-theme
   פונט: Nunito (כמו האתר)
   צבעים: Navy #1A3A6B · Lime #7EC820 · Cyan #00B4D8
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

/* ── CSS variables — standalone, לא תלוי בתבנית ── */
.nhn-creator, .nhn-creator *,
.nhn-index,   .nhn-index   * {
  --lime:   #7EC820;
  --navy:   #1A3A6B;
  --cyan:   #00B4D8;
  --dark:   #111318;
  --white:  #FFFFFF;
  --bg:     #F4F7F2;       /* light neutral — עובד על כל רקע */
  --surface:#FFFFFF;
  --border: #C8D5C0;
  --muted:  #4B5563;
  --label:  #1A3A6B;       /* label = navy — תמיד גלוי */
  --ph:     #9CA3AF;       /* placeholder — אפור בהיר על לבן */
  --r:      12px;
  font-family: 'Nunito', sans-serif !important;
  box-sizing: border-box;
}

/* ══ WRAPPER ══ */
.nhn-creator {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  color: var(--dark);
  direction: rtl;
}

/* ══ STEP INDICATOR ══ */
.nhn-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 44px;
  direction: ltr;   /* ← FIX: מונע היפוך RTL — 1,2,3,4 בסדר הנכון */
}
.nhn-step {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  opacity: .35; transition: opacity .2s;
}
.nhn-step.active, .nhn-step.done { opacity: 1; }
.nhn-step-num {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid #C8D5C0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 15px; color: #9CA3AF;
  transition: all .2s; font-family: 'Nunito', sans-serif;
}
.nhn-step.active .nhn-step-num {
  background: var(--navy); border-color: var(--navy);
  color: #fff; box-shadow: 0 4px 14px rgba(26,58,107,.3);
}
.nhn-step.done .nhn-step-num {
  background: var(--lime); border-color: var(--lime); color: #fff;
}
.nhn-step-label {
  font-size: 11px; font-weight: 700;
  color: #9CA3AF; white-space: nowrap;
  font-family: 'Nunito', sans-serif;
}
.nhn-step.active .nhn-step-label { color: var(--navy); }
.nhn-step-line {
  flex: 1; height: 2px;
  min-width: 28px; max-width: 56px;
  background: #E5E7EB;
  margin-bottom: 24px;
  flex-shrink: 1;
}

/* ══ PANELS ══ */
.nhn-panel { display: none; }
.nhn-panel.active { display: block; }
.nhn-panel-title {
  font-size: 26px; font-weight: 900;
  color: var(--navy); margin-bottom: 6px;
  font-family: 'Nunito', sans-serif;
}
.nhn-panel-sub {
  font-size: 14px; color: var(--muted); margin-bottom: 28px;
  font-family: 'Nunito', sans-serif;
}

/* ══ FORM FIELDS ══ */
.nhn-field-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; margin-bottom: 28px;
}
@media(max-width:600px) { .nhn-field-grid { grid-template-columns: 1fr; } }
.nhn-field-full { grid-column: 1 / -1; }

/* LABEL — navy, תמיד גלוי */
.nhn-field label {
  display: block !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--navy) !important;
  margin-bottom: 7px !important;
  font-family: 'Nunito', sans-serif !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* INPUT — light style, placeholder גלוי */
.nhn-field input,
.nhn-field select,
.nhn-field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border) !important;
  border-radius: var(--r) !important;
  font-size: 15px !important; font-weight: 500 !important;
  color: var(--dark) !important;
  background: var(--surface) !important;
  outline: none !important;
  transition: border-color .15s, box-shadow .15s;
  direction: rtl;
  font-family: 'Nunito', sans-serif !important;
  -webkit-appearance: none;
  box-shadow: none !important;
}
.nhn-field input::placeholder,
.nhn-field textarea::placeholder {
  color: var(--ph) !important;   /* #9CA3AF — אפור על לבן, תמיד גלוי */
  font-weight: 400 !important;
  opacity: 1 !important;
}
.nhn-field input:focus,
.nhn-field select:focus,
.nhn-field textarea:focus {
  border-color: var(--navy) !important;
  box-shadow: 0 0 0 3px rgba(26,58,107,.12) !important;
  outline: none !important;
}
.nhn-field select {
  color: var(--dark) !important;
  cursor: pointer;
}
.nhn-field-hint {
  font-size: 12px; color: var(--muted); margin-top: 6px;
  font-family: 'Nunito', sans-serif;
}

/* ══ BUTTONS ══ */
.nhn-btn {
  display: inline-flex !important;
  align-items: center !important; justify-content: center !important;
  gap: 8px; padding: 14px 28px;
  border-radius: 50px !important;
  font-size: 15px !important; font-weight: 800 !important;
  cursor: pointer; border: none !important;
  transition: all .15s; text-decoration: none; line-height: 1;
  font-family: 'Nunito', sans-serif !important;
}
.nhn-btn:active { transform: scale(.97); }

.nhn-btn-primary {
  background: var(--navy) !important;
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(26,58,107,.3);
}
.nhn-btn-primary:hover { background: #1e4585 !important; color: #fff !important; transform: translateY(-1px); }

.nhn-btn-ghost {
  background: transparent !important;
  border: 2px solid var(--border) !important;
  color: var(--muted) !important;
}
.nhn-btn-ghost:hover { border-color: var(--navy) !important; color: var(--navy) !important; }

.nhn-btn-gold {
  background: linear-gradient(135deg,#C9A84C,#E8C97A) !important;
  color: #1A0A00 !important;
  font-size: 17px; padding: 16px 36px;
  box-shadow: 0 4px 20px rgba(201,168,76,.3);
}
.nhn-btn-wa {
  background: rgba(37,211,102,.12) !important;
  border: 2px solid rgba(37,211,102,.3) !important;
  color: #15803D !important;
}
.nhn-btn-sm { padding: 9px 18px !important; font-size: 13px !important; }
.nhn-btn-full { width: 100% !important; justify-content: center !important; border-radius: 12px !important; }
.nhn-actions { margin-top: 24px; display: flex; justify-content: flex-end; }
.nhn-actions-between { justify-content: space-between; }

/* ══ TYPE SELECTION CARDS ══ */
.nhn-type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 28px; }
@media(max-width:600px) { .nhn-type-grid { grid-column: 1fr; } }
.nhn-type-card {
  border: 2px solid var(--border); border-radius: 16px; padding: 22px 16px;
  cursor: pointer; background: #fff; text-align: center; transition: all .15s;
}
.nhn-type-card:hover   { border-color: var(--navy); }
.nhn-type-card.selected { border-color: var(--navy); background: #EEF2FF; box-shadow: 0 4px 20px rgba(26,58,107,.1); }
.nhn-type-icon  { font-size: 34px; margin-bottom: 8px; }
.nhn-type-name  { font-size: 15px; font-weight: 900; color: var(--navy); margin-bottom: 6px; font-family: 'Nunito', sans-serif; }
.nhn-type-desc  { font-size: 12px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; font-family: 'Nunito', sans-serif; }
.nhn-type-url   { font-size: 10px; color: var(--lime); background: rgba(126,200,32,.1); border-radius: 4px; padding: 3px 8px; margin-bottom: 8px; direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nhn-price-free    { color: #15803D; font-weight: 800; font-size: 13px; }
.nhn-price-sep     { color: #D1D5DB; margin: 0 4px; }
.nhn-price-premium { color: var(--navy); font-weight: 800; font-size: 13px; }
.nhn-price-bundle  { color: #92400E; font-weight: 800; font-size: 13px; }

/* ══ PREVIEW ══ */
.nhn-preview-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; margin-bottom: 28px; }
@media(max-width:640px) { .nhn-preview-wrap { grid-template-columns: 1fr; } }
.nhn-preview-phone { background: #1C1C2E; border-radius: 32px; padding: 13px; box-shadow: 0 16px 48px rgba(0,0,0,.3); position: sticky; top: 20px; }
.nhn-preview-screen { border-radius: 22px; overflow: hidden; min-height: 340px; background: #111; }
.nhn-edit-title { font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: var(--navy); margin-bottom: 16px; font-family: 'Nunito', sans-serif; }
.nhn-edit-field { margin-bottom: 16px; }
.nhn-edit-field label { display: block; font-size: 12px; font-weight: 800; color: var(--navy) !important; margin-bottom: 6px; font-family: 'Nunito', sans-serif; }
.nhn-edit-field input, .nhn-edit-field textarea { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: 8px; font-size: 14px; direction: rtl; color: var(--dark); background: #fff; outline: none; transition: border-color .15s; font-family: 'Nunito', sans-serif; }
.nhn-edit-field input::placeholder { color: var(--ph) !important; }
.nhn-edit-field input:focus, .nhn-edit-field textarea:focus { border-color: var(--navy); }
.nhn-edit-field textarea { resize: vertical; }

/* ══ SUCCESS ══ */
.nhn-success-wrap { text-align: center; padding: 44px 24px; border: 2px dashed var(--lime); border-radius: 20px; margin-bottom: 24px; background: rgba(126,200,32,.04); }
.nhn-success-icon { font-size: 56px; margin-bottom: 16px; }
.nhn-success-wrap h2 { font-size: 28px; font-weight: 900; color: var(--navy); margin-bottom: 12px; font-family: 'Nunito', sans-serif; }
.nhn-success-url { font-size: 15px; color: var(--lime); margin-bottom: 24px; word-break: break-all; }
.nhn-success-url a { color: var(--lime); text-decoration: underline; }
.nhn-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.nhn-upgrade-wrap { border: 2px solid #E5E7EB; border-radius: 20px; padding: 36px; text-align: center; margin-bottom: 24px; background: var(--navy); color: #fff; }
.nhn-upgrade-badge { display: inline-block; background: rgba(201,168,76,.2); border: 1px solid rgba(201,168,76,.4); color: #E8C97A; font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; padding: 5px 14px; border-radius: 4px; margin-bottom: 16px; }
.nhn-upgrade-wrap h3 { font-size: 22px; font-weight: 900; margin-bottom: 20px; line-height: 1.3; font-family: 'Nunito', sans-serif; }
.nhn-upgrade-list { list-style: none; text-align: right; max-width: 340px; margin: 0 auto 28px; }
.nhn-upgrade-list li { font-size: 14px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
.nhn-upgrade-list li:last-child { border: none; }
.nhn-upgrade-skip { margin-top: 14px; }
.nhn-upgrade-skip a { color: rgba(255,255,255,.4); font-size: 13px; }

/* ══ INDEX ══ */
.nhn-index { max-width: 1160px; margin: 0 auto; padding: 40px 24px 80px; color: var(--dark); direction: rtl; }
.nhn-index-filters { margin-bottom: 28px; }
.nhn-filter-form { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.nhn-filter-input { display: block; padding: 12px 16px; background: #fff; border: 2px solid var(--border); border-radius: 10px; font-size: 14px; flex: 1; min-width: 160px; direction: rtl; color: var(--dark); outline: none; transition: border-color .15s; font-family: 'Nunito', sans-serif; }
.nhn-filter-input::placeholder { color: var(--ph) !important; }
.nhn-filter-input:focus { border-color: var(--navy); }
.nhn-filter-city { max-width: 200px; }
.nhn-filter-industries { display: flex; flex-wrap: wrap; gap: 8px; }
.nhn-industry-chip { padding: 7px 16px; background: #fff; border: 2px solid var(--border); border-radius: 50px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .15s; text-decoration: none; white-space: nowrap; font-family: 'Nunito', sans-serif; }
.nhn-industry-chip:hover { border-color: var(--navy); color: var(--navy); }
.nhn-industry-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.nhn-index-stats { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 2px solid #E5E7EB; }
.nhn-stat-count { font-size: 30px; font-weight: 900; color: var(--navy); font-family: 'Nunito', sans-serif; }
.nhn-stat-label { font-size: 14px; color: var(--muted); font-family: 'Nunito', sans-serif; }
.nhn-stat-cta { margin-right: auto; background: var(--lime); color: #fff; padding: 10px 22px; border-radius: 50px; font-weight: 800; font-size: 13px; text-decoration: none; transition: all .15s; font-family: 'Nunito', sans-serif; }
.nhn-stat-cta:hover { background: #6db318; }

/* Phone card grid */
.nhn-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 16px; margin-bottom: 40px; }
.nhn-index-card { position: relative; background: #fff; border: 2px solid #E5E7EB; border-radius: 24px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.nhn-index-card:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(26,58,107,.15); border-color: var(--navy); }
.nhn-card-topbar { height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; background: var(--navy); flex-shrink: 0; }
.nhn-card-topbar-dots { display: flex; gap: 3px; }
.nhn-card-topbar-dot  { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.25); }
.nhn-card-topbar-dot.on { background: var(--lime); }
.nhn-card-topbar-time { font-size: 8px; color: rgba(255,255,255,.4); }
.nhn-card-hero { padding: 14px 12px 10px; text-align: center; position: relative; }
.nhn-card-avatar { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; color: #fff; overflow: hidden; border: 2px solid rgba(255,255,255,.4); }
.nhn-card-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nhn-card-name  { font-size: 12px; font-weight: 900; color: #fff; line-height: 1.2; margin-bottom: 2px; font-family: 'Nunito', sans-serif; }
.nhn-card-role  { font-size: 9px; color: rgba(255,255,255,.55); text-transform: uppercase; }
.nhn-card-city  { font-size: 9px; color: rgba(255,255,255,.4); margin-top: 3px; }
.nhn-card-badge { position: absolute; top: 8px; right: 8px; background: #C9A84C; color: #fff; font-size: 7px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; }
.nhn-card-actions { display: flex; justify-content: center; gap: 6px; padding: 8px 10px; background: rgba(0,0,0,.08); flex-shrink: 0; }
.nhn-card-action { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; text-decoration: none; transition: transform .15s; border: none; }
.nhn-card-action:hover { transform: scale(1.1); }
.nhn-card-action-phone { background: var(--navy); }
.nhn-card-action-wa    { background: #25D366; }
.nhn-card-footer { padding: 7px 12px; background: #F9FAFB; border-top: 1px solid #F3F4F6; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.nhn-card-footer-cta   { font-size: 9px; font-weight: 800; color: var(--navy); background: rgba(26,58,107,.07); padding: 3px 8px; border-radius: 50px; font-family: 'Nunito', sans-serif; }
.nhn-card-footer-brand { font-size: 8px; color: #9CA3AF; font-family: 'Nunito', sans-serif; }
.nhn-card-footer-brand strong { color: rgba(126,200,32,.7); }

/* industry hero gradients */
.nhi-beauty     { background: linear-gradient(160deg,#4A1040,#1A0A1A); }
.nhi-barber     { background: linear-gradient(160deg,#1A1408,#0A0A0A); }
.nhi-health     { background: linear-gradient(160deg,#0A3A5C,#041828); }
.nhi-legal      { background: linear-gradient(160deg,#2A2010,#14100A); }
.nhi-home       { background: linear-gradient(160deg,#0A1E3C,#04101E); }
.nhi-food       { background: linear-gradient(160deg,#3C1400,#1C0800); }
.nhi-tech       { background: linear-gradient(160deg,#1A0A3C,#0A0520); }
.nhi-fitness    { background: linear-gradient(160deg,#3C0A0A,#1C0404); }
.nhi-events     { background: linear-gradient(160deg,#2A0A3C,#140520); }
.nhi-realestate { background: linear-gradient(160deg,#0A1A3C,#050E20); }
.nhi-finance    { background: linear-gradient(160deg,#0A2A1A,#04140C); }
.nhi-default    { background: linear-gradient(160deg,#1A3A6B,#0f2040); }

.nhn-index-empty { text-align: center; padding: 60px 20px; color: var(--muted); font-family: 'Nunito', sans-serif; }
.nhn-index-cta { text-align: center; padding: 44px 24px; background: var(--navy); border-radius: 20px; color: #fff; }
.nhn-index-cta-text { font-size: 20px; font-weight: 800; margin-bottom: 8px; font-family: 'Nunito', sans-serif; }
.nhn-index-cta-sub  { font-size: 14px; color: rgba(255,255,255,.65); margin-bottom: 20px; font-family: 'Nunito', sans-serif; }

/* error */
.nhn-error { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; font-weight: 700; font-family: 'Nunito', sans-serif; }

/* partner chip */
.nhn-agent-chip { font-size: 10px; color: var(--cyan); font-weight: 700; border: 1px solid rgba(0,180,216,.3); border-radius: 3px; padding: 1px 6px; margin-top: 4px; display: inline-block; }

@media(max-width:480px) {
  .nhn-panel-title { font-size: 20px; }
  .nhn-success-actions { flex-direction: column; align-items: stretch; }
  .nhn-index-grid { grid-template-columns: repeat(2,1fr); }
}

/* ══ OVERRIDE — specificity מקסימלי לתיקון בעיות theme ══ */
div.nhn-creator div.nhn-field label,
div.nhn-creator div.nhn-field-full label,
#nhn-creator .nhn-field label {
  color: #1A3A6B !important;
  background: transparent !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  margin-bottom: 7px !important;
  padding: 0 !important;
  position: static !important;
}

div.nhn-creator input::placeholder,
div.nhn-creator textarea::placeholder,
div.nhn-creator select::placeholder,
#nhn-creator input::placeholder {
  color: #9CA3AF !important;
  opacity: 1 !important;
}

div.nhn-creator input,
div.nhn-creator select,
div.nhn-creator textarea,
#nhn-creator .nhn-field input,
#nhn-creator .nhn-field select {
  color: #111318 !important;
  background-color: #FFFFFF !important;
  border: 2px solid #C8D5C0 !important;
  border-radius: 12px !important;
}

/* Steps RTL fix */
#nhn-creator .nhn-steps,
div.nhn-creator .nhn-steps {
  direction: ltr !important;
  unicode-bidi: embed !important;
}
