.madi-booking {
	--madi-booking-primary-color: #6c5ce7;
	--madi-primary: var(--madi-booking-primary-color);
	--madi-primary-dark: var(--madi-booking-primary-color);
	--madi-primary-soft: rgba(108, 92, 231, 0.12);
	--madi-primary-border: rgba(108, 92, 231, 0.45);
	--madi-border: #d8dee8;
	--madi-text: #172033;
	--madi-muted: #667085;
	--madi-surface: #ffffff;
	--madi-soft: #f5f7fb;
	max-width: 760px;
	margin: 24px auto;
	color: var(--madi-text);
	font-family: inherit;
}

.madi-booking *,
.madi-booking *::before,
.madi-booking *::after {
	box-sizing: border-box;
}

.madi-booking [hidden] {
	display: none !important;
}

.madi-booking__steps {
	display: flex;
	gap: 8px;
	margin-bottom: 18px;
}

.madi-booking__steps span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--madi-border);
	border-radius: 999px;
	color: var(--madi-muted);
	background: var(--madi-surface);
	font-size: 14px;
	font-weight: 700;
}

.madi-booking__steps span.is-active {
	border-color: var(--madi-primary);
	color: #ffffff;
	background: var(--madi-primary);
}

.madi-booking__panel {
	display: none;
	scroll-margin-top: 100px;
	border: 1px solid var(--madi-border);
	border-radius: 8px;
	padding: 22px;
	background: var(--madi-surface);
}

.madi-booking__panel.is-active {
	display: block;
}

.madi-booking-step__heading {
	margin-bottom: 18px;
}

.madi-booking-step__heading h2,
.madi-booking__panel > h2 {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
}

.madi-booking-step__help {
	margin: 6px 0 0;
	color: var(--madi-muted);
	font-size: 14px;
	line-height: 1.5;
}

.madi-booking__message {
	margin-bottom: 16px;
	padding: 12px 14px;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	background: #eff6ff;
	color: #1e3a8a;
}

.madi-booking__message.is-error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}

.madi-booking__selected-service {
	display: grid;
	gap: 4px;
	margin-bottom: 16px;
	padding: 12px 14px;
	border: 1px solid var(--madi-border);
	border-radius: 8px;
	background: var(--madi-soft);
}

.madi-booking__selected-service strong {
	font-size: 16px;
	line-height: 1.3;
}

.madi-booking__selected-service span {
	color: var(--madi-muted);
	font-size: 14px;
	line-height: 1.45;
}

.madi-selected-service {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid var(--madi-border);
	border-radius: 8px;
	background: var(--madi-soft);
}

