/* Concert schedule on /koncerty/ (Concert-Schedule snippet output) */

/* Elementor widget wrapper: add "concert-schedule-widget" in Advanced → CSS Classes */
.concert-schedule-widget {
  position: relative;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: transparent !important;
}

.concert-schedule-widget > .elementor-widget-container,
.concert-schedule-widget .elementor-shortcode {
  width: 100%;
  min-width: 0;
  background: transparent !important;
}

/* List */
.meredyt-schedule {
  --schedule-text: #F5F5F5;
  --schedule-muted: #B3B3B3;
  --schedule-accent: #FF3344;
  --schedule-bg: #0E0E0E;

  box-sizing: border-box;
  width: 100%;
  max-width: min(800px, calc(100vw - 360px));
  margin: 0 auto;
  padding: 28px 24px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--schedule-text);
  text-align: left;
}

.meredyt-schedule *,
.meredyt-schedule *::before,
.meredyt-schedule *::after {
  box-sizing: border-box;
}

/* Months */
.meredyt-schedule .schedule-month {
  margin: 0;
  padding: 0;
  border: 0;
}

.meredyt-schedule .schedule-month + .schedule-month {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(245, 245, 245, 0.22);
}

.meredyt-schedule .schedule-month-title {
  margin: 0 0 18px;
  font-family: "Anton", sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--schedule-accent);
}

/* Row: date + TOWN on the first line, the name under it (lined up with the date numbers) | time | status */
.meredyt-schedule .schedule-concert {
  --schedule-day-w: 27px;     /* width of the day name, so the name below starts under the date */

  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) 64px 108px;
  grid-template-areas:
    "head fb time status"
    "info fb time status";
  align-items: baseline;
  gap: 2px 12px;
  padding: 12px 0;
}

.meredyt-schedule .schedule-concert > * {
  min-width: 0;
  margin: 0;
}

/* Divider between concerts: a faint hairline, only between rows (not above the first
   or under the last), lighter than the line between months so the months stay the main split. */
.meredyt-schedule .schedule-concert + .schedule-concert {
  border-top: 1px solid rgba(245, 245, 245, 0.09);
}

/* Date + town: one flowing line. If the town is too long it wraps,
   and the next line starts under the date numbers (hanging indent past the day name). */
.meredyt-schedule .schedule-head {
  grid-area: head;
  padding-left: var(--schedule-day-w);
  text-indent: calc(-1 * var(--schedule-day-w));
  overflow-wrap: break-word;
}

.meredyt-schedule .schedule-date {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.meredyt-schedule .schedule-day {
  display: inline-block;
  width: var(--schedule-day-w);
  text-indent: 0;
  font-weight: 400;
  color: var(--schedule-muted);
}

.meredyt-schedule .schedule-date strong {
  font-weight: 700;
}

/* Town: same font as the date, bold capitals, a dash in front */
.meredyt-schedule .schedule-town {
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--schedule-text);
}

.meredyt-schedule .schedule-town::before {
  content: "\2013\00a0";   /* "– " glued to the first word of the town */
  margin-left: 2px;
  font-weight: 400;
  color: var(--schedule-muted);
}

/* Name under the date, Facebook icon to the right, centered between the two lines.
   The wrappers step aside so the name and icon sit straight in the row's grid. */
.meredyt-schedule .schedule-info,
.meredyt-schedule .schedule-name-row {
  display: contents;
}

.meredyt-schedule .schedule-name {
  grid-area: info;
  padding-left: var(--schedule-day-w);
  min-width: 0;
  margin: 0;
  font-family: "Inter", sans-serif;   /* same font as the date */
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.15px;
  text-transform: uppercase;
  color: var(--schedule-muted);
  text-decoration: none;
  overflow-wrap: break-word;
}

.meredyt-schedule .schedule-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--schedule-muted);
  overflow-wrap: break-word;
}

