/* בונה טיימר לאירועים — עיצוב חזית
   כל הכללים ממודרים תחת #evt-timer-app כדי לא להשפיע על שאר העמוד. */

#evt-timer-app {
  --gold: #c9a227;
  --gold-deep: #8a6d12;
  --ink: #2b2722;
  --muted: #8a8275;
  --border: #ece7dc;
  --serif: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --sans: "Assistant", "Arial Hebrew", "Segoe UI", system-ui, sans-serif;

  font-family: var(--sans);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  direction: rtl;
  max-width: 100%;
}

#evt-timer-app * { box-sizing: border-box; }

/* פס התקדמות */
#evt-timer-app .etb-steps {
  display: flex; gap: 8px; align-items: center;
  margin: 0 auto 14px; max-width: 520px; width: 100%;
}
#evt-timer-app .etb-steps .seg {
  flex: 1; height: 6px; border-radius: 999px;
  background: var(--border); overflow: hidden;
}
#evt-timer-app .etb-steps .seg i {
  display: block; height: 100%; width: 0;
  background: var(--gold);
  transition: width 0.35s ease;
}
#evt-timer-app .etb-steps .seg.done i,
#evt-timer-app .etb-steps .seg.active i { width: 100%; }

#evt-timer-app .etb-step-label {
  text-align: center; color: var(--muted);
  font-size: 13px; margin-bottom: 16px;
}

/* כרטיס */
#evt-timer-app .etb-card {
  width: 100%; max-width: 560px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

#evt-timer-app .etb-panel { display: none; }
#evt-timer-app .etb-panel.active { display: block; }
#evt-timer-app .etb-panel h2 {
  font-family: var(--serif); font-size: 23px; font-weight: 700;
  margin: 0 0 4px; color: var(--ink); line-height: 1.3;
}
#evt-timer-app .etb-panel .sub {
  color: var(--muted); font-size: 15px; margin: 0 0 20px;
}

/* שדות */
#evt-timer-app .etb-field { margin-bottom: 16px; }
#evt-timer-app .etb-field .row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 7px;
}
#evt-timer-app label { font-size: 14px; font-weight: 600; color: var(--ink); }
#evt-timer-app .count { font-size: 12px; color: var(--muted); }

#evt-timer-app input[type=text],
#evt-timer-app input[type=email],
#evt-timer-app input[type=datetime-local],
#evt-timer-app textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #ddd5c7;
  border-radius: 11px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#evt-timer-app input:focus,
#evt-timer-app textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}
#evt-timer-app textarea { resize: vertical; min-height: 84px; }
#evt-timer-app input.invalid {
  border-color: #d9534f;
  box-shadow: 0 0 0 3px rgba(217,83,79,0.15);
}

#evt-timer-app .etb-err {
  display: none; color: #c0392b;
  font-size: 12.5px; font-weight: 600; margin-top: 6px;
}
#evt-timer-app .etb-err.show { display: block; }

/* העלאת קבצים */
#evt-timer-app .etb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) {
  #evt-timer-app .etb-two { grid-template-columns: 1fr; }
}
#evt-timer-app .etb-upload {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 46px; cursor: pointer;
  font-size: 14px; font-weight: 400;
  border-radius: 11px;
  border: 1.5px dashed #d7cfc0;
  background: #fbf9f4;
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: center; padding: 0 8px;
}
#evt-timer-app .etb-upload:hover { border-color: rgba(201,162,39,0.55); }
#evt-timer-app .etb-upload.filled {
  border-style: solid;
  border-color: rgba(201,162,39,0.4);
  background: rgba(201,162,39,0.1);
  color: var(--gold-deep);
  font-weight: 600;
}

/* צבעים */
#evt-timer-app .etb-cp-label {
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin-bottom: 8px;
}
#evt-timer-app .etb-color-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
#evt-timer-app input[type=color] {
  width: 48px; height: 40px; padding: 3px;
  border: 1px solid #ddd5c7; border-radius: 10px;
  background: #fff; cursor: pointer;
}
#evt-timer-app .etb-swatches { display: flex; gap: 8px; }
#evt-timer-app .etb-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ddd5c7;
  cursor: pointer; padding: 0;
}
#evt-timer-app .etb-swatch.active { box-shadow: 0 0 0 2px var(--gold); }

/* שורת התמונה: כפתור העלאה + אפשרויות תצוגה, זה לצד זה */
#evt-timer-app .etb-img-row {
  display: flex; align-items: stretch; gap: 8px;
}
#evt-timer-app .etb-img-row .etb-upload { flex: 1; min-width: 0; }

#evt-timer-app .etb-fit-pills {
  display: flex; gap: 4px; flex: 0 0 auto;
  background: #f4efe4;
  border: 1px solid #ddd5c7;
  border-radius: 11px;
  padding: 3px;
}
#evt-timer-app .etb-fit-pills button {
  border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--muted);
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}
#evt-timer-app .etb-fit-pills button:hover { color: var(--ink); }
#evt-timer-app .etb-fit-pills button.active {
  background: #fff;
  color: var(--gold-deep);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
@media (max-width: 520px) {
  #evt-timer-app .etb-img-row { flex-direction: column; }
  #evt-timer-app .etb-fit-pills { justify-content: stretch; }
  #evt-timer-app .etb-fit-pills button { flex: 1; padding: 9px 8px; }
}

/* המשפט בתצוגה המקדימה */
#evt-timer-app .etb-cp-msg {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  max-height: 35px;          /* בערך שתי שורות */
  overflow: hidden;
  color: var(--cptxt, #e8c766);
  opacity: 0.9;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
  word-break: break-word;
}
/* מוסתר רק כשאין משפט — נשלט מה-JS, לא ב-:empty */
#evt-timer-app .etb-cp-msg.is-hidden { display: none; }

