/* ==========================================================================
   OMNICOM – Course calendar (Kalendár kurzov)
   Loaded after style.css (homepage) and subpage.css (page hero, breadcrumb).
   Markup is produced by the [oc_course_calendar] shortcode.
   v1.4 – "Other date or language" link at every date.
   v1.3 – course-language filter and language in the list.
   v1.1 – courses without a date ("on request") are part of the calendar:
          a "Na vyžiadanie" block at the end of the list and a bar across
          all months in the overview.
   ========================================================================== */

/* ---------- Toolbar: category chips and view switch ---------- */

.oc-cal-bar { position: sticky; top: 0; z-index: 20; background: var(--oc-white); border-bottom: 1px solid var(--oc-grey-300); }
.oc-cal-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.oc-cal-filters { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-width: 0; }
.oc-cal-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.oc-cal-chips__label { min-width: 104px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--oc-grey-600); }
.oc-cal-lang::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 3.8 5.5 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.5-3.8-9S9.5 5.5 12 3z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 3.8 5.5 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.5-3.8-9S9.5 5.5 12 3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.oc-cal-chip { font: 700 14px/1 var(--oc-font); padding: 10px 14px; min-height: 40px; border: 1px solid var(--oc-grey-300); background: var(--oc-white); color: var(--oc-black); cursor: pointer; }
.oc-cal-chip:hover { border-color: var(--oc-black); }
.oc-cal-chip[aria-pressed="true"] { background: var(--oc-ink); border-color: var(--oc-ink); color: var(--oc-white); }
.oc-cal-view { display: flex; border: 1px solid var(--oc-grey-300); }
.oc-cal-view button { font: 700 14px/1 var(--oc-font); padding: 10px 14px; min-height: 40px; border: 0; background: var(--oc-white); color: var(--oc-black); cursor: pointer; }
.oc-cal-view button[aria-pressed="true"] { background: var(--oc-red); color: var(--oc-white); }

/* ---------- List view: months ---------- */

