/*
 * Rendez-vous page styles.
 * Built on top of the shared PDE card system to keep the UI aligned with the site.
 */

body {
	background:
		radial-gradient(circle at top left, rgba(40, 157, 204, 0.12), transparent 34%),
		linear-gradient(180deg, #f3f9fc 0%, #ffffff 32%);
	font-family: "Segoe UI", Roboto, Arial, sans-serif;
	color: #17384a;
}

.wrapper {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 18px 32px;
}

.panel {
	position: relative;
	padding: 18px 22px 22px;
	border: 1px solid rgba(40, 157, 204, 0.12);
	border-radius: 26px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 18px 42px rgba(12, 60, 82, 0.08);
}

.head {
	align-items: center;
	gap: 22px;
	margin-bottom: 12px;
}

.head img {
	width: min(100%, 320px);
	border-radius: 22px;
	box-shadow: 0 20px 36px rgba(40, 157, 204, 0.16);
}

.head h1 {
	margin: 0 0 8px;
	color: var(--pde-card-title);
	font-size: clamp(2.2rem, 4vw, 3.35rem);
	line-height: 1.02;
}

.head p {
	max-width: 62ch;
	color: var(--pde-card-text);
	font-size: 1.05rem;
	line-height: 1.6;
}

.alert,
.notice {
	border-radius: 16px;
	border: 1px solid transparent;
	box-shadow: 0 12px 28px rgba(12, 60, 82, 0.05);
}

.success {
	border-color: rgba(10, 109, 69, 0.18);
}

.error {
	border-color: rgba(151, 37, 37, 0.12);
}

.notice {
	border-color: rgba(40, 157, 204, 0.18);
	background: linear-gradient(180deg, rgba(40, 157, 204, 0.08), rgba(40, 157, 204, 0.04));
}

label {
	color: var(--pde-card-title);
}

input,
button,
textarea,
select {
	font-family: inherit;
}

input,
textarea,
select {
	padding: 12px 14px;
	border: 1px solid #cddae3;
	border-radius: 14px;
	background: #fff;
	color: #17384a;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: #289dcc;
	box-shadow: 0 0 0 3px rgba(40, 157, 204, 0.14);
}

button {
	font-family: inherit;
}

.toolbar {
	gap: 8px;
	margin: 0 0 12px;
}

.rdv-toolbar-intro {
	margin: 0 0 8px;
	color: var(--pde-card-text);
	font-size: 0.94rem;
	line-height: 1.45;
}

.toolbar .pill,
.rdv-toolbar-pill {
	box-sizing: border-box;
	width: 146px;
	min-width: 146px;
	max-width: 146px;
	height: 34px;
	min-height: 34px;
	padding: 3px 9px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	box-shadow: none;
	white-space: nowrap;
}

.pill.rdv-pill-compact,
.rdv-pill-compact {
	min-height: 28px;
	padding: 3px 9px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	box-shadow: none;
}

.pill {
	min-height: 42px;
	padding: 10px 16px;
	border-radius: 999px;
	border: 1px solid rgba(40, 157, 204, 0.16);
	background: #fff;
	color: var(--pde-card-title);
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.1;
	box-shadow: 0 10px 20px rgba(12, 60, 82, 0.07);
	transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pill:hover,
.pill:focus-visible {
	transform: translateY(-1px);
	border-color: var(--pde-card-border-hover);
	box-shadow: var(--pde-card-shadow-hover);
}

a.pill {
	text-decoration: none;
}

.rdv-copy-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.copy-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 28px;
	padding: 3px 9px;
	border-radius: 999px;
	border: 1px solid rgba(40, 157, 204, 0.16);
	background: #fff;
	color: var(--pde-card-title);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
	transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.copy-link:hover,
.copy-link:focus-visible {
	background: rgba(40, 157, 204, 0.08);
	box-shadow: var(--pde-card-shadow-hover);
	transform: translateY(-1px);
}

.copy-msg {
	padding: 6px 12px;
	border-radius: 999px;
	background: #e8f8ef;
	color: #0a6d45;
	font-size: 0.84rem;
	font-weight: 700;
}

.events-list {
	margin-top: 12px;
}

.rdv-events-shell {
	margin-top: 6px;
}

.rdv-event-grid {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
}

.rdv-event-card {
	height: 100%;
}

.rdv-event-card .pde-card-body {
	gap: 10px;
	padding: 8px;
}

.rdv-event-card__header {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rdv-event-card__meta {
	margin: 0;
	color: var(--pde-card-text);
	font-size: 0.9rem;
	line-height: 1.35;
}

.rdv-event-card__actions {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
	align-items: center;
	margin-top: 2px;
}

.rdv-event-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	min-height: 42px;
	padding: 0;
	font-size: 1.1rem;
	line-height: 1;
}

.rdv-event-action--danger {
	border-color: rgba(198, 59, 59, 0.2);
	color: #b23434;
	background: #fff6f6;
}

.rdv-card-copy-msg {
	display: none;
	margin: 2px auto 0;
}

.rdv-card-copy-msg.show {
	display: inline-flex;
}

.rdv-event-action--danger:hover,
.rdv-event-action--danger:focus-visible {
	border-color: rgba(198, 59, 59, 0.36);
	box-shadow: 0 0 0 1px rgba(198, 59, 59, 0.12), 0 10px 24px rgba(198, 59, 59, 0.1);
}

.rdv-empty-state {
	grid-column: 1 / -1;
	padding: 22px;
	text-align: center;
}

.rdv-empty-state .pde-card-title {
	margin-bottom: 8px;
}

.day-list {
	gap: 12px;
	margin-top: 14px;
}

.day-card {
	border: 1px solid rgba(40, 157, 204, 0.14);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 14px 28px rgba(12, 60, 82, 0.06);
}

.day-head {
	padding: 14px 18px;
	background: linear-gradient(180deg, #fbfdff, #f2f8fb);
	color: var(--pde-card-title);
	font-size: 0.95rem;
}

.day-head .ico {
	font-size: 1rem;
}

.day-body {
	padding: 14px 16px 16px;
	border-top: 1px solid rgba(40, 157, 204, 0.12);
}

.slot-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
}

.slot-pill {
	min-width: 58px;
	padding: 8px 12px;
	border-radius: 999px;
	font-size: 0.92rem;
	box-shadow: 0 8px 16px rgba(12, 60, 82, 0.08);
}

.slot-grid .slot-pill {
	flex: 0 0 78px;
	width: 78px;
	min-width: 78px;
	padding: 8px 0;
	white-space: nowrap;
}

dialog {
	border: 1px solid rgba(40, 157, 204, 0.16);
	border-radius: 24px;
	width: min(680px, calc(100% - 32px));
	max-width: 680px;
	max-height: calc(100dvh - 32px);
	box-shadow: 0 30px 55px rgba(12, 60, 82, 0.22);
}

dialog::backdrop {
	background: transparent;
	backdrop-filter: none;
}

#slotAddModal::backdrop,
#eventAddSlotModal::backdrop,
#eventEditModal::backdrop,
#eventDeleteModal::backdrop,
#slotTeacherModal::backdrop,
#familyBookedModal::backdrop {
	background: transparent;
	backdrop-filter: none;
}

.modal-body {
	padding: 24px;
	max-height: calc(100dvh - 72px);
	overflow-y: auto;
}

#slotTeacherModal {
	width: min(860px, calc(100% - 20px));
	max-width: 860px;
	max-height: none;
}