/* תצוגה מקדימה חיה של צבע הטקסט (מציגה גם את תמונת הרקע) */
#evt-timer-app .etb-color-preview {
  position: relative;
  background-color: #14100c;
  border: 1px solid var(--line, #ece7dc);
  border-radius: 14px;
  padding: 18px 14px 16px;
  margin-bottom: 12px;
  text-align: center;
  overflow: hidden;
  transition: color 0.15s ease;
}
/* שכבת הכהיה — בדיוק כמו בטיימר האמיתי, כדי שהטקסט יישאר קריא */
#evt-timer-app .etb-color-preview.has-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 30%, rgba(20,16,12,0.45), rgba(12,9,6,0.82));
}
#evt-timer-app .etb-color-preview > * { position: relative; }
#evt-timer-app .etb-cp-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--cptxt, #e8c766);
  margin-bottom: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
#evt-timer-app .etb-cp-boxes {
  display: flex; gap: 6px; justify-content: center; direction: ltr;
}
#evt-timer-app .etb-cp-box {
  flex: 1; max-width: 70px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(232,199,102,0.22);
  border-radius: 9px;
  padding: 7px 3px 5px;
}
#evt-timer-app .etb-cp-box b {
  display: block; font-size: 18px; font-weight: 800; line-height: 1;
  color: var(--cptxt, #e8c766);
  font-variant-numeric: tabular-nums;
}
#evt-timer-app .etb-cp-box span {
  display: block; margin-top: 3px; font-size: 9.5px;
  color: var(--cptxt, #e8c766); opacity: 0.72;
}

/* תצוגה מקדימה */
#evt-timer-app .etb-preview-wrap {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--border);
}
#evt-timer-app .etb-preview {
  position: relative; aspect-ratio: 16/10; min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  background: #14100c;
  background-size: cover; background-position: center;
}
#evt-timer-app .etb-preview .ov {
  position: absolute; inset: 0;
  background: radial-gradient(120% 120% at 50% 30%, rgba(20,16,12,0.45), rgba(12,9,6,0.82));
}
#evt-timer-app .etb-preview .inner {
  position: relative; text-align: center; padding: 20px; width: 100%;
}
#evt-timer-app .etb-preview .ttl {
  font-family: var(--serif); font-weight: 700;
  color: var(--ptxt, #e8c766);
  font-size: clamp(19px, 4vw, 29px);
  text-shadow: 0 2px 24px rgba(0,0,0,0.55);
  margin-bottom: 15px;
}
#evt-timer-app .etb-boxes {
  display: flex; gap: 8px; justify-content: center; direction: ltr;
}
#evt-timer-app .etb-pbox {
  flex: 1; max-width: 92px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(232,199,102,0.3);
  border-radius: 12px; padding: 10px 4px;
}
#evt-timer-app .etb-pbox b {
  display: block; font-size: clamp(19px, 4vw, 29px); font-weight: 800;
  color: var(--ptxt, #f7f3ea); font-variant-numeric: tabular-nums;
}
#evt-timer-app .etb-pbox span {
  display: block; margin-top: 5px; font-size: 11px;
  color: var(--ptxt, #f7f3ea); opacity: 0.7;
}
#evt-timer-app .etb-pmsg {
  margin-top: 15px; color: var(--ptxt, #f7f3ea); opacity: 0.92;
  font-size: 14px; white-space: pre-wrap;
}
#evt-timer-app .etb-psite {
  display: none; margin-top: 12px;
  color: rgba(232,199,102,0.85); text-decoration: none;
  font-size: 12px;
}
#evt-timer-app .etb-psite.show { display: inline-block; }
#evt-timer-app .etb-psite:hover { text-decoration: underline; }
#evt-timer-app .etb-pcelebrate {
  font-family: var(--serif); font-weight: 700;
  color: var(--ptxt, #e8c766); font-size: clamp(22px, 5vw, 38px);
}
#evt-timer-app .etb-preview-foot {
  padding: 13px 16px; background: #fff;
  color: var(--muted); font-size: 12.5px; text-align: center;
}

/* אישור דיוור */
#evt-timer-app .etb-consent {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 16px; font-size: 13.5px;
  color: var(--ink); cursor: pointer; line-height: 1.45;
  font-weight: 400;
}
#evt-timer-app .etb-consent input {
  margin-top: 2px; width: 17px; height: 17px;
  accent-color: var(--gold); cursor: pointer; flex: 0 0 auto;
}

/* ניווט */
#evt-timer-app .etb-nav { display: flex; gap: 12px; margin-top: 22px; }
#evt-timer-app .etb-btn {
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; border-radius: 11px; padding: 12px 18px;
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  transition: background 0.15s ease, transform 0.05s ease;
}
#evt-timer-app .etb-btn:hover { background: #f6f2ea; }
#evt-timer-app .etb-btn:active { transform: translateY(1px); }
#evt-timer-app .etb-btn.ghost { flex: 0 0 auto; }
#evt-timer-app .etb-btn.primary {
  flex: 1; border: 0; color: #fff;
  background: var(--gold);
  box-shadow: 0 8px 26px -10px rgba(0,0,0,0.35);
}
#evt-timer-app .etb-btn.primary:hover { filter: brightness(1.06); background: var(--gold); }
#evt-timer-app .etb-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* הודעות */
#evt-timer-app .etb-toast {
  position: fixed; bottom: 22px; inset-inline-start: 50%;
  transform: translateX(50%);
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 11px;
  font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 99999;
}
#evt-timer-app .etb-toast.show { opacity: 1; }
#evt-timer-app .etb-toast.err { background: #8a2f2f; }