.oc-cal { padding: 48px 0 24px; }
.oc-cal-month { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 40px; padding: 32px 0; border-top: 2px solid var(--oc-ink); }
.oc-cal-month:first-child { border-top: 0; padding-top: 0; }
.oc-cal-month__head { position: sticky; top: 88px; align-self: start; }
.oc-cal-month__name { font-size: 28px; font-weight: 700; line-height: 1.1; text-transform: capitalize; }
.oc-cal-month__count { margin-top: 6px; font-size: 14px; color: var(--oc-grey-600); }
.oc-cal-month__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.oc-cal-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 20px 24px; background: var(--oc-grey-100); }
.oc-cal-date { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.oc-cal-date__days { font-size: 26px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oc-cal-date__mon { margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--oc-red); }
.oc-cal-item__main { display: flex; flex-direction: column; gap: 6px; }
.oc-cal-item__cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--oc-grey-600); }
.oc-home .oc-cal-item__title { font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--oc-black); text-decoration: none; }
.oc-home .oc-cal-item__title:hover { color: var(--oc-red); text-decoration: underline; }
.oc-cal-item__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--oc-ink); }
.oc-cal-item__meta span { white-space: nowrap; }
.oc-cal-item__side { display: flex; align-items: center; gap: 20px; }
.oc-cal-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 150px; }
.oc-home a.oc-cal-alt { font-size: 13px; font-weight: 700; color: var(--oc-ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.oc-home a.oc-cal-alt:hover { color: var(--oc-red); }
.oc-cal-price { font-size: 18px; font-weight: 700; white-space: nowrap; text-align: right; }
.oc-cal-price small { display: block; font-size: 12px; font-weight: 400; color: var(--oc-grey-600); }
.oc-cal-status { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 8px; background: var(--oc-white); color: var(--oc-ink); border: 1px solid var(--oc-grey-300); }
.oc-cal-status--full { background: var(--oc-grey-300); color: var(--oc-grey-600); }
.oc-cal-item.is-full .oc-cal-date__days, .oc-cal-item.is-full .oc-cal-item__title { color: var(--oc-grey-600); }

.oc-cal-empty { padding: 48px 24px; background: var(--oc-grey-100); text-align: center; color: var(--oc-ink); }

/* ---------- List view: "On request" block (courses without a date) ---------- */

/* Diagonal hatching = "no fixed date". Same pattern in the list and in the overview bar. */
.oc-cal-root { --oc-cal-hatch: repeating-linear-gradient(135deg, var(--oc-white) 0 10px, var(--oc-grey-100) 10px 20px); }

.oc-cal-month--request .oc-cal-month__name { color: var(--oc-red); text-transform: none; }
.oc-cal-month__note { margin-top: 10px; font-size: 14px; line-height: 1.4; color: var(--oc-ink); }

.oc-cal-item--request { background: var(--oc-cal-hatch); border: 1px dashed var(--oc-grey-600); border-left: 4px solid var(--oc-red); }
.oc-cal-date--request { align-self: stretch; justify-content: center; }
.oc-cal-date--request svg { width: 26px; height: 26px; color: var(--oc-red); }
.oc-cal-date--request .oc-cal-date__mon { color: var(--oc-ink); letter-spacing: .04em; line-height: 1.25; }
/* a.… : higher specificity than .oc-home .oc-btn-link in oc-home.css, which loads after this file */
.oc-home a.oc-btn-link--outline { border-color: var(--oc-red); color: var(--oc-red); background: var(--oc-white); }
.oc-home a.oc-btn-link--outline:hover { border-color: var(--oc-red); background: var(--oc-red); color: var(--oc-white); }
.oc-home .oc-cal-item__side .oc-btn-link { white-space: nowrap; }

/* ---------- Overview view: course × month matrix ---------- */

.oc-cal-matrix-wrap { overflow-x: auto; border: 1px solid var(--oc-grey-300); }
.oc-cal-matrix { width: 100%; min-width: calc(300px + var(--oc-cal-cols, 12) * 64px); border-collapse: collapse; font-size: 14px; }
.oc-cal-matrix thead th small { display: block; font-size: 11px; font-weight: 400; color: var(--oc-grey-300); }
.oc-cal-matrix .is-newyear { border-left: 2px solid var(--oc-ink); }
.oc-cal-matrix th, .oc-cal-matrix td { padding: 10px 8px; border-bottom: 1px solid var(--oc-grey-300); text-align: center; vertical-align: middle; }
.oc-cal-matrix thead th { background: var(--oc-ink); color: var(--oc-white); font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.oc-cal-matrix th[scope="row"], .oc-cal-matrix thead th:first-child { text-align: left; width: 300px; padding-left: 16px; }
.oc-cal-matrix th[scope="row"] a { color: var(--oc-black); font-weight: 700; text-decoration: none; }
.oc-cal-matrix th[scope="row"] a:hover { color: var(--oc-red); text-decoration: underline; }
.oc-cal-matrix tbody tr:nth-child(even) { background: var(--oc-grey-100); }
.oc-cal-matrix td > span { display: inline-block; padding: 4px 6px; background: var(--oc-red); color: var(--oc-white); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oc-cal-matrix td > span.is-full { background: var(--oc-grey-300); color: var(--oc-grey-600); }

/* On request: group heading + one bar across all months */
.oc-cal-matrix tbody.oc-cal-matrix__req tr { background: var(--oc-white); }
.oc-cal-matrix .oc-cal-matrix__group th { padding: 14px 16px 10px; text-align: left; background: var(--oc-white); border-top: 2px solid var(--oc-ink); }
.oc-cal-matrix__group-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--oc-red); }
.oc-cal-matrix__group-note { margin-left: 12px; font-weight: 400; color: var(--oc-grey-600); }
.oc-cal-matrix td.oc-cal-span { padding: 6px 8px; text-align: left; }
.oc-home a.oc-cal-bar-req { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px; background: var(--oc-cal-hatch); border: 1px dashed var(--oc-grey-600); border-left: 4px solid var(--oc-red); color: var(--oc-ink); text-decoration: none; transition: border-color .15s; }
.oc-home a.oc-cal-bar-req:hover { border-color: var(--oc-red); }
.oc-cal-bar-req__text { position: sticky; left: 314px; font-size: 14px; }
.oc-cal-bar-req__text strong { color: var(--oc-black); }
.oc-cal-bar-req__cta { position: sticky; right: 14px; padding-left: 12px; background: var(--oc-white); font-size: 14px; font-weight: 700; color: var(--oc-red); white-space: nowrap; }
.oc-cal-bar-req__cta::after { content: " \2192"; }

/* ---------- Legacy "on request" tiles ([oc_course_calendar part="request"]) + benefits ---------- */

.oc-cal-request { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.oc-home a.oc-cal-req { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--oc-grey-100); color: var(--oc-black); text-decoration: none; transition: background-color .15s; }
.oc-home a.oc-cal-req:hover { background: var(--oc-grey-300); }
.oc-cal-req__cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--oc-red); }
.oc-cal-req__title { font-size: 18px; font-weight: 700; line-height: 1.25; }
.oc-cal-req__cta { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 700; }
.oc-cal-req__cta::after { content: " \2192"; color: var(--oc-red); }

