/**
 * Mendelssohn Booking – front-end styles.
 *
 * All selectors are prefixed with .mdb- to avoid theme/plugin conflicts.
 * Colors are exposed as CSS custom properties so the theme can override:
 *   --mdb-accent, --mdb-accent-2, --mdb-bg, --mdb-text
 * Typography is inherited from the active theme.
 */

.mdb-app,
.mdb-form {
	--mdb-c-accent: var(--mdb-accent, #5c2e4f);
	--mdb-c-accent-2: var(--mdb-accent-2, #c99a3c);
	--mdb-c-bg: var(--mdb-bg, #fafaf8);
	--mdb-c-text: var(--mdb-text, #141114);
	--mdb-c-border: rgba(20, 17, 20, 0.14);
	--mdb-c-muted: rgba(20, 17, 20, 0.62);
	color: var(--mdb-c-text);
	font-size: var(--mdb-rozmiar-tekstu, inherit);
	max-width: var(--mdb-szerokosc, 640px);
	margin-left: auto;
	margin-right: auto;
}

.mdb-app *,
.mdb-form * {
	box-sizing: border-box;
}

/* Editable fields must never overflow their blocks. */
.mdb-app input,
.mdb-app select,
.mdb-app textarea,
.mdb-form input,
.mdb-form select,
.mdb-form textarea {
	max-width: 100%;
}

/* ---------- Notices ---------- */

.mdb-notice {
	padding: 0.9em 1.1em;
	border-left: 3px solid var(--mdb-c-accent);
	background: var(--mdb-c-bg);
	margin: 0 0 1.25em;
}

.mdb-notice--success {
	border-left-color: #2e7d4f;
}

.mdb-notice--error {
	border-left-color: #b3261e;
}

/* ---------- Buttons ---------- */

.mdb-btn {
	display: inline-block;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	padding: 0.8em 1.6em;
	border: 1px solid transparent;
	border-radius: var(--mdb-zaokraglenie, 3px);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mdb-btn--primary {
	background: var(--mdb-c-accent);
	color: #fff;
}

.mdb-btn--primary:hover,
.mdb-btn--primary:focus {
	background: #46233c;
	color: #fff;
}

.mdb-btn--ghost {
	background: transparent;
	color: var(--mdb-c-accent);
	border-color: currentColor;
}

.mdb-btn--ghost:hover,
.mdb-btn--ghost:focus {
	background: var(--mdb-c-accent);
	color: #fff;
}

.mdb-btn--danger {
	background: transparent;
	color: #b3261e;
	border-color: currentColor;
}

.mdb-btn--danger:hover,
.mdb-btn--danger:focus {
	background: #b3261e;
	color: #fff;
}

.mdb-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.mdb-app :focus-visible,
.mdb-form :focus-visible {
	outline: 2px solid var(--mdb-c-accent-2);
	outline-offset: 2px;
}

/* ---------- Calendar ---------- */

.mdb-cal {
	margin: 0 0 1.5em;
}

.mdb-cal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5em;
	margin-bottom: 0.75em;
}

/* Selektor wzmocniony klasą rodzica — tytuł to <h2>, motyw (Astra) celuje
   w nagłówki mocniejszymi selektorami i rozdmuchuje rozmiar. */
.mdb-cal .mdb-cal__title {
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
}

.mdb-cal__nav {
	background: transparent;
	border: 1px solid var(--mdb-c-border);
	border-radius: var(--mdb-zaokraglenie, 3px);
	width: 2em;
	height: 2em;
	font-size: 1em;
	line-height: 1;
	cursor: pointer;
	color: var(--mdb-c-text);
}

.mdb-cal__nav:hover:not(:disabled) {
	border-color: var(--mdb-c-accent);
	color: var(--mdb-c-accent);
}

.mdb-cal__nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.mdb-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 3px;
}

.mdb-cal__weekday {
	text-align: center;
	font-size: 0.72em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mdb-c-muted);
	padding: 0.3em 0;
}

/* Bez aspect-ratio: w połączeniu z min-height wymuszało minimalną
   szerokość komórki i rozpychało stronę w poziomie na mobile. */
.mdb-cal__day {
	position: relative;
	min-height: 2.4em;
	min-width: 0;
	padding: 0.25em 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font: inherit;
	font-size: 0.95em;
	background: var(--mdb-c-bg);
	border: 1px solid transparent;
	border-radius: var(--mdb-zaokraglenie, 3px);
	color: var(--mdb-c-text);
	cursor: pointer;
}

/* Stały (przezroczysty) slot na kropkę — numery dni w całej siatce są
   jednakowo wycentrowane w pionie. */
.mdb-cal__day::after {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: transparent;
	margin-top: 2px;
	flex: 0 0 auto;
}

.mdb-cal__day--empty {
	background: transparent;
	cursor: default;
}

.mdb-cal__day:disabled {
	color: var(--mdb-c-muted);
	opacity: 0.45;
	cursor: not-allowed;
}

.mdb-cal__day--has {
	border-color: var(--mdb-c-border);
	background: rgba(201, 154, 60, 0.1);
	font-weight: 600;
}

.mdb-cal__day--has::after {
	background: var(--mdb-c-accent-2);
}

.mdb-cal__day--has:hover,
.mdb-cal__day--has:focus {
	border-color: var(--mdb-c-accent);
}

.mdb-cal__day[aria-pressed="true"] {
	background: var(--mdb-c-accent);
	border-color: var(--mdb-c-accent);
	color: #fff;
}

.mdb-cal__day[aria-pressed="true"]::after {
	background: #fff;
}

/* ---------- Slot list ---------- */

.mdb-slots__title {
	font-size: 1em;
	font-weight: 700;
	margin: 0 0 0.6em;
}

.mdb-slots__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}

.mdb-slots__list li {
	margin: 0;
}

.mdb-slot {
	display: block;
	font: inherit;
	padding: 0.6em 1em;
	background: var(--mdb-c-bg);
	border: 1px solid var(--mdb-c-border);
	border-radius: var(--mdb-zaokraglenie, 3px);
	cursor: pointer;
	color: var(--mdb-c-text);
	text-align: center;
}

.mdb-slot small {
	display: block;
	font-size: 0.78em;
	color: var(--mdb-c-muted);
}

.mdb-slot:hover:not(:disabled),
.mdb-slot:focus:not(:disabled) {
	border-color: var(--mdb-c-accent);
}

.mdb-slot:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	text-decoration: line-through;
}

