/*
 * Event calendar ([gysz_event_calendar]) in the "A · Türkiz sáv" design: the turquoise band, the cream "Szűrők"
 * panel with white boxes (type filter and legend, month calendar) beside the list of white cards in weekly groups.
 *
 * 1. Base   2. Band   3. Layout   4. Panel, type filter   5. Month calendar and week strip   6. Result line
 * 7. Groups and cards   8. Empty list, more   9. Tablet   10. Phone
 *
 * The theme's tokens and components (theme.css: colours, fonts, .band, .button) are used; this file loads after it.
 * `--gysz-cal-type` is the colour of an event type, set inline on every element that shows one. Breakpoints as in
 * the theme: 760px, 1024px (the panel beside the list).
 */

/* 1. Base -------------------------------------------------------------------------------------------------- */

.gysz-cal {
	--gysz-cal-type: var(--c-teal);
	color: var(--c-text);
}
.gysz-cal [hidden] {
	display: none !important;
}
.gysz-cal a:focus-visible,
.gysz-cal button:focus-visible,
.gysz-cal input:focus-visible {
	outline: 3px solid var(--c-gold);
	outline-offset: 2px;
}
.gysz-cal__short {
	display: none;
}
/* The type's mark: a dot, or a ring for the types drawn outlined. */
.gysz-cal__mark {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--gysz-cal-type);
}
.gysz-cal__mark--ring {
	border: 2.5px solid var(--gysz-cal-type);
	background: var(--c-white);
}
.gysz-cal__mark--all {
	background: none;
}

/* 2. Band -------------------------------------------------------------------------------------------------- */

.gysz-cal__band {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 40px;
}
.gysz-cal__band-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.gysz-cal__eyebrow {
	color: var(--c-gold);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .16em;
	line-height: 1.5;
	text-transform: uppercase;
}
.gysz-cal__intro {
	max-width: 620px;
	margin-top: 2px;
	color: rgba(255, 255, 255, .9);
	font-size: 14px;
	line-height: 1.5;
}
.gysz-cal__total {
	display: none;
	padding: 6px 20px;
	border: 2px solid var(--c-gold);
	border-radius: 40px;
	color: var(--c-white);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}
@media (min-width: 760px) {
	.gysz-cal__eyebrow {
		font-size: 12px;
	}
	.gysz-cal__intro {
		font-size: 15px;
	}
	.gysz-cal__total {
		display: inline-block;
	}
}

/* 3. Layout ------------------------------------------------------------------------------------------------ */

.gysz-cal__inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 16px var(--gutter) 40px;
}
.gysz-cal__side,
.gysz-cal__list {
	min-width: 0;
}
.gysz-cal__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
@media (min-width: 760px) {
	.gysz-cal__inner {
		gap: 24px;
		padding: 28px var(--gutter) 56px;
	}
	.gysz-cal__list {
		gap: 20px;
	}
}
@media (min-width: 1024px) {
	.gysz-cal__inner {
		display: grid;
		grid-template-columns: 312px minmax(0, 1fr);
		align-items: start;
		gap: 32px;
		padding-top: 40px;
		padding-bottom: 64px;
	}
}
/* The panel stays in view while the list scrolls, where it fits the window. */
@media (min-width: 1024px) and (min-height: 860px) {
	.gysz-cal__side {
		position: sticky;
		top: calc(16px + var(--gysz-cal-sticky-offset, var(--header-height)));
	}
}

/* 4. Panel, type filter ------------------------------------------------------------------------------------ */

.gysz-cal__panel {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 18px;
	border-radius: var(--radius);
	background: var(--c-blush);
}
.gysz-cal__panel-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}
.gysz-cal__panel-title {
	font-size: 26px;
}
.gysz-cal__clear {
	color: var(--c-teal);
	font-size: 13px;
	font-weight: 600;
}
.gysz-cal__clear:hover {
	color: var(--c-pink);
}
.gysz-cal__box {
	padding: 14px 16px 16px;
	border-top: 4px solid var(--c-teal-light);
	border-radius: 8px;
	background: var(--c-white);
}
.gysz-cal__box-title {
	margin-bottom: 6px;
	color: var(--c-ink);
	font-family: var(--f-body);
	font-size: 14px;
	font-weight: 700;
}
.gysz-cal__filters {
	display: flex;
	flex-direction: column;
	list-style: none;
}
.gysz-cal__filter {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	color: var(--c-text);
	font-size: 14px;
	text-decoration: none;
}
.gysz-cal__filter:hover {
	color: var(--c-teal);
}
.gysz-cal__filter-name {
	flex: 1;
	min-width: 0;
}
.gysz-cal__filter-count {
	flex: none;
	min-width: 26px;
	color: var(--c-muted);
	font-size: 12px;
	text-align: right;
}
.gysz-cal__filter.is-active {
	color: var(--c-teal);
	font-weight: 700;
}
.gysz-cal__filter.is-active .gysz-cal__filter-count {
	padding: 1px 8px;
	border-radius: 20px;
	background: var(--c-teal);
	color: var(--c-white);
	font-weight: 700;
	text-align: center;
}
.gysz-cal__only-open {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--c-line);
	color: var(--c-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	cursor: pointer;
}
.gysz-cal__only-open-input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--c-teal);
}

