/* ── Appointment Booking Modal ── */

html.ln-appointment-modal-open,
body.ln-appointment-modal-open {
	overflow: hidden;
}

.ln-appointment-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ln-appointment-modal--visible {
	opacity: 1;
	visibility: visible;
}

.ln-appointment-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(44, 26, 10, 0.55);
	backdrop-filter: blur(2px);
}

.ln-appointment-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 32px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	border-radius: 8px;
	box-shadow: 0 24px 64px rgba(44, 26, 10, 0.18);
	transform: translateY(16px) scale(0.98);
	transition: transform 0.3s ease;
}

.ln-appointment-modal--visible .ln-appointment-modal__dialog {
	transform: translateY(0) scale(1);
}

/* ── Close ── */

.ln-appointment-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #F5EDE0;
	color: #2C1A0A;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ln-appointment-modal__close:hover {
	background: #205247;
	color: #FFFFFF;
}

.ln-appointment-modal__close svg {
	width: 18px;
	height: 18px;
}

/* ── Header ── */

.ln-appointment-modal__header {
	padding: 28px 28px 0;
	flex-shrink: 0;
}

.ln-appointment-modal__title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 32px;
	font-weight: 500;
	line-height: 1.2;
	color: #2C1A0A;
	margin: 0 0 6px;
	padding-right: 40px;
}

.ln-appointment-modal__subtitle {
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #205247;
	margin: 0 0 20px;
	line-height: 1.5;
}

/* ── Steps ── */

.ln-appointment-modal__steps {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.ln-appointment-modal__step {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #989795;
	transition: color 0.2s ease;
}

.ln-appointment-modal__step--active {
	color: #205247;
}

.ln-appointment-modal__step--done {
	color: #2C1A0A;
}

.ln-appointment-modal__step-num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1.5px solid currentColor;
	font-size: 13px;
	font-weight: 600;
	flex-shrink: 0;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ln-appointment-modal__step--active .ln-appointment-modal__step-num,
.ln-appointment-modal__step--done .ln-appointment-modal__step-num {
	background: #205247;
	border-color: #205247;
	color: #FFFFFF;
}

.ln-appointment-modal__step-divider {
	flex: 1;
	height: 1px;
	background: #E8E0D4;
	min-width: 24px;
}

/* ── Body ── */

.ln-appointment-modal__body {
	padding: 0 28px;
	overflow-y: auto;
	flex: 1 1 auto;
	-webkit-overflow-scrolling: touch;
}

.ln-appointment-modal__panel {
	display: none;
}

.ln-appointment-modal__panel--active {
	display: block;
}

.ln-appointment-modal__error {
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #B42318;
	margin: 12px 0 0;
	line-height: 1.5;
}

.ln-appointment-modal__selected-date {
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: #2C1A0A;
	margin: 0 0 16px;
	line-height: 1.5;
}

/* ── Calendar ── */

.ln-appointment-calendar {
	font-family: "Plus Jakarta Sans", sans-serif;
}

.ln-appointment-calendar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.ln-appointment-calendar__month {
	font-size: 18px;
	font-weight: 600;
	color: #2C1A0A;
	text-align: center;
	flex: 1;
}

.ln-appointment-calendar__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1.5px solid #E8E0D4;
	border-radius: 50%;
	background: transparent;
	color: #2C1A0A;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	flex-shrink: 0;
}

.ln-appointment-calendar__nav:hover:not(:disabled) {
	background: #205247;
	border-color: #205247;
	color: #FFFFFF;
}

.ln-appointment-calendar__nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ln-appointment-calendar__nav svg {
	width: 18px;
	height: 18px;
}

.ln-appointment-calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 8px;
}

.ln-appointment-calendar__weekday {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #989795;
	letter-spacing: 0.02em;
	padding: 4px 0;
}

.ln-appointment-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.ln-appointment-calendar__day {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: #2C1A0A;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ln-appointment-calendar__day:hover:not(:disabled):not(.ln-appointment-calendar__day--selected) {
	background: #F5EDE0;
}

.ln-appointment-calendar__day--today:not(.ln-appointment-calendar__day--selected) {
	font-weight: 700;
	color: #205247;
}

.ln-appointment-calendar__day--selected {
	background: #205247;
	color: #FFFFFF;
	font-weight: 600;
}