.mdb-slots__hint {
	color: var(--mdb-c-muted);
	margin: 0 0 1.5em;
}

/* ---------- Forms ---------- */

.mdb-form__intro {
	margin-top: 0;
}

.mdb-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1.25em;
}

.mdb-field {
	margin: 0 0 1em;
}

.mdb-field label {
	display: block;
	font-weight: 600;
	font-size: 0.92em;
	margin-bottom: 0.3em;
}

.mdb-field__hint {
	display: block;
	font-size: 0.82em;
	color: var(--mdb-c-muted);
	margin: 0.1em 0 0.35em;
}

.mdb-field select {
	width: 100%;
	font: inherit;
	padding: var(--mdb-padding-pol, 0.6em 0.75em);
	border: 1px solid var(--mdb-c-border);
	border-radius: var(--mdb-zaokraglenie, 3px);
	background: #fff;
	color: var(--mdb-c-text);
}

.mdb-field input[type="text"],
.mdb-field input[type="email"],
.mdb-field input[type="tel"],
.mdb-field input[type="number"],
.mdb-field input[type="date"],
.mdb-field textarea {
	width: 100%;
	font: inherit;
	padding: var(--mdb-padding-pol, 0.6em 0.75em);
	border: 1px solid var(--mdb-c-border);
	border-radius: var(--mdb-zaokraglenie, 3px);
	background: #fff;
	color: var(--mdb-c-text);
}

.mdb-field input:focus,
.mdb-field select:focus,
.mdb-field textarea:focus {
	border-color: var(--mdb-c-accent);
	box-shadow: 0 0 0 3px rgba(92, 46, 79, 0.14);
	outline: none;
}

.mdb-field--consent label {
	display: flex;
	gap: 0.6em;
	align-items: flex-start;
	font-weight: 400;
	font-size: 0.88em;
	line-height: 1.5;
}

.mdb-field--consent input {
	margin-top: 0.25em;
	flex: none;
}

.mdb-req {
	color: #b3261e;
}

/* Honeypot — visually hidden, still in the DOM for bots. */
.mdb-field--hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mdb-form__msg:empty {
	display: none;
}

.mdb-form__msg {
	padding: 0.8em 1em;
	border-left: 3px solid #b3261e;
	background: var(--mdb-c-bg);
	margin: 0 0 1em;
}

.mdb-form__msg--success {
	border-left-color: #2e7d4f;
}

.mdb-form__actions {
	display: flex;
	gap: 0.75em;
	align-items: center;
	flex-wrap: wrap;
}

/* ---------- Ticket steppers ---------- */

.mdb-tickets {
	border: 1px solid var(--mdb-c-border);
	border-radius: var(--mdb-zaokraglenie, 3px);
	padding: 0.25em 1em;
	margin: 0 0 1em;
}

.mdb-ticket-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 0.7em 0;
}

.mdb-ticket-row + .mdb-ticket-row {
	border-top: 1px solid var(--mdb-c-border);
}