#slotTeacherModal[open],
#familyBookedModal[open] {
	inset: 16px 0 auto 0;
	margin: 0 auto;
}

#slotTeacherModal .modal-body {
	padding: 16px 20px 18px;
	max-height: none;
	overflow: visible;
}

#slotTeacherModal .modal-head {
	margin-bottom: 8px;
}

#slotTeacherModal form {
	display: grid;
	gap: 8px;
}

#slotTeacherModal label {
	margin-bottom: 0;
	gap: 4px;
}

#slotTeacherModal input {
	padding: 9px 11px;
}

#slotTeacherModal .inline {
	gap: 8px;
}

#slotTeacherModal .rdv-slot-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 8px;
	margin-top: 2px;
}

#slotTeacherModal .rdv-slot-actions .pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	min-height: 34px;
	padding: 0 12px;
	font-size: 0.84rem;
	line-height: 1;
	white-space: nowrap;
}

#slotTeacherModal #ts_google_link,
#slotTeacherModal #release_btn,
#slotTeacherModal #ts_save_btn {
	background: #fff;
	color: var(--pde-card-title);
}

.modal-head {
	margin-bottom: 14px;
}

.close-btn {
	background: #eef5f8;
}

.inline {
	gap: 10px;
}

.icon-plain {
	border-radius: 10px;
}

.pwa-install-box {
	border: 1px solid rgba(40, 157, 204, 0.15);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.92);
}

body.is-embed {
	background: #fff;
}

body.is-embed .wrapper {
	max-width: none;
	margin: 0;
	padding: 0;
}

body.is-embed .panel {
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	backdrop-filter: none;
	background: #fff;
	min-height: 0;
}

body.is-embed .card-actions,
body.is-embed .head {
	display: none;
}

@media (max-width: 900px) {
	.wrapper {
		padding: 0 14px 28px;
	}

	.panel {
		padding: 16px 18px 20px;
		border-radius: 22px;
	}
}

@media (max-width: 767px) {
	.panel {
		padding: 18px 16px 22px;
	}

	.head {
		gap: 18px;
	}

	.head img {
		width: 100%;
	}

	.pill,
	.copy-link {
		width: 100%;
	}

	.toolbar,
	.rdv-copy-row {
		align-items: stretch;
	}

	.rdv-copy-row {
		flex-direction: column;
	}

	.toolbar {
		flex-direction: row;
		align-items: flex-start;
	}

	.toolbar .pill,
	.rdv-toolbar-pill {
		width: 146px;
		min-width: 146px;
		max-width: 146px;
		flex: 0 0 146px;
		height: 34px;
	}

	.rdv-event-grid {
		grid-template-columns: 1fr;
	}

	.rdv-event-card__actions {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.slot-grid .slot-pill {
		flex: 0 0 78px;
		width: 78px;
	}
}
