/* Versenynaptár: következő futam kiemelve, bajnokság szerinti szűrő, hónapokra és napokra bontott lista */
.hv-cal {
  --hv-red: #e10600;
  --hv-card: #1c1c1c;
  --hv-line: rgba(255, 255, 255, 0.09);
}

.hv-cal [hidden] {
  display: none !important;
}

/* Következő futam */
.hv-cal-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 22px 24px;
  color: inherit;
  text-decoration: none;
  background:
    repeating-linear-gradient(-55deg, rgba(255, 255, 255, 0.03) 0 14px, transparent 14px 28px),
    linear-gradient(100deg, #2a0705 0%, #1c1c1c 60%);
  border: 1px solid rgba(225, 6, 0, 0.45);
  border-left: 4px solid var(--hv-red);
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.hv-cal-next:hover,
.hv-cal-next:focus {
  color: inherit;
  border-color: var(--hv-red);
}

.hv-cal-next:focus-visible,
.hv-cal-filter:focus-visible,
.hv-cal-event:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hv-cal-next__label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff5a55;
}

.hv-cal-next__title {
  margin: 0 0 6px;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.hv-cal-next__info {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.95rem;
  color: #c4c4c4;
}

.hv-cal-next__info i {
  margin-right: 7px;
  color: #8f8f8f;
}

.hv-cal-next__info img {
  width: 18px;
  height: 18px;
  margin-right: 7px;
  object-fit: contain;
}

.hv-cal-next__when {
  flex: 0 0 auto;
  text-align: right;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
}

.hv-cal-next__when strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.hv-cal-next__when span {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #c4c4c4;
}

/* Szűrő */
.hv-cal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.hv-cal-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 14px;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #cfcfcf;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hv-cal-filter:hover {
  color: #fff;
  border-color: #fff;
}

.hv-cal-filter small {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.7;
}

.hv-cal-filter[aria-pressed="true"] {
  color: #fff;
  background: var(--hv-red);
  border-color: var(--hv-red);
}

/* Hónap (a globális section térközt itt kikapcsoljuk) */
.hv-cal-month {
  padding: 0;
}

.hv-cal-month + .hv-cal-month {
  margin-top: 36px;
}

.hv-cal-month__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding-left: 16px;
  border-left: 4px solid var(--hv-red);
}

.hv-cal-month__head h2 {
  margin: 0;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.hv-cal-month__count {
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8f8f8f;
}

.hv-cal-days {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Nap: bal oldalt a dátumblokk, jobb oldalt az aznapi futamok */
.hv-cal-day {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  background: var(--hv-card);
  border: 1px solid var(--hv-line);
  border-left: 3px solid transparent;
  border-radius: 6px;
}

.hv-cal-day--soon {
  border-left-color: var(--hv-red);
}

.hv-cal-day .hv-race__date {
  align-self: start;
}

.hv-cal-day__events {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hv-cal-event {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.hv-cal-event + .hv-cal-event {
  border-top: 1px solid var(--hv-line);
}

.hv-cal-event:hover,
.hv-cal-event:focus {
  color: inherit;
  background: #242424;
}

.hv-cal-event__time {
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hv-cal-event__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 2px;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.hv-cal-event__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px;
  color: #fff;
  background: var(--hv-red);
  border-radius: 3px;
}

.hv-cal-event__title {
  display: block;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.hv-cal-event__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  margin-top: 2px;
  font-size: 0.88rem;
  color: #bdbdbd;
}

.hv-cal-event__info i {
  margin-right: 6px;
  color: #7f7f7f;
}

.hv-cal-event__info img {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  object-fit: contain;
}

.hv-cal-event__arrow {
  color: #7f7f7f;
  transition: color 0.2s ease, transform 0.2s ease;
}

.hv-cal-event:hover .hv-cal-event__arrow {
  color: #fff;
  transform: translateX(3px);
}

@media (max-width: 575.98px) {
  .hv-cal-next {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
  }

  .hv-cal-next__when {
    text-align: left;
  }

  .hv-cal-filters {
    flex-wrap: nowrap;
    margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    padding-inline: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .hv-cal-filters::-webkit-scrollbar {
    display: none;
  }

  .hv-cal-filter {
    flex: 0 0 auto;
  }

  .hv-cal-day {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .hv-cal-event {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 4px;
  }

  .hv-cal-event__time {
    font-size: 1.1rem;
  }

  .hv-cal-event__arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hv-cal-next,
  .hv-cal-filter,
  .hv-cal-event,
  .hv-cal-event__arrow {
    transition: none;
  }

  .hv-cal-event:hover .hv-cal-event__arrow {
    transform: none;
  }
}