.mdb-ticket-row__label {
	font-weight: 600;
	font-size: 0.95em;
}

.mdb-stepper {
	display: flex;
	align-items: center;
	gap: 0.4em;
}

.mdb-stepper__btn {
	width: 2.2em;
	height: 2.2em;
	font-size: 1em;
	line-height: 1;
	border: 1px solid var(--mdb-c-border);
	background: #fff;
	border-radius: var(--mdb-zaokraglenie, 3px);
	cursor: pointer;
	color: var(--mdb-c-text);
}

.mdb-stepper__btn:hover:not(:disabled) {
	border-color: var(--mdb-c-accent);
	color: var(--mdb-c-accent);
}

.mdb-stepper__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.mdb-stepper__value {
	min-width: 2em;
	text-align: center;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.mdb-tickets__total {
	padding: 0.7em 0;
	border-top: 2px solid var(--mdb-c-text);
	display: flex;
	justify-content: space-between;
	font-weight: 700;
	font-size: 0.95em;
}

/* ---------- Selected slot summary ---------- */

.mdb-summary {
	display: flex;
	align-items: baseline;
	gap: 0.5em;
	flex-wrap: wrap;
	padding: 0.8em 1em;
	background: var(--mdb-c-bg);
	border-left: 3px solid var(--mdb-c-accent-2);
	margin: 0 0 1.25em;
}

.mdb-summary strong {
	font-size: 1.05em;
}

/* ---------- Confirmation ---------- */

.mdb-confirm {
	text-align: center;
	padding: 2em 1em;
	background: var(--mdb-confirm-bg, #fff);
	color: var(--mdb-confirm-text, inherit);
	border: 1px solid var(--mdb-c-border);
	border-top: 3px solid var(--mdb-confirm-border, var(--mdb-c-accent));
}

.mdb-confirm__title {
	margin: 0 0 0.5em;
	font-size: 1.4em;
}

.mdb-confirm__code {
	display: inline-block;
	font-size: 1.6em;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--mdb-c-accent);
	border: 2px dashed var(--mdb-c-accent-2);
	border-radius: var(--mdb-zaokraglenie, 3px);
	padding: 0.4em 1em;
	margin: 0.5em 0 1em;
}

/* ---------- Manage card ---------- */

.mdb-card {
	border: 1px solid var(--mdb-c-border);
	border-top: 3px solid var(--mdb-c-accent);
	padding: 1.75em;
	background: #fff;
}

.mdb-card__title {
	margin: 0 0 1em;
	font-size: 1.3em;
}

.mdb-card__code {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	margin: 0 0 1.25em;
}

.mdb-card__code span {
	font-size: 0.82em;
	color: var(--mdb-c-muted);
}

.mdb-card__code strong {
	font-size: 1.5em;
	letter-spacing: 0.1em;
	color: var(--mdb-c-accent);
}

.mdb-card__details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.5em 1.5em;
	margin: 0 0 1.5em;
}

.mdb-card__details dt {
	color: var(--mdb-c-muted);
	font-size: 0.9em;
}

.mdb-card__details dd {
	margin: 0;
	font-weight: 600;
}

.mdb-card__hint {
	font-size: 0.85em;
	color: var(--mdb-c-muted);
	margin: 0.75em 0 0;
}

.mdb-badge {
	display: inline-block;
	font-size: 0.8em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.25em 0.7em;
	border-radius: 2em;
}

.mdb-badge--ok {
	background: rgba(46, 125, 79, 0.12);
	color: #2e7d4f;
}

.mdb-badge--cancelled {
	background: rgba(179, 38, 30, 0.1);
	color: #b3261e;
}

/* ---------- Loading ---------- */

.mdb-app__loading {
	color: var(--mdb-c-muted);
	padding: 1.5em 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
	.mdb-form__grid {
		grid-template-columns: 1fr;
	}

	.mdb-cal .mdb-cal__title {
		font-size: 1em;
	}

	.mdb-cal__nav {
		width: 1.9em;
		height: 1.9em;
	}

	.mdb-cal__grid {
		gap: 2px;
	}

	.mdb-cal__weekday {
		font-size: 0.62em;
	}

	.mdb-cal__day {
		min-height: 2.2em;
		font-size: 0.85em;
	}

	.mdb-slot {
		flex: 1 1 calc(33.333% - 0.5em);
	}

	.mdb-form__actions .mdb-btn {
		width: 100%;
		text-align: center;
	}

	.mdb-card {
		padding: 1.25em;
	}

	.mdb-card__details {
		grid-template-columns: 1fr;
		gap: 0.1em;
	}

	.mdb-card__details dd {
		margin-bottom: 0.6em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mdb-app *,
	.mdb-form * {
		transition: none;
	}
}
