/* ==========================================================================
   REATS · רשימת מועדים ציבורית — שורות אופקיות נקיות
   כל שורה: תאריך+שעה, מחיר/אפשרויות מחיר, בורר משתתפים וכפתור רכישה.
   + פופאפ "כל התאריכים" + בר רכישה צף. צבעי REATS בלבד.
   ========================================================================== */

.exp-dl {
  --dl-brand: var(--exp-ink, #0c3c1e);
  --dl-brand-soft: var(--exp-accent-soft, #f1f7e9);
  --dl-success: var(--exp-success, #2f7d3f);
  --dl-ink: var(--exp-ink, #0c3c1e);
  --dl-ink-soft: var(--exp-ink-soft, #335a44);
  --dl-ink-muted: var(--exp-ink-muted, #5a7a64);
  --dl-border: var(--exp-card-border, rgba(12, 60, 30, 0.10));
  margin: 0;
}

/* מרווח קטן לסקציית המועדים בראש התוכן — לא לתפוס יותר מדי מקום */
.exp-dates-top { margin-bottom: clamp(18px, 3.5vw, 30px); }
.exp-dates-top__head { margin-bottom: 12px; }

.exp-dl__rows {
  display: grid;
  gap: 10px;
}

/* --- שורת מועד (דו-מפלסית: תאריך+מחיר למעלה, סה"כ+פעולות למטה) --- */
.exp-dl-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: 16px;
  padding-inline: 22px 18px;
  background:
    linear-gradient(180deg, rgba(241, 247, 233, 0.55) 0%, rgba(255, 255, 255, 0) 42%),
    var(--exp-card-bg, #fff);
  border: 1px solid var(--dl-border);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(12, 60, 30, 0.05);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
/* פס מבטא צבעוני בקצה ההתחלה (RTL = ימין) */
.exp-dl-row::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--dl-success) 0%, var(--exp-ink, #0c3c1e) 100%);
}
@media (hover: hover) {
  .exp-dl-row:not(.is-unavailable):hover {
    border-color: rgba(47, 125, 63, 0.4);
    box-shadow: 0 10px 26px rgba(12, 60, 30, 0.12);
    transform: translateY(-2px);
  }
}
.exp-dl-row.is-unavailable { opacity: 0.62; }
.exp-dl-row.is-unavailable::before { background: var(--dl-ink-muted); }

/* מפלס עליון */
.exp-dl-row__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.exp-dl-row__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 220px;
  min-width: 0;
}
.exp-dl-row__cal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  background: linear-gradient(140deg, var(--dl-brand-soft) 0%, #e4f0d8 100%);
  color: var(--dl-success);
  box-shadow: inset 0 0 0 1px rgba(47, 125, 63, 0.12);
}
.exp-dl-row__when { min-width: 0; }
.exp-dl-row__day {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dl-ink);
  line-height: 1.25;
  white-space: nowrap;
}
.exp-dl-row__sub {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 3px;
}
.exp-dl-row__time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dl-ink-soft);
}
.exp-dl-row__status {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(90, 122, 100, 0.14);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--dl-ink-muted);
}

/* מחיר יחיד (ללא אפשרויות) */
.exp-dl-row__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
}
.exp-dl-row__amount { font-size: 1.35rem; font-weight: 800; color: var(--dl-ink); line-height: 1; }
.exp-dl-row__per { font-size: 0.82rem; font-weight: 600; color: var(--dl-ink-muted); }

/* אפשרויות מחיר (למשתתף / לזוג וכו') */
.exp-dl-row__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exp-dl-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--dl-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.exp-dl-opt.is-selected {
  border-color: var(--dl-success);
  box-shadow: 0 0 0 2px rgba(47, 125, 63, 0.15);
  background: rgba(47, 125, 63, 0.05);
}
.exp-dl-opt input {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--dl-success);
  cursor: pointer;
}
.exp-dl-opt__label { font-weight: 700; color: var(--dl-ink); font-size: 0.86rem; }
.exp-dl-opt__amount { font-weight: 800; color: var(--dl-success); font-size: 0.86rem; white-space: nowrap; }

/* מפלס תחתון — סה"כ (בשורה נפרדת) + פעולות */
.exp-dl-row__bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--dl-border);
}
.exp-dl-row__total {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--dl-brand-soft) 0%, #e7f2dc 100%);
  white-space: nowrap;
}
.exp-dl-row__total--empty { background: transparent; padding: 0; }
.exp-dl-row__total-lbl { font-size: 0.82rem; font-weight: 600; color: var(--dl-ink-soft); }
.exp-dl-row__total-val { font-size: 1.25rem; font-weight: 800; color: var(--dl-success); }

/* פעולות: בורר משתתפים + כפתור רכישה */
.exp-dl-row__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}
.exp-dl-card__qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--dl-border);
  border-radius: 999px;
  background: #fff;
}
.exp-dl-card__qty[hidden] { display: none !important; }
.exp-dl-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--dl-brand-soft);
  color: var(--dl-success);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease, opacity 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.exp-dl-step:hover { background: rgba(47, 125, 63, 0.18); }