.meredyt-schedule .schedule-social {
  grid-area: fb;
  align-self: center;
  justify-self: stretch;      /* fills the space left between the text and the time */
  container: schedule-fb / inline-size;
  display: flex;
  margin: 0;
  padding: 0 0 0 8px;
}

/* The icon hugs the text. When the text is so long that the space before the time
   is too narrow for the icon, the icon simply disappears instead of overlapping. */
@container schedule-fb (max-width: 29px) {
  .meredyt-schedule .schedule-social .schedule-facebook {
    display: none;
  }
}

.meredyt-schedule .schedule-facebook {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--schedule-text);
  color: var(--schedule-bg);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.meredyt-schedule .schedule-facebook svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.meredyt-schedule .schedule-facebook:hover {
  background: var(--schedule-accent);
  transform: translateY(-2px);
}

.meredyt-schedule .schedule-facebook:focus-visible {
  outline: 2px solid var(--schedule-accent);
  outline-offset: 4px;
}

/* Time, right-aligned in its column */
.meredyt-schedule .schedule-time {
  grid-area: time;
  justify-self: end;
  font-family: "Space Mono", monospace;
  font-weight: 400;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: var(--schedule-muted);
  white-space: nowrap;
}

/* Status */
.meredyt-schedule .schedule-status {
  grid-area: status;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.3px;
  color: var(--schedule-accent);
  overflow-wrap: break-word;
}

.meredyt-schedule .schedule-status:empty {
  display: none;
}

/* Cancelled concerts */
.meredyt-schedule .is-cancelled .schedule-head,
.meredyt-schedule .is-cancelled .schedule-town,
.meredyt-schedule .is-cancelled .schedule-name {
  color: var(--schedule-muted);
  text-decoration: line-through;
}

/* Tablets */
@media (max-width: 1024px) {
  .meredyt-schedule .schedule-concert {
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr) 64px;
    grid-template-areas:
      "head   fb     time"
      "info   fb     time";
    gap: 2px 12px;
    padding: 11px 0;
  }
}

/* Time (and the status on desktop) sit in the middle of the two lines */
.meredyt-schedule .schedule-time,
.meredyt-schedule .schedule-status {
  align-self: center;
}

/* Tablets and phones: a cancelled concert has the time on the first line
   and ZRUŠENO right-aligned under it, on the name's line */
@media (max-width: 1024px) {
  .meredyt-schedule .is-cancelled .schedule-time {
    grid-row: 1;
    align-self: baseline;
  }

  .meredyt-schedule .schedule-status {
    grid-area: auto;
    grid-row: 2;
    grid-column: -2;
    justify-self: end;
    align-self: baseline;
    white-space: nowrap;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .meredyt-schedule {
    max-width: 480px;
    padding: 20px 12px;
    font-size: 13px;
  }

  .meredyt-schedule .schedule-month + .schedule-month {
    margin-top: 24px;
    padding-top: 24px;
  }

  .meredyt-schedule .schedule-month-title {
    margin-bottom: 14px;
    font-size: 24px;
  }

  .meredyt-schedule .schedule-concert {
    --schedule-day-w: 24px;
    /* Phone: text takes the free width and wraps before the icon; the Facebook icon has its
       own fixed column just left of the time, so a long name or town can never run under it. */
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr) minmax(46px, auto);   /* time column widens for ZRUŠENO */
    gap: 2px 8px;
  }

  .meredyt-schedule .schedule-facebook {
    width: 22px;
    height: 22px;
  }

  .meredyt-schedule .schedule-facebook svg {
    width: 14px;
    height: 14px;
  }

  .meredyt-schedule .schedule-head {
    font-size: 14px;
  }

  .meredyt-schedule .schedule-detail {
    font-size: 12px;
  }

  .meredyt-schedule .schedule-name {
    font-size: 12.5px;
  }

  .meredyt-schedule .schedule-time {
    font-size: 12px;
  }

  .meredyt-schedule .schedule-status {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .meredyt-schedule .schedule-facebook {
    transition: none;
  }

  .meredyt-schedule .schedule-facebook:hover {
    transform: none;
  }
}