.madi-selected-service__label {
	display: block;
	color: var(--madi-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.madi-selected-service__name {
	display: block;
	margin-top: 2px;
	color: var(--madi-text);
	font-size: 16px;
	line-height: 1.3;
}

.madi-selected-service__change {
	min-height: 34px;
	border: 1px solid var(--madi-primary-border);
	border-radius: 6px;
	padding: 6px 10px;
	color: var(--madi-primary);
	background: #ffffff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.madi-selected-service__change:hover,
.madi-selected-service__change:focus-visible {
	border-color: var(--madi-primary);
	background: var(--madi-primary-soft);
}

.madi-booking__services {
	display: grid;
	gap: 10px;
}

.madi-service-card,
.madi-time-slot {
	width: 100%;
	border: 1px solid var(--madi-border);
	border-radius: 8px;
	padding: 14px;
	color: var(--madi-text);
	background: var(--madi-surface);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.madi-service-card:hover,
.madi-service-card:focus-visible,
.madi-service-card.is-selected,
.madi-time-slot:hover,
.madi-time-slot:focus-visible,
.madi-time-slot.is-selected {
	border-color: var(--madi-primary);
	box-shadow: 0 0 0 2px var(--madi-primary-soft);
}

.madi-time-slots {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 10px;
}

.madi-time-slot {
	min-height: 44px;
	padding: 10px 12px;
	font-weight: 700;
	text-align: center;
}

.madi-time-slot.is-selected {
	border-color: var(--madi-primary);
	color: #ffffff;
	background: var(--madi-primary);
}

.madi-service-card strong {
	display: block;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
}

.madi-service-card__description {
	display: block;
	margin-top: 6px;
	color: var(--madi-muted);
	font-weight: 400;
	line-height: 1.5;
}

.madi-service-card__deposit {
	display: block;
	margin-top: 8px;
	color: var(--madi-text);
	font-weight: 600;
	line-height: 1.45;
}

.madi-service-card__deposit:empty {
	display: none;
}

.madi-service-card__duration,
.madi-service-card__price {
	display: block;
	margin-top: 8px;
	font-size: 14px;
	font-weight: 600;
}

.madi-service-card__details {
	display: grid;
	gap: 0;
	margin-top: 8px;
}

.madi-service-card__details:empty {
	display: none;
}

.madi-service-card__detail {
	display: block;
	margin: 0 0 6px 0;
	color: var(--madi-muted);
	font-size: 14px;
	line-height: 1.4;
}

.madi-service-card__detail:last-child {
	margin-bottom: 0;
}

.madi-service-card__detail-label {
	display: inline;
	margin-right: 4px;
	color: var(--madi-text);
	font-weight: 600;
}

.madi-service-card__detail-value {
	display: inline;
	font-weight: 400;
}

.madi-service-card__price {
	color: var(--madi-text);
	font-weight: 700;
}

.madi-booking-calendar {
	display: grid;
	gap: 14px;
}

.madi-calendar__header {
	display: grid;
	grid-template-columns: 40px 1fr 40px;
	gap: 10px;
	align-items: center;
}

.madi-calendar__header strong {
	text-align: center;
	text-transform: capitalize;
}

.madi-calendar__header button,
.madi-calendar__day {
	border: 1px solid var(--madi-border);
	border-radius: 6px;
	color: var(--madi-text);
	background: #ffffff;
	font: inherit;
	cursor: pointer;
}

.madi-calendar__header button {
	width: 40px;
	height: 40px;
	font-weight: 700;
}

.madi-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
	min-width: 0;
}

.madi-calendar__weekday {
	padding: 4px 0;
	color: var(--madi-muted);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
}

.madi-calendar__blank {
	min-height: 42px;
}

.madi-calendar__day {
	min-width: 0;
	min-height: 42px;
	padding: 6px;
	text-align: center;
}

.madi-calendar__day.is-available {
	border-color: var(--madi-primary-border);
	color: var(--madi-primary);
	font-weight: 700;
}

.madi-calendar__day.is-available:hover {
	border-color: var(--madi-primary);
	box-shadow: 0 0 0 2px var(--madi-primary-soft);
}

.madi-calendar__day.is-selected {
	border-color: var(--madi-primary);
	color: #ffffff;
	background: var(--madi-primary);
}

.madi-calendar__day:disabled,
.madi-calendar__header button:disabled {
	border-color: #e5e7eb;
	color: #a0a7b3;
	background: #f8fafc;
	cursor: not-allowed;
	box-shadow: none;
}

.madi-field {
	display: grid;
	gap: 6px;
	margin-bottom: 14px;
}

.madi-field span {
	font-weight: 700;
}

.madi-field .madi-field__control {
	display: block;
	font-weight: 400;
}

.madi-field small {
	color: var(--madi-muted);
	font-size: 13px;
	line-height: 1.35;
}

.madi-field input,
.madi-field select,
.madi-field textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--madi-border);
	border-radius: 6px;
	padding: 10px 12px;
	color: var(--madi-text);
	background: #ffffff;
	font: inherit;
}

.madi-field--checkbox {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.madi-field--checkbox input {
	width: auto;
	margin-top: 3px;
}

.madi-field--checkbox span {
	color: var(--madi-text);
	font-weight: 400;
	line-height: 1.45;
}

.madi-field--checkbox a {
	color: var(--madi-primary);
	font-weight: 600;
}

.madi-booking-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.madi-booking-summary,
.madi-booking__summary {
	display: grid;
	gap: 8px;
	margin: 16px 0;
	padding: 14px;
	border: 1px solid var(--madi-border);
	border-radius: 8px;
	background: var(--madi-soft);
}

.madi-booking-summary:empty,
.madi-booking__summary:empty {
	display: none;
}

.madi-booking-summary__item {
	display: grid;
	grid-template-columns: minmax(130px, 0.5fr) 1fr;
	gap: 10px;
	align-items: start;
	font-size: 14px;
	line-height: 1.4;
}

.madi-booking-summary__item strong {
	color: var(--madi-text);
	font-weight: 700;
}

.madi-booking-summary__item span {
	color: var(--madi-muted);
}

.madi-booking__summary p {
	margin: 0;
}

.madi-booking-success {
	border-color: var(--madi-primary-border);
	background: #ffffff;
}

.madi-booking-success__title {
	color: var(--madi-text);
}

.madi-booking-success__status {
	margin: 10px 0 0;
	color: var(--madi-text);
	font-weight: 700;
}

.madi-booking-success__details {
	margin-top: 16px;
}

.madi-booking__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.madi-button {
	min-height: 44px;
	border: 1px solid var(--madi-primary);
	border-radius: 6px;
	padding: 10px 16px;
	color: #ffffff;
	background: var(--madi-primary);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.madi-button:hover {
	background: var(--madi-primary-dark);
}

.madi-button:disabled {
	border-color: #cbd5e1;
	background: #cbd5e1;
	cursor: not-allowed;
}

.madi-button.is-loading {
	position: relative;
}

.madi-button--secondary {
	border-color: var(--madi-border);
	color: var(--madi-text);
	background: #ffffff;
}

.madi-button--secondary:hover {
	background: var(--madi-soft);
}

.madi-booking__muted {
	margin: 0;
	color: var(--madi-muted);
}

.madi-booking-reservations-panel {
	max-width: 1120px;
}

.madi-booking-reservations-filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	align-items: end;
	margin-bottom: 18px;
	padding: 16px;
	border: 1px solid var(--madi-border);
	border-radius: 8px;
	background: var(--madi-surface);
}

.madi-booking-reservations-filters label {
	display: grid;
	gap: 6px;
	margin: 0;
}

.madi-booking-reservations-filters span {
	color: var(--madi-text);
	font-size: 13px;
	font-weight: 700;
}

.madi-booking-reservations-filters input,
.madi-booking-reservations-filters select {
	width: 100%;
	border: 1px solid var(--madi-border);
	border-radius: 6px;
	padding: 9px 10px;
	color: var(--madi-text);
	background: #ffffff;
	font: inherit;
}

.madi-booking-reservations-filters__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.madi-booking-reservations-table-wrap {
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--madi-border);
	border-radius: 8px;
	background: var(--madi-surface);
}

.madi-booking-reservations-table {
	width: 100%;
	min-width: 1080px;
	border-collapse: collapse;
	font-size: 14px;
}

.madi-booking-reservations-table th,
.madi-booking-reservations-table td {
	padding: 11px 12px;
	border-bottom: 1px solid var(--madi-border);
	text-align: left;
	vertical-align: top;
}

.madi-booking-reservations-table th {
	color: var(--madi-text);
	background: var(--madi-soft);
	font-weight: 700;
}

.madi-booking-reservations-table tr:last-child td {
	border-bottom: 0;
}

.madi-booking-empty-state {
	color: var(--madi-muted);
	text-align: center;
}

.madi-booking-frontend-notice {
	margin: 0 0 18px;
	padding: 12px 14px;
	border: 1px solid var(--madi-border);
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.madi-booking-frontend-notice--success {
	border-color: #bbf7d0;
	color: #166534;
	background: #f0fdf4;
}

.madi-booking-frontend-notice--error {
	border-color: #fecaca;
	color: #991b1b;
	background: #fef2f2;
}

.madi-status-badge {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	border-radius: 999px;
	padding: 3px 9px;
	color: var(--madi-text);
	background: #eef2f7;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.madi-status-badge--pending {
	color: #92400e;
	background: #fef3c7;
}

.madi-status-badge--confirmed {
	color: #065f46;
	background: #d1fae5;
}

.madi-status-badge--cancelled {
	color: #991b1b;
	background: #fee2e2;
}

.madi-booking-link-button {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	border: 1px solid var(--madi-border);
	border-radius: 6px;
	padding: 6px 10px;
	color: var(--madi-primary);
	background: #ffffff;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.madi-booking-link-button:hover {
	border-color: var(--madi-primary);
	background: var(--madi-primary-soft);
}

.madi-booking-reservation-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin: 0;
}

.madi-booking-reservation-details > .madi-booking-reservation-actions {
	margin: 0 0 16px;
}

.madi-booking-reservation-actions form {
	margin: 0;
}

.madi-booking-action-button {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	border: 1px solid var(--madi-border);
	border-radius: 6px;
	padding: 6px 10px;
	background: #ffffff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
}

.madi-booking-action-button--confirm {
	border-color: #86efac;
	color: #166534;
	background: #f0fdf4;
}

.madi-booking-action-button--confirm:hover {
	background: #dcfce7;
}

.madi-booking-action-button--cancel {
	border-color: #fecaca;
	color: #991b1b;
	background: #fef2f2;
}

.madi-booking-action-button--cancel:hover {
	background: #fee2e2;
}

.madi-booking-action-button--pending {
	border-color: #fde68a;
	color: #92400e;
	background: #fffbeb;
}

.madi-booking-action-button--pending:hover {
	background: #fef3c7;
}

.madi-booking-reservation-details {
	margin: 0 0 18px;
	padding: 18px;
	border: 1px solid var(--madi-primary-border);
	border-radius: 8px;
	background: var(--madi-surface);
}

.madi-booking-reservation-details__header {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.madi-booking-reservation-details__header h2 {
	margin: 0;
	font-size: 22px;
	line-height: 1.25;
}

.madi-booking-reservation-details__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
}

.madi-booking-reservation-details h3 {
	margin: 0 0 10px;
	font-size: 16px;
	line-height: 1.3;
}

.madi-booking-detail-list {
	display: grid;
	grid-template-columns: minmax(110px, 0.8fr) 1fr;
	gap: 7px 12px;
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
}

.madi-booking-detail-list dt {
	color: var(--madi-text);
	font-weight: 700;
}

.madi-booking-detail-list dd {
	margin: 0;
	color: var(--madi-muted);
}

@media (max-width: 600px) {
	.madi-booking {
		max-width: 100%;
		margin: 16px 0;
	}

	.madi-booking__panel {
		padding: 16px;
	}

	.madi-booking-step__heading h2,
	.madi-booking__panel > h2 {
		font-size: 20px;
	}

	.madi-service-card {
		padding: 12px;
	}

	.madi-selected-service {
		align-items: stretch;
	}

	.madi-selected-service__change {
		width: 100%;
	}

	.madi-calendar__header {
		grid-template-columns: 36px minmax(0, 1fr) 36px;
		gap: 8px;
	}

	.madi-calendar__header button {
		width: 36px;
		height: 36px;
	}

	.madi-calendar__grid {
		gap: 4px;
	}

	.madi-calendar__blank,
	.madi-calendar__day {
		min-height: 36px;
	}

	.madi-calendar__day {
		padding: 4px;
	}

	.madi-time-slots {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.madi-booking-summary__item {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.madi-booking__actions {
		flex-direction: column;
	}

	.madi-button {
		width: 100%;
	}

	.madi-field--checkbox {
		gap: 8px;
	}

	.madi-booking-reservations-filters {
		grid-template-columns: 1fr;
		padding: 14px;
	}

	.madi-booking-reservations-filters__actions {
		flex-direction: column;
	}

	.madi-booking-reservation-details {
		padding: 14px;
	}

	.madi-booking-reservation-details__header {
		align-items: stretch;
	}

	.madi-booking-reservation-actions form {
		flex: 1 1 140px;
	}

	.madi-booking-action-button {
		justify-content: center;
		width: 100%;
	}

	.madi-booking-detail-list {
		grid-template-columns: 1fr;
		gap: 3px;
	}
}

@media (max-width: 380px) {
	.madi-calendar__grid {
		gap: 3px;
	}

	.madi-calendar__blank,
	.madi-calendar__day {
		min-height: 34px;
	}

	.madi-calendar__day {
		padding: 3px;
		font-size: 13px;
	}

	.madi-time-slots {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.madi-service-card,
	.madi-time-slot {
		transition: none;
	}
}