.oc-cal-perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.oc-cal-perk { border-top: 4px solid var(--oc-red); padding-top: 20px; }
.oc-cal-perk__big { font-size: 40px; font-weight: 700; line-height: 1; color: var(--oc-red); }
.oc-cal-perk__title { margin-top: 12px; font-size: 18px; font-weight: 700; }
.oc-cal-perk p { margin-top: 6px; color: var(--oc-ink); }

[hidden] { display: none !important; }

/* ---------- Tablet ---------- */

@media (max-width: 1000px) {
  .oc-cal-month { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .oc-cal-month__head { position: static; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  .oc-cal-month__count { margin-top: 0; }
  .oc-cal-month__note { flex-basis: 100%; margin-top: 0; }
  .oc-cal-request { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
  .oc-cal-bar { position: static; }
  .oc-cal-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .oc-cal-chips__label { min-width: 0; flex: none; }
  .oc-cal-chip { flex: none; }
  .oc-cal-view { display: none; }               /* the matrix is not useful on a phone */
  .oc-cal-item { grid-template-columns: 72px minmax(0, 1fr); padding: 16px; }
  .oc-cal-date__days { font-size: 20px; }
  .oc-cal-item__side { grid-column: 1 / -1; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
  .oc-cal-item--request .oc-cal-item__side { justify-content: flex-start; }
  .oc-cal-item--request .oc-cal-item__meta span { white-space: normal; }
  .oc-cal-price { text-align: left; }
  .oc-cal-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 16px; min-width: 0; }
  .oc-cal-request, .oc-cal-perks { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   v1.2 – Request form dialog ("Dohodnúť termín")
   Contact Form 7 form "Course request 2026 SK|EN|CS" inside <dialog class="oc-req-dialog">.
   The form markup uses .oc-reqf* classes (see cf7/*.txt in the package).
   ========================================================================== */

.oc-req-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-top: 6px solid var(--oc-red); background: var(--oc-white); color: var(--oc-black); box-shadow: 0 24px 64px rgba(0, 0, 0, .3); font-family: var(--oc-font); }
.oc-req-dialog::backdrop { background: rgba(51, 49, 50, .72); }
.oc-req-dialog__inner { position: relative; padding: 32px 40px 36px; }
.oc-req-dialog__close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; padding: 10px; border: 0; background: none; color: var(--oc-ink); cursor: pointer; }
.oc-req-dialog__close:hover { color: var(--oc-red); }
.oc-req-dialog__close svg { width: 24px; height: 24px; display: block; }
.oc-req-dialog__title { margin-top: 6px; font-size: 28px; line-height: 1.15; }
.oc-req-dialog__lead { margin-top: 8px; padding-right: 24px; color: var(--oc-ink); }
.oc-req-dialog .wpcf7 { margin-top: 24px; }

/* Form grid. .oc-reqf is display: contents so the Turnstile widget (inserted by CF7
   at the start of the form) can be placed above the submit button with `order`. */
.oc-req-dialog form.wpcf7-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin: 0; }
.oc-reqf { display: contents; }
.oc-req-dialog .hidden-fields-container, .oc-req-dialog .screen-reader-response { grid-column: 1 / -1; }
.oc-reqf__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.oc-reqf__field--full, .oc-reqf__legal, .oc-reqf__submit,
.oc-req-dialog .wpcf7-turnstile, .oc-req-dialog .cf-turnstile, .oc-req-dialog .wpcf7-response-output { grid-column: 1 / -1; }
.oc-req-dialog .wpcf7-turnstile, .oc-req-dialog .cf-turnstile { order: 1; }
.oc-reqf__legal, .oc-reqf__submit { order: 2; }
.oc-req-dialog .wpcf7-response-output { order: 3; }
.oc-req-dialog form.init .wpcf7-response-output, .oc-req-dialog form.submitting .wpcf7-response-output, .oc-req-dialog form.resetting .wpcf7-response-output { display: none; }

.oc-reqf__field > label, .oc-reqf__field > legend { padding: 0; font-size: 14px; font-weight: 700; line-height: 1.3; }
.oc-reqf__field > legend { margin-bottom: 8px; }
.oc-reqf__field > label span, .oc-reqf__field > legend span { color: var(--oc-red); }

.oc-reqf input[type="text"], .oc-reqf input[type="email"], .oc-reqf input[type="tel"], .oc-reqf textarea {
  width: 100%; margin: 0; padding: 11px 12px; border: 1px solid var(--oc-grey-600); border-radius: 0; background: var(--oc-white);
  font: 400 16px/1.4 var(--oc-font); color: var(--oc-black); box-shadow: none;
}
.oc-reqf textarea { min-height: 88px; resize: vertical; }
.oc-reqf input:focus, .oc-reqf textarea:focus { outline: 3px solid var(--oc-red-light); outline-offset: 0; border-color: var(--oc-ink); }
.oc-reqf ::placeholder { color: var(--oc-grey-600); opacity: 1; }

/* Radio groups as chips (same look as the calendar filter) */
.oc-reqf__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.oc-reqf__pills .wpcf7-list-item { margin: 0; }
.oc-reqf__pills label { position: relative; display: inline-flex; cursor: pointer; }
.oc-reqf__pills input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.oc-reqf__pills .wpcf7-list-item-label { display: inline-block; min-height: 40px; padding: 9px 14px; border: 1px solid var(--oc-grey-300); background: var(--oc-white); font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--oc-black); }
.oc-reqf__pills label:hover .wpcf7-list-item-label { border-color: var(--oc-black); }
.oc-reqf__pills input:checked + .wpcf7-list-item-label { background: var(--oc-ink); border-color: var(--oc-ink); color: var(--oc-white); }
.oc-reqf__pills input:focus-visible + .wpcf7-list-item-label { outline: 3px solid var(--oc-red-light); outline-offset: 2px; }

.oc-reqf__legal { margin: 0; font-size: 13px; color: var(--oc-grey-600); }
.oc-reqf__submit { display: flex; align-items: center; gap: 12px; }
.oc-req-dialog input.oc-btn-link { cursor: pointer; font-family: var(--oc-font); border-radius: 0; }
.oc-req-dialog .wpcf7-not-valid { border-color: var(--oc-red) !important; }
.oc-req-dialog .wpcf7-not-valid-tip { margin-top: 4px; font-size: 13px; color: var(--oc-red); }
.oc-req-dialog .wpcf7-response-output { margin: 0 !important; padding: 12px 16px !important; border: 0 !important; border-left: 4px solid var(--oc-ink) !important; background: var(--oc-grey-100); font-size: 15px; }
.oc-req-dialog form.invalid .wpcf7-response-output, .oc-req-dialog form.failed .wpcf7-response-output, .oc-req-dialog form.spam .wpcf7-response-output { border-left-color: var(--oc-red) !important; }
/* After a successful send only the confirmation stays visible */
.oc-req-dialog form.sent .oc-reqf, .oc-req-dialog form.sent .wpcf7-turnstile, .oc-req-dialog form.sent .cf-turnstile { display: none; }

@media (max-width: 700px) {
  .oc-req-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100%; margin: 0; }
  .oc-req-dialog__inner { padding: 24px 16px 32px; }
  .oc-req-dialog__title { font-size: 24px; }
  .oc-req-dialog form.wpcf7-form { grid-template-columns: minmax(0, 1fr); }
  .oc-reqf__submit .oc-btn-link { width: 100%; }
}