/* 5. Month calendar and week strip ------------------------------------------------------------------------- */

.gysz-cal__month-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.gysz-cal__month-title {
	font-size: 17px;
	text-align: center;
	white-space: nowrap;
}
.gysz-cal__nav {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--c-blush);
	color: var(--c-teal);
	cursor: pointer;
}
.gysz-cal__nav:hover {
	background: var(--c-line-strong);
	color: var(--c-teal);
}
.gysz-cal__nav.is-disabled,
.gysz-cal__nav:disabled {
	opacity: .35;
	cursor: default;
}
.gysz-cal__nav:disabled:hover {
	background: var(--c-blush);
}
.gysz-cal__weekdays,
.gysz-cal__days,
.gysz-cal__week-days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}
.gysz-cal__weekdays {
	margin-top: 10px;
	color: var(--c-teal);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	text-align: center;
	text-transform: uppercase;
}
.gysz-cal__weekdays .is-weekend {
	color: var(--c-muted);
}
.gysz-cal__days {
	row-gap: 2px;
	margin-top: 4px;
}
.gysz-cal__day {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	height: 40px;
	color: var(--c-text);
	font-size: 13px;
	line-height: 1.5;
	text-decoration: none;
}
.gysz-cal__day.is-past {
	color: #9a9a9a;
}
.gysz-cal__day.has-events {
	color: var(--c-teal);
	font-weight: 700;
}
a.gysz-cal__day:hover .gysz-cal__num {
	color: var(--c-pink);
}
.gysz-cal__day.is-today .gysz-cal__num,
.gysz-cal__week-day.is-today .gysz-cal__week-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--c-gold);
	color: var(--c-ink);
	font-weight: 700;
}
.gysz-cal__day.is-today {
	gap: 0;
}
.gysz-cal__dots {
	display: flex;
	gap: 3px;
	height: 6px;
}
.gysz-cal__day.is-past .gysz-cal__dots,
.gysz-cal__week-day.is-past .gysz-cal__dots {
	opacity: .5;
}
.gysz-cal__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--gysz-cal-type);
}
.gysz-cal__dot--ring {
	border: 1.5px solid var(--gysz-cal-type);
	background: transparent;
}
.gysz-cal__dot.is-off {
	border: 0;
	background: #b5b5b5;
}
.gysz-cal__hint {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--c-line);
	color: var(--c-muted);
	font-size: 12px;
}

/* The week strip: phones, built by the script. */
.gysz-cal__week {
	display: none;
}
.gysz-cal__week-title {
	font-size: 17px;
}
.gysz-cal__week-days {
	margin-top: 8px;
}
.gysz-cal__week-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	height: 62px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--c-text);
	cursor: default;
}
.gysz-cal__week-day.has-events {
	cursor: pointer;
}
.gysz-cal__week-day.has-events:hover {
	background: var(--c-blush);
}
.gysz-cal__week-letter {
	color: var(--c-teal);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
}
.gysz-cal__week-day.is-weekend .gysz-cal__week-letter {
	color: var(--c-muted);
}
.gysz-cal__week-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 26px;
	font-size: 14px;
	line-height: 1;
}
.gysz-cal__week-day.is-past .gysz-cal__week-num {
	color: #9a9a9a;
}
.gysz-cal__week-day.has-events .gysz-cal__week-num {
	color: var(--c-teal);
	font-weight: 700;
}
.gysz-cal__week-toggle {
	width: 100%;
	min-height: 44px;
	margin-top: 4px;
	padding: 0;
	border: 0;
	border-top: 1px solid var(--c-line);
	background: transparent;
	color: var(--c-teal);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.gysz-cal__week-toggle:hover {
	color: var(--c-pink);
}

/* 6. Result line ------------------------------------------------------------------------------------------- */

.gysz-cal__results {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	min-height: 40px;
}
.gysz-cal__count {
	color: var(--c-muted);
	font-size: 14px;
}
.gysz-cal__count-number {
	color: var(--c-ink);
	font-weight: 700;
}
.gysz-cal__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.gysz-cal__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid var(--c-field);
	border-radius: 40px;
	background: var(--c-white);
	color: var(--c-teal);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.gysz-cal__chip:hover {
	border-color: var(--c-teal);
	color: var(--c-teal);
}

/* 7. Groups and cards -------------------------------------------------------------------------------------- */

.gysz-cal__group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.gysz-cal__group + .gysz-cal__group {
	margin-top: 10px;
}
.gysz-cal__group-title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 12px;
	font-size: 22px;
}
.gysz-cal__group-range {
	color: var(--c-muted);
	font-family: var(--f-body);
	font-size: 13px;
	font-weight: 600;
}