.exp-dl-step:active { transform: scale(0.92); }
.exp-dl-step:disabled { opacity: 0.4; cursor: not-allowed; }
.exp-dl-qty-val {
  width: 32px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--dl-ink);
  padding: 0;
}
.exp-dl-qty-val:focus { outline: none; }

.exp-dl-row__cta { white-space: nowrap; gap: 6px; box-shadow: 0 4px 14px rgba(47, 125, 63, 0.24); }
.exp-dl-row__cta[disabled] { cursor: not-allowed; box-shadow: none; }

/* --- רספונסיביות --- */
/* דסקטופ: מסתירים כפתור "עוד" שרלוונטי רק למובייל (כשכל הכרטיסים כבר מוצגים) */
@media (min-width: 561px) {
  .exp-dl__more--mobile-only { display: none; }
}

/* מובייל: מצומצם וקומפקטי — עד 2 כרטיסים, השאר בפופאפ דרך הכפתור */
@media (max-width: 560px) {
  .exp-dl__rows { gap: 8px; }
  .exp-dl__rows > .exp-dl-row:nth-child(n + 3) { display: none; }

  .exp-dl-row {
    padding-block: 12px;
    padding-inline: 16px 13px;
    gap: 9px;
    border-radius: 14px;
  }
  .exp-dl-row::before { width: 4px; }
  .exp-dl-row__top { gap: 8px 12px; }
  .exp-dl-row__main { flex-basis: 160px; gap: 10px; }
  .exp-dl-row__cal { width: 38px; height: 38px; border-radius: 10px; }
  .exp-dl-row__cal svg { width: 17px; height: 17px; }
  .exp-dl-row__day { font-size: 0.94rem; }
  .exp-dl-row__sub { margin-top: 2px; }
  .exp-dl-row__time { font-size: 0.8rem; }
  .exp-dl-row__amount { font-size: 1.1rem; }
  .exp-dl-row__opts { width: 100%; gap: 7px; }
  .exp-dl-opt { padding: 7px 10px; gap: 6px; }
  .exp-dl-opt__label,
  .exp-dl-opt__amount { font-size: 0.8rem; }

  .exp-dl-row__bottom { padding-top: 10px; gap: 8px 10px; }
  .exp-dl-row__total { padding: 5px 10px; border-radius: 10px; }
  .exp-dl-row__total-lbl { font-size: 0.76rem; }
  .exp-dl-row__total-val { font-size: 1.05rem; }
  .exp-dl-row__actions { gap: 8px; }
  .exp-dl-step { width: 30px; height: 30px; font-size: 1.1rem; }
  .exp-dl-qty-val { width: 26px; font-size: 0.95rem; }
  .exp-dl-row__cta { padding-inline: 16px; }

  .exp-dl__more { margin-top: 8px; padding: 11px 14px; font-size: 0.9rem; }
}

/* --- כפתור "צפייה בכל התאריכים" --- */
.exp-dl__more {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--exp-ink, #0c3c1e) 0%, var(--dl-success, #2f7d3f) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(12, 60, 30, 0.18);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.exp-dl__more::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 620ms ease;
  pointer-events: none;
}
@media (hover: hover) {
  .exp-dl__more:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(12, 60, 30, 0.26);
    filter: brightness(1.06);
  }
  .exp-dl__more:hover::after { transform: translateX(120%); }
  .exp-dl__more:hover .exp-dl__more-arrow { transform: translateX(-5px); }
}
.exp-dl__more-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.exp-dl__more-text { flex: 1 1 auto; text-align: start; }
.exp-dl__more-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--exp-ink, #0c3c1e);
  font-size: 0.82rem;
  font-weight: 800;
}
.exp-dl__more-arrow { flex-shrink: 0; font-size: 1.1rem; line-height: 1; transition: transform 200ms ease; }

/* ==========================================================================
   בר רכישה צף — מעל הכל (חוץ מכפתור נגישות)
   ========================================================================== */
.exp-dl-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 99990;
  padding: 10px clamp(12px, 4vw, 20px) calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(12, 60, 30, 0.94), var(--exp-ink, #0c3c1e));
  box-shadow: 0 -8px 30px rgba(12, 60, 30, 0.28);
  transform: translateY(110%);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.exp-dl-bar[hidden] { display: block; }
.exp-dl-bar.is-visible { transform: translateY(0); }
.exp-dl-bar__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.exp-dl-bar__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: #fff;
}
.exp-dl-bar__date {
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exp-dl-bar__total { font-size: 1.05rem; font-weight: 700; color: #fff; }
.exp-dl-bar__total strong { font-size: 1.2rem; font-weight: 800; }
.exp-dl-bar__cta {
  flex-shrink: 0;
  background: #fff;
  color: var(--exp-ink, #0c3c1e);
  border: none;
  font-weight: 800;
}
.exp-dl-bar__cta:hover { background: #f1f7e9; }

/* כשהבר הצף פעיל — מסתירים את סרגל ה-CTA התחתון הישן במובייל */
body.has-dl-bar .exp-bottombar { display: none !important; }

/* כשפופאפ פתוח — מסתירים את הבר הצף כדי שלא יכסה את הפופאפ */
html.exp-modal-open .exp-dl-bar { display: none !important; }

@media (max-width: 520px) {
  .exp-dl-bar__total { font-size: 0.98rem; }
}
