/* STRONA SZKOLENIA — panel boczny: kalendarz terminów, szczegóły terminu, przyciski.
   Paleta motywu: marka #C7264E, tekst #1B171C, drugorzędny #666, ramki #DDD. Ostre kanty. */

.aecTs {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.aecTs__title { margin-bottom: 1rem; }

/* ---------- Kalendarz ---------- */
.aecTsCal {
  background: #fff;
  padding: 1rem;
  border: 1px solid #ddd;
}

.aecTsCal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .75rem;
}

.aecTsCal__month {
  font-weight: 700;
  color: #1b171c;
  text-align: center;
  flex: 1 1 auto;
}

.aecTsCal__nav {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c7264e;
  border: 2px solid #c7264e;
  color: #fff;
  cursor: pointer;
  transition: background-color .3s, color .3s;
}

.aecTsCal__nav:hover,
.aecTsCal__nav:focus-visible {
  background: #fff;
  color: #c7264e;
}

.aecTsCal { position: relative; }

/* Wygląd jak kalendarz na liście szkoleń: szare kafelki dni z odstępem, numer w lewym górnym rogu,
   prostokątny pasek terminu biegnący przez dni (ciągły także nad odstępami). */
.aecTsCal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

.aecTsCal__wd {
  font-size: .75rem;
  color: #1b171c;
  padding: .25rem .3rem .4rem;
  text-transform: capitalize;
}

.aecTsCal__wd.is-sunday { color: #c7264e; }

.aecTsCal__day {
  position: relative;
  height: 3.2rem;
  display: block;
  text-align: left;
  font-size: .8rem;
  color: #1b171c;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
}

/* szary kafelek dnia (z odstępem 2px) */
.aecTsCal__day::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #f4f4f4;
  z-index: 0;
}

.aecTsCal__num {
  position: absolute;
  top: .3rem;
  left: .4rem;
  z-index: 2;
  line-height: 1.2;
}

.aecTsCal__day.is-sunday .aecTsCal__num { color: #c7264e; }
.aecTsCal__day.is-other .aecTsCal__num { color: #b5b5b5; }
.aecTsCal__day.is-today .aecTsCal__num { font-weight: 700; }

/* pasek terminu */
.aecTsCal__day.is-training { cursor: pointer; }

.aecTsCal__day.is-training::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 1.6rem;
  height: .9rem;
  background: rgba(199, 38, 78, .55);
  z-index: 1;
  transition: background-color .2s;
}

.aecTsCal__day.is-training.is-start::before { left: 2px; }
.aecTsCal__day.is-training.is-end::before { right: 2px; }

.aecTsCal__day.is-training.is-selected::before { background: #c7264e; }

.aecTsCal__day.is-training.is-hover::before,
.aecTsCal__day.is-training:hover::before,
.aecTsCal__day.is-training:focus-visible::before { background: #a51f40; }

.aecTsCal__day.is-training:focus-visible { outline: 2px solid #c7264e; outline-offset: -2px; }

/* ---------- Dymek terminu ---------- */
.aecTsTip {
  position: absolute;
  z-index: 5;
  width: min(17rem, calc(100% - 16px));
  padding: .9rem 1rem 1rem;
  background: #fff;
  border: 1px solid #ddd;
  border-top: 3px solid #c7264e;
  box-shadow: 0 8px 28px 0 hsla(0, 0%, 40%, .3);
}

.aecTsTip[hidden] { display: none; }

.aecTsTip__title {
  margin: 0 0 .25rem;
  font-weight: 700;
  color: #1b171c;
}

.aecTsTip__meta,
.aecTsTip__price {
  margin: 0 0 .25rem;
  font-size: .9rem;
  color: #666;
}

.aecTsTip__btn {
  width: 100%;
  justify-content: center;
  margin-top: .6rem;
}

.aecTsTip__btn:hover,
.aecTsTip__btn:focus-visible {
  background-color: #fff;
  border-color: #c7264e;
  color: #c7264e;
}

.aecTsCal__hint {
  margin: .75rem 0 0;
  font-size: .8rem;
  color: #666;
}

/* ---------- Szczegóły terminu ---------- */
.aecTs__details {
  margin: 1rem 0;
}

.aecTs__details > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid #ddd;
}

.aecTs__details dt {
  font-weight: 400;
  color: #666;
}

.aecTs__details dd {
  margin: 0;
  color: #1b171c;
}

.aecTs__signup,
.aecTs__ask {
  margin-top: .5rem;
}

.aecTs__contact {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

/* przyciski panelu jak w całej sekcji szkoleń: czerwony → po najechaniu białe tło, czerwony napis */
.aecTs__signup:hover,
.aecTs__signup:focus-visible,
.aecTs__ask:hover,
.aecTs__ask:focus-visible {
  background-color: #fff;
  border-color: #c7264e;
  color: #c7264e;
}

/* ---------- Sekcja 1: telefon / e-mail — mieści się w panelu (długi e-mail się zawija) ---------- */
.trainingSingle__sidebar > table {
  width: 100%;
  table-layout: fixed;
  margin-top: 1rem;
}

.trainingSingle__sidebar > table tr,
.trainingSingle__sidebar > table tr:nth-last-of-type(2n) {
  background: transparent;
}

.trainingSingle__sidebar > table td,
.trainingSingle__sidebar > table tr:nth-last-of-type(2n) td {
  padding: .6rem 0;
  border-width: 0 0 1px;
  border-style: solid;
  border-color: #ddd;
  vertical-align: top;
}

.trainingSingle__sidebar > table td:first-child {
  width: 6.5rem;
  color: #666;
}

.trainingSingle__sidebar > table td:last-child {
  overflow-wrap: anywhere;
  color: #1b171c;
}

/* ---------- Program szkolenia zwijany (opis) ---------- */
.aecTsProgram.is-collapsible .aecTsProgram__content {
  position: relative;
  overflow: hidden;
  transition: max-height .4s ease;
}

.aecTsProgram.is-collapsed .aecTsProgram__content {
  max-height: 520px;
}

.aecTsProgram.is-collapsed .aecTsProgram__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 90%);
  pointer-events: none;
}

.aecTsProgram__toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .7rem 1.4rem;
  background: #c7264e;
  border: 2px solid #c7264e;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .3s, color .3s;
}

.aecTsProgram__toggle[hidden] { display: none; }

.aecTsProgram__toggle:hover,
.aecTsProgram__toggle:focus-visible {
  background: #fff;
  color: #c7264e;
}

.aecTsProgram__toggle .fa-chevron-down { transition: transform .3s; }
.aecTsProgram:not(.is-collapsed) .aecTsProgram__toggle .fa-chevron-down { transform: rotate(180deg); }

.aecTsTip__btn { white-space: nowrap; font-size: .85rem; }
