/* CUS Terminarz szkoleń – wygląd jak DPCalendar (FullCalendar) na cus.com.pl */
.cus-terminarz { --cus-tz-line: #ddd; --cus-tz-accent: #596499; --cus-tz-num: 35px; --cus-tz-row: 31px; --cus-tz-min: 0.8px; position: relative; font-family: inherit; color: #333; margin: 0 0 30px; }
.cus-terminarz *, .cus-terminarz *::before, .cus-terminarz *::after { box-sizing: border-box; }
.cus-terminarz svg { width: 1em; height: 1em; fill: currentColor; display: block; }

/* przełącznik listy kalendarzy (strzałka nad kalendarzem) */
.cus-tz-toggle { display: block; margin: 0 auto 4px; width: 30px; height: 26px; padding: 4px 7px; border: 0; background: none; color: #333; cursor: pointer; font-size: 16px; }
.cus-tz-toggle.is-open svg { transform: rotate(180deg); }
.cus-tz-calendars { padding: 10px 14px; margin: 0 0 10px; border: 1px solid var(--cus-tz-line); background: #fafafa; font-size: 15px; line-height: 1.8; }
.cus-tz-cal { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.cus-tz-cal__dot { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.cus-tz-link { font-size: 13px; color: var(--cus-tz-accent); text-decoration: none; }

/* pasek narzędzi */
.cus-tz-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 24px; flex-wrap: wrap; }
.cus-tz-chunk { display: flex; align-items: center; gap: 0; }
.cus-tz-chunk--title { flex: 1 1 auto; justify-content: center; }
.cus-tz-title { margin: 0; padding: 4px 15px 0; font-family: 'Roboto Condensed', Arial, sans-serif; font-size: 19.5px; font-weight: 400; line-height: 38.57px; color: #333; text-transform: none; text-align: center; }
.cus-tz-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 37px; padding: 5px; margin: 0 0 0 3px; border: 1px solid #c0c0c0; border-radius: 0; background: #fefefe; color: #000; font: 400 16px/24px Roboto, Arial, sans-serif; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; }
.cus-tz-btn:hover { background: #f0f0f0; color: #000; }
.cus-tz-btn:disabled { opacity: .65; cursor: default; }
.cus-tz-btn svg { width: 18px; height: 18px; }
.cus-tz-group { display: inline-flex; }
.cus-tz-group .cus-tz-btn { margin: 0; border-radius: 0; }
.cus-tz-group .cus-tz-btn + .cus-tz-btn { margin-left: -1px; }
.cus-tz-view { padding: 5px 6px; height: 36px; }
.cus-tz-view + .cus-tz-view { margin-left: 3px; }
.cus-tz-view.is-active { border-color: #151e27; }
.cus-tz-dp { position: relative; display: inline-flex; }
.cus-tz-dpinput { position: absolute; left: 0; bottom: 0; width: 36px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }

/* widok miesiąca */
.cus-tz-month { border: 1px solid var(--cus-tz-line); }
.cus-tz-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--cus-tz-line); }
.cus-tz-hcell { text-align: center; font-weight: 700; font-size: 16px; line-height: 27.2px; color: var(--cus-tz-accent); padding: 2px 4px; border-left: 1px solid var(--cus-tz-line); }
.cus-tz-hcell:first-child { border-left: 0; }
.cus-tz-hcell a { color: inherit; text-decoration: none; }
.cus-tz-week { position: relative; min-height: 110px; border-top: 1px solid var(--cus-tz-line); }
.cus-tz-week:first-of-type { border-top: 0; }
.cus-tz-head + .cus-tz-week { border-top: 0; }
.cus-tz-days { display: grid; grid-template-columns: repeat(7, 1fr); min-height: 110px; }
.cus-tz-day { border-left: 1px solid var(--cus-tz-line); text-align: right; min-height: 110px; }
.cus-tz-day:first-child { border-left: 0; }
.cus-tz-day.is-today { background: rgba(255, 220, 40, .15); }
.cus-tz-num { display: inline-block; padding: 4px; font-size: 16px; line-height: 27.2px; color: var(--cus-tz-accent); text-decoration: none; position: relative; z-index: 2; }
.cus-tz-num:hover { text-decoration: underline; }
.cus-tz-day.is-other .cus-tz-num { opacity: .3; }
.cus-tz-evlayer { position: absolute; inset: 0; pointer-events: none; }
.cus-tz-evlayer > * { pointer-events: auto; }

/* wydarzenia */
.cus-tz-ev { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; font-size: 13.6px; line-height: 27.2px; padding: 0 4px; border: 1px solid; border-radius: 0; }
.cus-tz-ev:hover { filter: brightness(.95); text-decoration: none; }
.cus-tz-ev--bar { position: absolute; height: 29px; }
.cus-tz-month .cus-tz-ev--bar { white-space: normal; line-height: 13.6px; padding: 1px 4px; display: flex; align-items: center; height: 29px; }
.cus-tz-ev__time { font-weight: 400; margin-right: 3px; }
.cus-tz-ev__title { font-weight: 400; }
.cus-tz-more { position: absolute; font-size: 13px; line-height: 20px; color: var(--cus-tz-accent); text-decoration: none; }
.cus-tz-more:hover { text-decoration: underline; }

/* tydzień / dzień */
.cus-tz-time { border: 1px solid var(--cus-tz-line); }
.cus-tz-trow { display: flex; border-bottom: 1px solid var(--cus-tz-line); }
.cus-tz-axis { flex: 0 0 70px; border-right: 1px solid var(--cus-tz-line); font-size: 13px; color: #555; padding: 4px; text-align: right; }
.cus-tz-tcells { flex: 1 1 auto; position: relative; display: grid; }
.cus-tz-time--7 .cus-tz-tcells { grid-template-columns: repeat(7, 1fr); }
.cus-tz-time--1 .cus-tz-tcells { grid-template-columns: 1fr; }
.cus-tz-trow--head .cus-tz-hcell.is-today, .cus-tz-tcol.is-today { background: rgba(255, 220, 40, .15); }
.cus-tz-adcells { display: block; min-height: 37px; }
.cus-tz-scroll { max-height: 640px; overflow-y: auto; }
.cus-tz-trow--grid { border-bottom: 0; }
.cus-tz-axis--hours { padding: 0; }
.cus-tz-slot { height: calc(60 * var(--cus-tz-min)); border-bottom: 1px solid var(--cus-tz-line); padding: 2px 4px; }
.cus-tz-grid { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(60 * var(--cus-tz-min) - 1px), var(--cus-tz-line) calc(60 * var(--cus-tz-min) - 1px), var(--cus-tz-line) calc(60 * var(--cus-tz-min))); }
.cus-tz-tcol { position: relative; border-left: 1px solid var(--cus-tz-line); height: calc(1440 * var(--cus-tz-min)); }
.cus-tz-tcol:first-child { border-left: 0; }
.cus-tz-ev--timed { position: absolute; white-space: normal; line-height: 1.3; padding: 2px 4px; font-size: 13px; }
.cus-tz-ev--timed .cus-tz-ev__time { display: block; }
.cus-tz-now { position: absolute; left: 0; right: 0; border-top: 2px solid #e00; z-index: 3; }

/* lista */
.cus-tz-list { border: 1px solid var(--cus-tz-line); }
.cus-tz-lday { display: flex; justify-content: space-between; padding: 8px 14px; background: #eee; border-top: 1px solid var(--cus-tz-line); font-weight: 700; color: var(--cus-tz-accent); font-size: 15px; line-height: 1.6; }
.cus-tz-lday:first-child { border-top: 0; }
.cus-tz-litem { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--cus-tz-line); color: #333; text-decoration: none; font-size: 15px; line-height: 1.6; background: #fff; }
.cus-tz-litem:hover { background: #f5f5f5; color: #333; }
.cus-tz-litem__time { flex: 0 0 auto; min-width: 70px; }
.cus-tz-litem__dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; }
.cus-tz-empty { padding: 40px 14px; text-align: center; background: #eee; color: #555; }

/* dymek */
.cus-tz-tip { position: absolute; z-index: 50; width: 320px; max-width: 90vw; background: #fff; border: 1px solid #ccc; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); padding: 10px 12px; font-size: 14px; line-height: 1.5; }
.cus-tz-tip__date { font-weight: 700; }
.cus-tz-tip__cal { color: #777; font-size: 13px; }
.cus-tz-tip__link { display: block; margin: 4px 0; color: var(--cus-tz-accent); font-weight: 700; text-decoration: none; }
.cus-tz-tip__desc, .cus-tz-tip__loc { color: #555; font-size: 13px; }

/* pełny ekran */
.cus-terminarz.cus-tz-full { position: fixed; inset: 0; z-index: 100000; background: #fff; padding: 20px; overflow: auto; margin: 0; }
html.cus-tz-noscroll { overflow: hidden; }

/* telefony */
@media (max-width: 767px) {
	.cus-tz-toolbar { justify-content: center; }
	.cus-tz-chunk--title { order: -1; flex-basis: 100%; }
	.cus-tz-week, .cus-tz-days, .cus-tz-day { min-height: 80px; }
	.cus-terminarz { --cus-tz-row: 24px; --cus-tz-num: 28px; }
	.cus-tz-month .cus-tz-ev--bar { height: 22px; font-size: 11px; }
	.cus-tz-hcell, .cus-tz-num { font-size: 13px; }
	.cus-tz-axis { flex-basis: 48px; font-size: 11px; }
}

/* druk */
@media print {
	body.cus-tz-printing * { visibility: hidden; }
	body.cus-tz-printing .cus-terminarz, body.cus-tz-printing .cus-terminarz * { visibility: visible; }
	body.cus-tz-printing .cus-terminarz { position: absolute; left: 0; top: 0; width: 100%; }
	.cus-tz-toolbar .cus-tz-chunk:not(.cus-tz-chunk--title), .cus-tz-toggle, .cus-tz-calendars, .cus-tz-tip { display: none !important; }
	.cus-tz-ev { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* strona terminu */
.cus-termin__info { width: 100%; border-collapse: collapse; background: #f2f2f2; margin: 0 0 10px; border-bottom: 1px solid #ccc; }
.cus-termin__info th, .cus-termin__info td { text-align: left; padding: 5px 10px; font-size: 16px; line-height: 27.2px; vertical-align: top; background: transparent; }
.cus-termin__info th { width: 180px; font-weight: 700; }
.cus-termin__info a { color: #596499; text-decoration: none; }
.cus-termin__actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 12px; border-bottom: 1px solid #ccc; margin: 0 0 20px; }
.cus-termin__btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid #ccc; background: #fff; color: #000; font-size: 15px; line-height: 24px; text-decoration: none; }
.cus-termin__btn:hover { background: #f0f0f0; color: #000; }
.cus-termin__icon { width: 14px; height: 14px; fill: currentColor; }
.cus-termin__title { font-family: 'Roboto Condensed', Arial, sans-serif; font-size: 27px; font-weight: 500; line-height: 38.57px; margin: 0 10px 9px; }
.cus-termin__desc { padding: 0 10px; }
@media print { .cus-termin__actions { display: none; } }

/* odporność na style motywu (np. kolory linków i nagłówków w treści strony) */
.cus-terminarz h2.cus-tz-title { font-family: 'Roboto Condensed', Arial, sans-serif !important; font-size: 19.5px !important; font-weight: 400 !important; line-height: 38.57px !important; margin: 0 !important; color: #333 !important; }
.cus-terminarz a.cus-tz-litem, .cus-terminarz a.cus-tz-litem:hover { color: #333 !important; text-decoration: none !important; }
.cus-terminarz a.cus-tz-ev, .cus-terminarz a.cus-tz-ev:hover { text-decoration: none !important; }
.cus-terminarz a.cus-tz-num, .cus-terminarz .cus-tz-hcell a { color: var(--cus-tz-accent) !important; }
.cus-terminarz .cus-tz-btn, .cus-terminarz .cus-tz-btn:hover { color: #000 !important; }
.cus-termin a.cus-termin__btn, .cus-termin a.cus-termin__btn:hover { color: #000 !important; text-decoration: none !important; }
.cus-termin h2.cus-termin__title { font-family: 'Roboto Condensed', Arial, sans-serif; font-size: 27px; font-weight: 500; line-height: 38.57px; margin: 0 10px 9px; }
