/* =====================================================================
 * DL Academy — Šengen brojač 90/180 (samostalni stil)
 * Sve je u .dlsch prostoru i ne dira ostatak stranice domaćina.
 * Boje imaju fallback, pa komponenta izgleda isto na svakom sajtu.
 * ===================================================================== */
.dlsch {
  --s-white: var(--white, #ffffff);
  --s-bg: var(--bg2, #f0ede6);
  --s-line: var(--sand, #e0ddd6);
  --s-accent: var(--accent, #1a5c8a);
  --s-text: var(--text, #18181a);
  --s-mid: var(--text-mid, #484848);
  --s-soft: var(--text-soft, #8a8885);
  --s-in: #c0432f;
  --s-ok: #1a7a4a;
  --s-warn: #b8791a;
  --s-radius: 12px;
  --s-tap: 48px;

  font-family: inherit;
  color: var(--s-text);
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.55;
  box-sizing: border-box;
}
.dlsch *, .dlsch *::before, .dlsch *::after { box-sizing: border-box; }

.dlsch-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 8px; }
.dlsch-lead { color: var(--s-mid); margin: 0 0 22px; }

/* ---- brojke ---- */
.dlsch-stats { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 22px; }
.dlsch-stat {
  background: var(--s-white); border: 1px solid var(--s-line);
  border-radius: var(--s-radius); padding: 16px 18px;
}
.dlsch-stat-l {
  display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--s-soft); font-weight: 700;
}
.dlsch-stat-v { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.15; margin: 4px 0 2px; }
.dlsch-stat-s { display: block; font-size: .85rem; color: var(--s-mid); }
.dlsch-stat.is-ok .dlsch-stat-v { color: var(--s-ok); }
.dlsch-stat.is-low .dlsch-stat-v { color: var(--s-warn); }
.dlsch-stat.is-zero .dlsch-stat-v { color: var(--s-in); }
.dlsch-bar { height: 8px; border-radius: 99px; background: var(--s-bg); overflow: hidden; margin-top: 10px; }
.dlsch-bar-fill { height: 100%; background: currentColor; opacity: .75; }
.dlsch-stat.is-ok .dlsch-bar-fill { background: var(--s-ok); }
.dlsch-stat.is-low .dlsch-bar-fill { background: var(--s-warn); }
.dlsch-stat.is-zero .dlsch-bar-fill { background: var(--s-in); }

/* ---- redovi za unos: jedan red po ulasku ---- */
.dlsch-unosi { margin-bottom: 26px; }
.dlsch-uhead {
  display: none; gap: 10px; padding: 0 0 6px;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--s-soft); font-weight: 700;
}
.dlsch-ulista { display: grid; gap: 10px; }
.dlsch-ured {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px;
  background: var(--s-white); border: 1px solid var(--s-line);
  border-radius: var(--s-radius); padding: 12px 14px;
}
.dlsch-ured.is-bad { border-color: var(--s-in); }
.dlsch-ucell { display: block; min-width: 0; }
.dlsch-ulabel {
  display: block; font-size: .8rem; font-weight: 700;
  margin-bottom: 4px; color: var(--s-mid);
}
.dlsch-ucell input {
  width: 100%; min-width: 0; max-width: 100%;
  min-height: var(--s-tap); padding: 10px 12px; font: inherit;
  border: 1px solid var(--s-line); border-radius: 10px;
  background: var(--s-white); color: var(--s-text);
}
.dlsch-udana {
  grid-column: 1 / 2; align-self: center;
  font-weight: 700; color: var(--s-mid); font-size: .92rem;
}
.dlsch-ured.is-bad .dlsch-udana { color: var(--s-in); }
.dlsch-del {
  grid-column: 2 / 3; justify-self: end; align-self: center;
  min-height: 40px; padding: 8px 14px; font: inherit; font-size: .88rem;
  color: var(--s-mid); background: transparent; border: 1px solid var(--s-line);
  border-radius: 8px; cursor: pointer;
}
.dlsch-del:hover { color: var(--s-in); border-color: var(--s-in); }
.dlsch-uadd { margin-top: 12px; }
.dlsch-add {
  min-height: var(--s-tap); padding: 12px 22px; font: inherit; font-weight: 700;
  color: #fff; background: var(--s-accent); border: 0; border-radius: 10px; cursor: pointer;
}
.dlsch-add:hover { filter: brightness(1.08); }
.dlsch-err { color: var(--s-in); font-size: .9rem; margin: 8px 0 0; }
.dlsch-empty { color: var(--s-soft); margin: 0; }

/* ---- planer sledeceg ulaska ---- */
.dlsch-plan {
  background: var(--s-bg); border: 1px solid var(--s-line);
  border-radius: var(--s-radius); padding: 16px 18px; margin-bottom: 26px;
}
.dlsch-plan-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 4px; }
.dlsch-plan-lead { color: var(--s-mid); font-size: .92rem; margin: 0 0 12px; }
.dlsch-plan-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: end; }
.dlsch-plan-row .dlsch-ucell input { background: var(--s-white); }
.dlsch-plan-out { display: flex; flex-direction: column; justify-content: center; }
.dlsch-plan-l {
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--s-soft); font-weight: 700;
}
.dlsch-plan-v { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.dlsch-plan-s { font-size: .88rem; color: var(--s-mid); }
.dlsch-plan-out.is-ok .dlsch-plan-v,
.dlsch-plan-out.is-full .dlsch-plan-v { color: var(--s-ok); }
.dlsch-plan-out.is-low .dlsch-plan-v { color: var(--s-warn); }
.dlsch-plan-out.is-zero .dlsch-plan-v { color: var(--s-in); font-size: 1.05rem; }

/* ---- kalendar ---- */
.dlsch-cal-title { font-size: 1rem; font-weight: 700; margin: 0 0 10px; }
.dlsch-cal {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(12px, 1fr));
  gap: 3px; margin-bottom: 12px;
}
.dlsch-day {
  display: block; aspect-ratio: 1 / 1; min-width: 10px;
  border-radius: 3px; background: var(--s-bg); border: 1px solid var(--s-line);
}
.dlsch-day.is-in { background: var(--s-in); border-color: var(--s-in); }
.dlsch-day.is-today { outline: 2px solid var(--s-accent); outline-offset: 1px; }
.dlsch-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; font-size: .85rem; color: var(--s-mid); }
.dlsch-leg { display: inline-flex; align-items: center; gap: 7px; }
.dlsch-leg .dlsch-day { width: 12px; height: 12px; aspect-ratio: auto; flex: 0 0 auto; }