.gysz-cal__item {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	grid-template-areas:
		"date body"
		"aside aside";
	gap: 12px;
	padding: 12px;
	border-top: 4px solid var(--c-teal-light);
	border-radius: var(--radius);
	background: var(--c-white);
	box-shadow: var(--shadow-card);
	scroll-margin-top: calc(16px + var(--gysz-cal-sticky-offset, var(--header-height)));
}
.gysz-cal__item.is-target {
	box-shadow: 0 0 0 3px var(--c-gold), var(--shadow-card);
}

/* The date tile. */
.gysz-cal__date {
	grid-area: date;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	align-self: start;
	padding: 8px 4px;
	border-radius: 8px;
	background: var(--c-blush);
	text-align: center;
}
.gysz-cal__weekday,
.gysz-cal__monthname {
	color: var(--c-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.4;
	text-transform: uppercase;
}
.gysz-cal__daynum {
	color: var(--c-teal);
	font-family: var(--f-display);
	font-size: 28px;
	line-height: 1.15;
}

.gysz-cal__media {
	grid-area: media;
	display: none;
	overflow: hidden;
	width: 104px;
	height: 104px;
	border-radius: 8px;
}
.gysz-cal__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.gysz-cal__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--c-teal-wash);
	color: var(--c-teal-light);
}
.gysz-cal__item.is-off .gysz-cal__img {
	filter: grayscale(1);
	opacity: .6;
}

.gysz-cal__body {
	grid-area: body;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.gysz-cal__type {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	color: var(--gysz-cal-type);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1.5;
	text-transform: uppercase;
}
.gysz-cal__state {
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--c-muted);
	color: var(--c-white);
	letter-spacing: .08em;
}
.gysz-cal__title {
	font-size: 17px;
	line-height: 1.3;
}
.gysz-cal__title a {
	color: var(--c-teal);
	text-decoration: none;
}
.gysz-cal__title a:hover {
	color: var(--c-pink);
}
.gysz-cal__item.is-off .gysz-cal__title a {
	color: var(--c-muted);
}
.gysz-cal__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 16px;
	color: var(--c-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
}
.gysz-cal__when,
.gysz-cal__where {
	display: inline-flex;
	align-items: flex-start;
	gap: 6px;
}
.gysz-cal__meta .gysz-cal__icon {
	flex: none;
	margin-top: 2px;
	color: var(--c-teal);
}
.gysz-cal__where-rest {
	color: var(--c-muted);
	font-weight: 500;
}
.gysz-cal__summary {
	display: none;
	color: var(--c-text);
	font-size: 14px;
	line-height: 1.55;
}

.gysz-cal__aside {
	grid-area: aside;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	padding-top: 10px;
	border-top: 1px solid var(--c-line);
}
.gysz-cal__cost {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}
.gysz-cal__price {
	color: var(--c-ink);
	font-size: 16px;
	font-weight: 700;
}
.gysz-cal__price--off {
	color: var(--c-muted);
}
.gysz-cal__seats {
	color: var(--c-muted);
	font-size: 12px;
	font-weight: 600;
}
.gysz-cal__seats.is-few,
.gysz-cal__seats.is-full {
	color: var(--c-pink);
	font-weight: 700;
}
.gysz-cal__button {
	margin-left: auto;
}

/* 8. Empty list, more -------------------------------------------------------------------------------------- */

.gysz-cal__empty {
	padding: 24px 20px;
	border-top: 4px solid var(--c-teal-light);
	border-radius: var(--radius);
	background: var(--c-blush);
	color: var(--c-ink);
	text-align: center;
}
.gysz-cal__empty a {
	color: var(--c-pink);
	font-weight: 700;
}
.gysz-cal__more {
	display: flex;
	justify-content: center;
	margin-top: 8px;
}