.ln-appointment-calendar__day--disabled {
	color: #C8C4BE;
	cursor: not-allowed;
}

.ln-appointment-calendar__day--empty {
	pointer-events: none;
}

/* ── Time Slots ── */

.ln-appointment-time-slots {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	max-height: 220px;
	overflow-y: auto;
	padding: 2px;
	-webkit-overflow-scrolling: touch;
}

.ln-appointment-time-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 8px;
	border: 1.5px solid #E8E0D4;
	border-radius: 6px;
	background: #FFFFFF;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #2C1A0A;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.ln-appointment-time-slot:hover:not(:disabled):not(.ln-appointment-time-slot--selected) {
	border-color: #205247;
	background: #F5EDE0;
}

.ln-appointment-time-slot--selected {
	background: #205247;
	border-color: #205247;
	color: #FFFFFF;
	font-weight: 600;
}

.ln-appointment-time-slot:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ── Custom Time ── */

.ln-appointment-custom-time {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #E8E0D4;
}

.ln-appointment-custom-time__label {
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: #2C1A0A;
	margin: 0 0 10px;
	line-height: 1.5;
}

.ln-appointment-custom-time__toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: #2C1A0A;
	cursor: pointer;
	user-select: none;
}

.ln-appointment-custom-time__toggle input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #205247;
	cursor: pointer;
	flex-shrink: 0;
}

.ln-appointment-custom-time__field {
	margin-top: 12px;
}

.ln-appointment-custom-time__textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid #E8E0D4;
	border-radius: 6px;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: #2C1A0A;
	background: #FFFFFF;
	resize: vertical;
	min-height: 80px;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.ln-appointment-custom-time__textarea:focus {
	outline: none;
	border-color: #205247;
}

.ln-appointment-custom-time__textarea::placeholder {
	color: #989795;
}

/* ── Footer ── */

.ln-appointment-modal__footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 20px 28px 28px;
	flex-shrink: 0;
	border-top: 1px solid #F0EBE3;
}

.ln-appointment-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: 4px;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.01em;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
	min-height: 48px;
}

.ln-appointment-modal__btn--back {
	background: transparent;
	color: #2C1A0A;
	border-color: #E8E0D4;
	margin-right: auto;
}

.ln-appointment-modal__btn--back:hover {
	border-color: #205247;
	color: #205247;
}

.ln-appointment-modal__btn--primary {
	background: #205247;
	color: #FFFFFF;
	border-color: #205247;
	min-width: 160px;
}

.ln-appointment-modal__btn--primary:hover:not(:disabled) {
	background: #5A3018;
	border-color: #5A3018;
}

.ln-appointment-modal__btn--primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ln-appointment-modal__btn--loading {
	pointer-events: none;
}

.ln-appointment-modal__btn-loader {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #FFFFFF;
	border-radius: 50%;
	animation: ln-appointment-spin 0.7s linear infinite;
}

@keyframes ln-appointment-spin {
	to { transform: rotate(360deg); }
}

/* ── Responsive ── */

@media (max-width: 768px) {
	.ln-appointment-modal {
		padding: 0;
		align-items: flex-end;
	}

	.ln-appointment-modal__dialog {
		max-width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		transform: translateY(100%);
	}

	.ln-appointment-modal--visible .ln-appointment-modal__dialog {
		transform: translateY(0);
	}

	.ln-appointment-modal__header {
		padding: 24px 20px 0;
	}

	.ln-appointment-modal__title {
		font-size: 28px;
	}

	.ln-appointment-modal__body {
		padding: 0 20px;
	}

	.ln-appointment-modal__footer {
		padding: 16px 20px 24px;
	}

	.ln-appointment-modal__step-label {
		display: none;
	}

	.ln-appointment-time-slots {
		grid-template-columns: repeat(2, 1fr);
		max-height: 180px;
	}

	.ln-appointment-modal__btn {
		font-size: 16px;
		padding: 12px 20px;
	}

	.ln-appointment-modal__btn--primary {
		flex: 1;
	}
}

@media (max-width: 380px) {
	.ln-appointment-time-slots {
		grid-template-columns: repeat(2, 1fr);
	}

	.ln-appointment-calendar__day {
		font-size: 14px;
	}
}