/* ---- dno ---- */
.dlsch-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.dlsch-tool {
  min-height: var(--s-tap); padding: 12px 18px; font: inherit; font-weight: 700;
  border-radius: 10px; cursor: pointer;
  background: var(--s-white); color: var(--s-accent); border: 1px solid var(--s-accent);
}
.dlsch-tool:hover { background: var(--s-accent); color: #fff; }
.dlsch-tool-ghost { color: var(--s-mid); border-color: var(--s-line); }
.dlsch-tool-ghost:hover { background: var(--s-bg); color: var(--s-in); border-color: var(--s-in); }
.dlsch-note {
  background: var(--s-bg); border-left: 3px solid var(--s-accent);
  padding: 12px 14px; border-radius: 0 8px 8px 0; color: var(--s-mid);
  font-size: .92rem; margin: 0 0 10px;
}
.dlsch-note-small { background: transparent; border-left: 0; padding: 0 0 0 2px; font-size: .85rem; color: var(--s-soft); }
.dlsch-brand { margin: 18px 0 0; font-size: .88rem; color: var(--s-soft); font-weight: 700; }
.dlsch-brand a { color: var(--s-accent); text-decoration: none; }
.dlsch-brand a:hover { text-decoration: underline; }

/* ---- veći ekrani ---- */
@media (min-width: 620px) {
  .dlsch-stats { grid-template-columns: repeat(3, 1fr); }
  .dlsch-uhead { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 120px 90px; padding-left: 14px; }
  .dlsch-ured { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 120px 90px; align-items: end; }
  .dlsch-ured .dlsch-ulabel { display: none; }
  .dlsch-udana { grid-column: auto; }
  .dlsch-del { grid-column: auto; justify-self: stretch; }
  .dlsch-plan-row { grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); }
  .dlsch-cal { grid-template-columns: repeat(auto-fill, minmax(16px, 1fr)); gap: 4px; }
}

/* ---- da plutajuca dugmad ne pokrivaju polja za unos ----
   Stranica sa brojacem je forma sa mnogo redova; plutajuci launcher je
   preko nje pokrivao po jedno polje. Na uskim ekranima se svodi na krug
   u samom uglu, a dnu se doda prostor da poslednji red nikad ne ostane
   zarobljen ispod njega. Vazi samo tamo gde brojac postoji. */
.dlsch { padding-bottom: 96px; }

@media (max-width: 680px) {
  body.dlsch-host #dl-ai .dl-ai-launcher-label { display: none; }
  body.dlsch-host #dl-ai .dl-ai-launcher {
    width: 52px; height: 52px; padding: 0; border-radius: 50%;
    justify-content: center;
  }
  body.dlsch-host #dl-ai { bottom: 16px !important; right: 10px !important; }
  body.dlsch-host .wa-float, body.dlsch-host .viber-float { opacity: .92; }
}