/* 9. Tablet and up: the card in one row (date, picture, texts, price and button) ------------------------------ */

@media (min-width: 760px) {
	.gysz-cal__panel {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: start;
		gap: 16px 20px;
		padding: 20px 22px 22px;
	}
	.gysz-cal__panel-head {
		grid-column: 1 / -1;
	}
	.gysz-cal__months {
		grid-column: 2;
		grid-row: 2;
	}

	.gysz-cal__group-title {
		font-size: 26px;
	}
	.gysz-cal__item {
		grid-template-columns: 72px 104px minmax(0, 1fr) auto;
		grid-template-areas: "date media body aside";
		align-items: start;
		gap: 16px;
		padding: 16px;
	}
	.gysz-cal__date {
		height: 104px;
	}
	.gysz-cal__daynum {
		font-size: 32px;
	}
	.gysz-cal__media {
		display: block;
	}
	.gysz-cal__type {
		font-size: 11px;
	}
	.gysz-cal__title {
		font-size: 19px;
	}
	.gysz-cal__meta {
		font-size: 14px;
	}
	.gysz-cal__summary {
		display: block;
		margin-top: 2px;
	}
	.gysz-cal__aside {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: flex-end;
		justify-content: flex-start;
		align-self: stretch;
		min-width: 132px;
		padding-top: 0;
		border-top: 0;
		text-align: right;
	}
	.gysz-cal__price {
		font-size: 18px;
	}
	.gysz-cal__seats {
		font-size: 13px;
	}
	.gysz-cal__button {
		margin: auto 0 0;
	}
}
@media (min-width: 1024px) {
	.gysz-cal__panel {
		display: flex;
		padding: 18px;
	}
}

/* 10. Phone: the type filter as a row of chips, the week strip in place of the month ------------------------ */

@media (max-width: 759px) {
	.gysz-cal__panel {
		gap: 12px;
		padding: 0;
		background: none;
	}
	.gysz-cal__panel-head,
	.gysz-cal__box-title {
		display: none;
	}
	.gysz-cal__types {
		padding: 0;
		border: 0;
		background: none;
	}
	/* Positioned, so the row also clips the hidden screen-reader words of its chips. */
	.gysz-cal__filters {
		position: relative;
		flex-direction: row;
		gap: 8px;
		margin: 0 calc(-1 * var(--gutter));
		padding: 2px var(--gutter) 4px;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.gysz-cal__filters::-webkit-scrollbar {
		display: none;
	}
	.gysz-cal__filters li {
		flex: none;
	}
	.gysz-cal__filter {
		gap: 8px;
		min-height: 40px;
		padding: 0 14px;
		border: 1px solid var(--c-field);
		border-radius: 40px;
		background: var(--c-white);
		color: var(--c-teal);
		font-size: 13px;
		font-weight: 600;
		white-space: nowrap;
	}
	.gysz-cal__mark--all {
		display: none;
	}
	.gysz-cal__filter-count {
		min-width: 0;
	}
	.gysz-cal__filter.is-active {
		border-color: var(--c-teal);
		background: var(--c-teal);
		color: var(--c-white);
	}
	.gysz-cal__filter.is-active .gysz-cal__filter-count {
		padding: 0;
		background: none;
		color: rgba(255, 255, 255, .8);
	}
	.gysz-cal__filter.is-active .gysz-cal__mark {
		box-shadow: 0 0 0 2px var(--c-white);
	}
	.gysz-cal__only-open {
		margin-top: 10px;
		padding-top: 0;
		border-top: 0;
		font-weight: 500;
	}

	/* With the script running, the week strip stands in for the month calendar until the visitor opens it. */
	.gysz-cal.is-js .gysz-cal__week {
		display: block;
	}
	.gysz-cal.is-js .gysz-cal__months:not(.is-open) {
		display: none;
	}

	/* The long words give way to the short ones; the long ones stay for screen readers. */
	.gysz-cal__date,
	.gysz-cal__type {
		position: relative;
	}
	.gysz-cal__date .gysz-cal__long,
	.gysz-cal__type .gysz-cal__long {
		position: absolute;
		overflow: hidden;
		clip: rect(0 0 0 0);
		width: 1px;
		height: 1px;
		white-space: nowrap;
	}
	.gysz-cal__date .gysz-cal__short,
	.gysz-cal__type .gysz-cal__short {
		display: inline;
	}
	.gysz-cal__where-rest {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gysz-cal * {
		transition: none !important;
	}
}
