.jschedule {
  --jschedule-ink: #172033;
  --jschedule-muted: #5c667a;
  --jschedule-line: #d9dee8;
  --jschedule-soft: #f5f7fb;
  --jschedule-accent: #154b8b;
  color: var(--jschedule-ink);
  color-scheme: light;
  container: jschedule / inline-size;
  font-family: inherit;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Keep the public renderer legible when it is hosted by a dark Joomla template
   (notably the authorized administrator preview). Host templates commonly set
   colors directly on these elements, which otherwise overrides inherited ink. */
.jschedule :where(h1, h2, h3, p, label, legend) { color: inherit; }

.jschedule *,
.jschedule *::before,
.jschedule *::after { box-sizing: border-box; }
.jschedule [hidden] { display: none !important; }
.jschedule button,
.jschedule input { font: inherit; }
.jschedule .visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.jschedule__header {
  align-items: flex-start;
  border-bottom: 3px solid var(--jschedule-accent);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0 0 .9rem;
}
.jschedule__header h1 { font-size: clamp(1.45rem, 3vw, 2.25rem); line-height: 1.15; margin: .15rem 0 .45rem; }
.jschedule__eyebrow,
.jschedule-dialog__eyebrow { color: var(--jschedule-muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; margin: 0; text-transform: uppercase; }
.jschedule__approval { color: var(--jschedule-muted); margin: .4rem 0 0; white-space: normal; }
.jschedule__status { border-radius: 999px; display: inline-block; font-size: .83rem; font-weight: 750; padding: .25rem .65rem; }
.jschedule__status--project { background: #fff1be; color: #694d00; }

.jschedule__notice { background: var(--jschedule-soft); border: 1px solid var(--jschedule-line); border-radius: .75rem; padding: clamp(1rem, 4vw, 2.25rem); }
.jschedule__notice h1 { margin-top: 0; }
.jschedule__notice p { margin-bottom: 0; }
.jschedule__notice--error { background: #fff5f5; border-color: #e8b9b9; }

.jschedule__toolbar { background: var(--jschedule-soft); border: 1px solid var(--jschedule-line); border-radius: .8rem; margin-bottom: 1.25rem; padding: 1rem; }
.jschedule__view-switch { display: inline-flex; margin-bottom: 1rem; }
.jschedule__view-switch label { cursor: pointer; }
.jschedule__view-switch input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.jschedule__view-switch span { background: white; border: 1px solid var(--jschedule-line); color: var(--jschedule-ink); display: block; font-weight: 700; padding: .58rem .85rem; }
.jschedule__view-switch label:first-child span { border-radius: .45rem 0 0 .45rem; }
.jschedule__view-switch label:last-child span { border-radius: 0 .45rem .45rem 0; }
.jschedule__view-switch input:checked + span { background: var(--jschedule-accent); border-color: var(--jschedule-accent); color: white; }
.jschedule__view-switch input:focus-visible + span { outline: 3px solid #75a9e5; outline-offset: 2px; }
.jschedule__print-button { align-items: center; display: inline-flex; gap: .4rem; margin: 0 0 1rem .65rem; text-decoration: none; vertical-align: top; }
.jschedule__print-button:hover,
.jschedule__print-button:focus { color: white; }
.jschedule__print-button svg { fill: currentColor; flex: 0 0 1.1rem; height: 1.1rem; width: 1.1rem; }
.jschedule__filters h2 { font-size: 1.08rem; margin: 0 0 .75rem; }
.jschedule__class-filter > label,
.jschedule__category-filter legend { font-size: .9rem; font-weight: 750; }
.jschedule__class-entry { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .3rem; }
.jschedule__class-entry input { background: white; border: 1px solid #9ba5b5; border-radius: .35rem; color: var(--jschedule-ink); flex: 1 1 13rem; min-height: 2.45rem; padding: .45rem .6rem; }
.jschedule__button { background: var(--jschedule-accent); border: 1px solid var(--jschedule-accent); border-radius: .35rem; color: white; cursor: pointer; min-height: 2.45rem; padding: .4rem .75rem; }
.jschedule__button--quiet { background: white; color: var(--jschedule-accent); }
.jschedule__feedback { color: #a32626; font-size: .85rem; min-height: 1.25em; margin: .3rem 0; }
.jschedule__chips { display: flex; flex-wrap: wrap; gap: .35rem; min-height: .2rem; }
.jschedule__chip { background: #dceafb; border: 1px solid #8cb1db; border-radius: 999px; color: #103d70; cursor: pointer; padding: .25rem .55rem; }
.jschedule__category-filter { border: 0; border-top: 1px solid var(--jschedule-line); margin: .9rem 0 0; padding: .8rem 0 0; }
.jschedule__category-actions { display: flex; gap: 1rem; margin: .15rem 0 .55rem; }
.jschedule__text-button { background: none; border: 0; color: var(--jschedule-accent); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: .15em; }
.jschedule__category-options { display: grid; gap: .35rem .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.jschedule__category-option { align-items: flex-start; color: var(--jschedule-ink); display: flex; font-size: .86rem; gap: .38rem; line-height: 1.25; }
.jschedule__category-option::before { background: var(--category-color); border: 1px solid rgb(0 0 0 / .2); border-radius: 2px; content: ""; flex: 0 0 .72rem; height: .72rem; margin-top: .17rem; }
.jschedule__category-option input { margin: .15rem 0 0; }
.jschedule__filter-summary { color: var(--jschedule-muted); font-size: .88rem; margin: .75rem 0 0; }

.jschedule-overview-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.jschedule-month { background: white; border: 1px solid var(--jschedule-line); border-radius: .5rem; min-width: 0; overflow: hidden; }
.jschedule-month h2 { background: #eaf0f8; font-size: 1rem; margin: 0; padding: .55rem .7rem; text-align: center; }
.jschedule-month__calendar,
.jschedule-source-month__grid { display: grid; grid-template-columns: minmax(1.35rem, .55fr) repeat(7, minmax(0, 1fr)); }
.jschedule-month__weekday,
.jschedule-month__week-number { align-items: center; color: var(--jschedule-muted); display: flex; font-size: .68rem; font-weight: 750; justify-content: center; min-height: 1.7rem; }
.jschedule-month__week-heading { font-size: .56rem; }
.jschedule-month__week-number { background: #f6f7f9; border-top: 1px solid #e3e6eb; }
.jschedule-day { aspect-ratio: 1 / 1; border-left: 1px solid #edf0f4; border-top: 1px solid #e3e6eb; min-width: 0; position: relative; }
.jschedule-day--outside { background: #fafbfc; }
.jschedule-day__button { align-items: center; background: transparent; border: 0; color: var(--jschedule-ink); cursor: pointer; display: flex; height: 100%; justify-content: center; min-height: 2.2rem; padding: 0; position: relative; width: 100%; z-index: 2; }
.jschedule-day__button:focus-visible { outline: 3px solid #2268b7; outline-offset: -3px; z-index: 8; }
.jschedule-day__background,
.jschedule-day__outline { inset: 12% -1px; pointer-events: none; position: absolute; }
.jschedule-day__background { background: color-mix(in srgb, var(--marking-color) 78%, white); }
.jschedule-day__background.is-range-start { border-radius: .25rem 0 0 .25rem; left: 8%; }
.jschedule-day__background.is-range-end { border-radius: 0 .25rem .25rem 0; right: 8%; }
.jschedule-day__background.is-range-start.is-range-end {  left: 8%;  right: 8%;  border-radius: .25rem;}
.jschedule-day__background {
  position: absolute;
  background: var(--marking-color);
  top: 8%;
  bottom: 8%;
}
/* horizontalus tęstinumas */
.jschedule-day__background:not(.is-range-start) {
  left: 0;
}
.jschedule-day__background.is-range-start {
  left: 8%;
}
.jschedule-day__background:not(.is-range-end) {
  right: 0;
}
.jschedule-day__background.is-range-end {
  right: 8%;
}
/* du fonai: viršus / apačia */
.jschedule-day__background--top {
  top: 8%;
  bottom: 50%;
}
.jschedule-day__background--bottom {
  top: 50%;
  bottom: 8%;
}
/* vienas fonas */
.jschedule-day__background:not(.jschedule-day__background--top):not(.jschedule-day__background--bottom).is-range-start {
  border-radius: .25rem 0 0 .25rem;
}
.jschedule-day__background:not(.jschedule-day__background--top):not(.jschedule-day__background--bottom).is-range-end {
  border-radius: 0 .25rem .25rem 0;
}
.jschedule-day__background:not(.jschedule-day__background--top):not(.jschedule-day__background--bottom).is-range-start.is-range-end {
  border-radius: .25rem;
}
/* viršutinė pusė */
.jschedule-day__background--top.is-range-start {
  border-radius: .25rem 0 0 0;
}
.jschedule-day__background--top.is-range-end {
  border-radius: 0 .25rem 0 0;
}
.jschedule-day__background--top.is-range-start.is-range-end {
  border-radius: .25rem .25rem 0 0;
}
/* apatinė pusė */
.jschedule-day__background--bottom.is-range-start {
  border-radius: 0 0 0 .25rem;
}
.jschedule-day__background--bottom.is-range-end {
  border-radius: 0 0 .25rem 0;
}
.jschedule-day__background--bottom.is-range-start.is-range-end {
  border-radius: 0 0 .25rem .25rem;
}

.jschedule-day__outline { border: var(--line-width, 2px) var(--line-style, solid) var(--marking-color); border-radius: .25rem; inset: 8%; }
.jschedule-day__outline--2 { inset: 16%; }
.jschedule-day__number { font-size: .82rem; font-weight: 750; position: relative; z-index: 2; }
.jschedule-day__markers { align-items: center; display: flex; gap: 1px; justify-content: right; left: 0; pointer-events: none; position: absolute; right: 3px; top: 2px; z-index: 4; }
.jschedule-day__symbol { color: var(--marking-color); font-size: .8rem; font-weight: 900; line-height: 1; }
.jschedule-day__badge { background: var(--marking-color); border-radius: 50%; color: white; height: .62rem; width: .62rem; }

.jschedule[data-active-view="source"] > .jschedule__header { display: none; }
.jschedule__view--source { background: #e9edef; border: 1px solid var(--jschedule-line); border-radius: .5rem; min-width: 0; overflow: hidden; padding: clamp(.35rem, 1.2cqi, .8rem); }
.jschedule-source-sheet { background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: clamp(.68rem, 1.35cqi, .78rem); line-height: 1.2; min-width: 0; padding: clamp(.55rem, 1.8cqi, 1.25rem); }
.jschedule-source-sheet,
.jschedule-source-sheet * {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.jschedule-source__document-header { display: flex; flex-direction: column; min-height: 4.25rem; padding: .35rem 0 1rem; position: relative; text-align: center; }
.jschedule-source__document-header h2 { font-family: Arial, Helvetica, sans-serif; font-size: clamp(1.05rem, 1.8cqi, 1.45rem); font-weight: 700; letter-spacing: -.015em; line-height: 1.08; margin: 0; }
.jschedule-source__document-header p { align-self: flex-end; font-size: clamp(.52rem, .72cqi, .65rem); font-weight: 700; line-height: 1.3; margin: 0 0 .8rem; max-width: 16rem; order: -1; text-align: left; white-space: pre-line; }
.jschedule-source__project { align-self: flex-end; background: #fff1be; border: 1px solid #a17800; font-size: .68rem; margin-bottom: .8rem; order: -1; padding: .15rem .35rem; }
.jschedule-source__top-months { display: grid; gap: .2rem; }
.jschedule-source__month-row,
.jschedule-source__summer-months { display: grid; gap: clamp(.75rem, 3.7cqi, 3.4rem); grid-template-columns: 1fr; }
.jschedule-source-month { min-width: 0; }
.jschedule-source-month h3 { font-family: Arial, Helvetica, sans-serif; font-size: clamp(.95rem, 1.45cqi, 1.18rem); font-weight: 700; line-height: 1.05; margin: 0 0 1px; text-align: center; }
.jschedule-source-month table { border-collapse: collapse; font-variant-numeric: tabular-nums; table-layout: fixed; width: 100%; }
.jschedule-source-month caption { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.jschedule-source-month thead { border-bottom: 1px solid #000; }
.jschedule-source-month thead th { border: 0; font-size: clamp(.85rem, 1.28cqi, 1.06rem); font-weight: 400; height: clamp(1.5rem, 2cqi, 1.75rem); line-height: 1; padding: 0; text-align: center; }
.jschedule-source-month__week-spacer,
.jschedule-source-month__week { width: clamp(.85rem, 1.35cqi, 1.15rem); }
.jschedule-source-month tbody td,
.jschedule-source-month tbody th { background: transparent; border: 0; height: clamp(1.55rem, 2cqi, 1.75rem); line-height: 1; padding: 0; text-align: center; }
.jschedule-source-month__week { color: #000; font-size: clamp(.48rem, .64cqi, .58rem); font-weight: 400; text-align: left !important; }

.jschedule-source-day { font-size: clamp(.9rem, 1.3cqi, 1.08rem); isolation: isolate; position: relative; white-space: nowrap; overflow-wrap: normal; word-break: normal;}
.jschedule-source-day--outside { color: transparent; }
.jschedule-source-day__button { background: transparent; border: 0; color: inherit; cursor: pointer; display: block; font: inherit; height: 100%; line-height: inherit; padding: 0; position: relative; width: 100%; z-index: 2; }
.jschedule-source-day__button time { display: grid; height: 100%; place-items: center; width: 100%; }
.jschedule-source-day__button[data-event-dates*=','] time { font-size: .55em; font-weight: 700; letter-spacing: -.04em; }
.jschedule-source-day__button:hover { box-shadow: inset 0 0 0 1px #0c6370; }
.jschedule-source-day__button:focus-visible { outline: 2px solid #0c6370; outline-offset: -2px; }
.jschedule-source-day__button.is-marked-number time { font-weight: 700; }
.jschedule-source-day__background,
.jschedule-source-day__outline { inset: 0; pointer-events: none; position: absolute; }
.jschedule-source-day__background { background: var(--marking-color); z-index: 0; }
.jschedule-source-day__background.is-range { border-bottom: var(--range-width, 1px) solid var(--range-color, #000); border-top: var(--range-width, 1px) solid var(--range-color, #000); }
.jschedule-source-day__background.is-range-start { border-left: var(--range-width, 1px) solid var(--range-color, #000); }
.jschedule-source-day__background.is-range-end { border-right: var(--range-width, 1px) solid var(--range-color, #000); }
.jschedule-source-day__outline { border: var(--line-width, 1px) var(--line-style, solid) var(--marking-color); z-index: 3; }
.jschedule-source-day__symbol { font-size: .66em; font-weight: 700; line-height: 1; pointer-events: none; position: absolute; right: 0; top: -.1em; z-index: 4; }
.jschedule-source__lower { display: grid; grid-template-columns: 1fr; margin-top: .15rem; }
.jschedule-source__lower-left,
.jschedule-source__info-column { min-width: 0; }
.jschedule-source__summer-months { margin-top: .15rem; }
.jschedule-source__legend { border: 1px solid #000; margin-top: .9rem; }
.jschedule-source__legend > h3 { border-bottom: 1px solid #000; color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: clamp(.72rem, .95cqi, .88rem); font-weight: 700; line-height: 1.05; margin: 0; min-height: 1.4rem; padding: .2rem; text-align: center; }
.jschedule-source__legend-grid { display: grid; grid-template-columns: repeat(var(--legend-columns), minmax(0, 1fr)); }
.jschedule-source__legend-grid + .jschedule-source__legend-grid { border-top: 1px solid #000; }
.jschedule-source__legend-cell { min-width: 0; }
.jschedule-source__legend-cell + .jschedule-source__legend-cell { border-left: 1px solid #000; }
.jschedule-source__legend-entry { font-size: clamp(.6rem, .73cqi, .69rem); font-weight: 700; line-height: 1.16; min-height: 1.25rem; padding: .15rem .2rem; }
.jschedule-source__legend-entry[data-render-as="background"] { background: var(--category-color); color: var(--category-text); }
.jschedule-source__legend-entry[data-render-as="outline"] { box-shadow: inset 0 1px 0 var(--category-color); }
.jschedule-source__legend-entry[data-render-as="text"],
.jschedule-source__legend-entry[data-render-as="symbol"] { color: var(--category-color); }
.jschedule-source__legend-entry.is-disabled,
.jschedule-source__info-section.is-disabled > h3 { opacity: .35; text-decoration: line-through; }
.jschedule-source__info-column { align-self: start; }
.jschedule-source__info-section { border: 1px solid #000; background: #fff; }
.jschedule-source__info-section + .jschedule-source__info-section { border-top: 0; }
.jschedule-source__info-section > h3 { color: var(--category-color, #0b5394); font-family: Arial, Helvetica, sans-serif; font-size: clamp(.72rem, .95cqi, .88rem); font-weight: 700; line-height: 1.05; margin: 0; min-height: 1.45rem; padding: .2rem .28rem; }
.jschedule-source__info-section > h3[data-render-as="background"] { background: var(--category-color); color: var(--category-text); }
.jschedule-source__info-rows p { font-size: clamp(.61rem, .83cqi, .72rem); line-height: 1.22; margin: 0; padding: .12rem .28rem; font: inherit; }
.jschedule-source__info-rows p + p { padding-top: .06rem; }
.jschedule--print-source { background: #fff; margin: 0 auto; width: min(100%, 267mm); }
.jschedule--print-source .jschedule__view--source { background: #fff; border: 0; overflow: visible; padding: 0; }
.jschedule--print-source .jschedule-source-sheet { padding: 0; }
.jschedule--print-source .jschedule-source-day__button { cursor: default; }
.jschedule--print-source .jschedule-source-day__button:hover { box-shadow: none; }

.jschedule-dialog { background: transparent; border: 0; color: var(--jschedule-ink); max-height: min(86vh, 50rem); max-width: min(92vw, 42rem); padding: 0; width: 100%; }
.jschedule-dialog::backdrop { background: rgb(12 22 39 / .62); }
.jschedule-dialog__panel { background: white; border-radius: .75rem; box-shadow: 0 1.2rem 4rem rgb(0 0 0 / .3); max-height: min(86vh, 50rem); overflow: auto; padding: 1rem; }
.jschedule-dialog__header { align-items: flex-start; border-bottom: 1px solid var(--jschedule-line); display: flex; justify-content: space-between; margin-bottom: .8rem; padding-bottom: .65rem; }
.jschedule-dialog__header h2 { font-size: 1.35rem; margin: .12rem 0 0; }
.jschedule-dialog__close { background: white; border: 1px solid var(--jschedule-line); border-radius: 50%; cursor: pointer; flex: 0 0 2.2rem; font-size: 1.5rem; height: 2.2rem; line-height: 1; }
.jschedule-dialog__content { display: grid; gap: .65rem; }
.jschedule-dialog__event { border-left: .35rem solid var(--event-color); background: var(--jschedule-soft); padding: .65rem .75rem; }
.jschedule-dialog__event h3 { font-size: 1rem; margin: 0 0 .25rem; }
.jschedule-dialog__event p { margin: .15rem 0; }
.jschedule-dialog__type { color: var(--jschedule-muted); font-size: .82rem; font-weight: 700; }
.jschedule-dialog__note { font-style: italic; }

@container jschedule (min-width: 46rem) {
  .jschedule-source__month-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jschedule-source__summer-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jschedule-source__lower { gap: .35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jschedule-source__lower-left { grid-column: 1 / -1; }
}

@container jschedule (min-width: 58rem) {
  .jschedule-source__document-header { display: block; min-height: clamp(4.25rem, 7cqi, 6.25rem); padding-top: clamp(2rem, 3.5cqi, 3.25rem); }
  .jschedule-source__document-header p { margin: 0; max-width: none; position: absolute; right: 4%; top: 0; width: 19%; }
  .jschedule-source__project { margin: 0; position: absolute; right: 4%; top: 0; }
  .jschedule-source__month-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .jschedule-source__lower { gap: 0; grid-template-columns: 44fr 13fr 17fr 26fr; }
  .jschedule-source__lower-left { grid-column: auto; padding-right: 1px; }
  .jschedule-source__summer-months { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 82%; }
}

@media (max-width: 480px) {
	.jschedule-source__legend-entry {
	font-size: 11px;
	}
	.jschedule-source__info-rows p {
    font-size: 11px;
    line-height: 1.25;
	}
}

@page { size: A4 landscape; margin: 10mm; }

@media print {
  html.jschedule-print-document { background: #fff !important; font-size: 10px; }
  body.jschedule-print-document { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  html.jschedule-print-document,
  body.jschedule-print-document,
  .jschedule--print-source,
  .jschedule--print-source * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .jschedule--print-source {
    margin: 0 auto !important;
    width: 277mm !important;
    max-width: 277mm !important;
  }
  .jschedule--print-source .jschedule-source-sheet { font-size: 8px; padding: 0; }
  .jschedule__toolbar { display: none; }
  .jschedule[data-active-view="overview"] > .jschedule__header { margin-bottom: .5rem; }
  .jschedule-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jschedule__view--source { border: 0; overflow: visible; padding: 0; }
  .jschedule:not(.jschedule--print-source) .jschedule-source-sheet { font-size: 8px; padding: 8px; }
  .jschedule-source__month-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .jschedule-source__lower { gap: 0; grid-template-columns: 44fr 13fr 17fr 26fr; }
  .jschedule-source__lower-left { grid-column: auto; padding-right: 1px; }
  .jschedule-source__summer-months { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 82%; }
  .jschedule-day__button,
  .jschedule-source-day__button { color-adjust: exact; }

  .jschedule-source__document-header {
    display: block !important;
    position: relative !important;
    min-height: 55px !important;
    padding: 28px 0 10px !important;
    text-align: center !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .jschedule-source__document-header h2 {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    color: #000 !important;
  }

  .jschedule-source__document-header p {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    right: 4% !important;
    width: 19% !important;
    max-width: none !important;
    margin: 0 !important;
    font-size: 6px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: left !important;
    white-space: pre-line !important;
    color: #000 !important;
  }

  .jschedule-source__project {
    position: absolute !important;
    top: 0 !important;
    right: 4% !important;
    margin: 0 !important;
  }
}
