/* Meeting Scheduler — widget styles.
   Every color/radius/spacing value is read from the --ms-* custom
   properties generated server-side by Meeting_Scheduler_Style::generate_css()
   (see includes/class-meeting-scheduler-style.php) — this file never
   hardcodes a color, so the same markup restyles correctly whether those
   variables fall through to an inherited theme token or an explicit
   Style Settings override. Used both by the real front-end widget and by
   the admin Style Settings live preview, so a change here is guaranteed
   to look identical in both places. */

.ms-scheduler {
	font-family: var(--ms-font-body, inherit);
	color: var(--ms-text, inherit);
	font-size: var(--ms-font-size-base, inherit);
	line-height: 1.5;
}

.ms-scheduler * {
	box-sizing: border-box;
}

.ms-scheduler h1,
.ms-scheduler h2,
.ms-scheduler h3,
.ms-scheduler h4 {
	font-family: var(--ms-font-heading, inherit);
}

/* ---- meeting-type / staff pill selectors, above the calendar card ---- */
.ms-scheduler__selectors {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: var(--ms-gap, 16px);
}

.ms-pill-select {
	appearance: none;
	background: var(--ms-surface, transparent);
	color: inherit;
	border: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
	border-radius: 999px;
	padding: 8px 34px 8px 16px;
	font-size: .9rem;
	font-weight: 500;
	cursor: pointer;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='%23888' d='M5 8l5 5 5-5z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
}

/* ---- two-pane card (default layout) ---- */
.ms-cal {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 0;
	text-align: left;
	border: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
	border-radius: var(--ms-radius-lg, 22px);
	overflow: hidden;
	background: var(--ms-surface, transparent);
}

.ms-scheduler[data-layout="stacked"] .ms-cal {
	grid-template-columns: 1fr;
	max-width: 480px;
	margin: 0 auto;
}

.ms-scheduler[data-layout="stacked"] .ms-cal__panel {
	border-right: 0;
	border-bottom: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
}

.ms-cal__panel {
	padding: var(--ms-padding, 24px);
	border-right: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
}

.ms-cal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.ms-cal__month {
	font-weight: 700;
	font-size: 1.05rem;
}

.ms-cal__nav {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	display: grid;
	place-items: center;
	border: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background .25s, border-color .25s;
}

.ms-cal__nav:hover:not(:disabled) {
	background: rgba(127, 127, 127, .08);
}

.ms-cal__nav:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.ms-cal__nav svg {
	width: 16px;
	height: 16px;
}

.ms-cal__dow {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 6px;
}

.ms-cal__dow span {
	text-align: center;
	font-size: .7rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .55;
	padding: 6px 0;
}

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

.ms-cal__day {
	aspect-ratio: 1 / 1;
	border-radius: 50px;
	display: grid;
	place-items: center;
	font-size: .9rem;
	border: 2px solid transparent;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}

.ms-cal__day.is-empty {
	visibility: hidden;
	cursor: default;
}

.ms-cal__day.is-disabled {
	opacity: .3;
	cursor: not-allowed;
}

.ms-cal__day.is-available:not(.is-disabled):hover {
	background: rgba(127, 127, 127, .08);
}

.ms-cal__day.is-available {
	box-shadow: inset 0 0 0 1px var(--ms-accent, currentColor);
}

.ms-cal__day.is-selected {
	background: var(--ms-accent, #5fe08a);
	border-color: var(--ms-accent, #5fe08a);
	color: #fff;
	font-weight: 700;
}

.ms-cal__times {
	padding: var(--ms-padding, 24px);
	display: flex;
	flex-direction: column;
}

.ms-cal__times-head {
	font-size: .82rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	opacity: .6;
	margin-bottom: 16px;
}

.ms-cal__slots {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 360px;
	overflow-y: auto;
	overflow-x: hidden;
	/* Firefox */
	scrollbar-width: thin;
	scrollbar-color: var(--ms-accent, currentColor) transparent;
}

/* Chrome/Edge/Safari — keep the scrollbar itself on-theme rather than
   the browser's default light chrome against a dark widget. */
.ms-cal__slots::-webkit-scrollbar {
	width: 6px;
}

.ms-cal__slots::-webkit-scrollbar-track {
	background: transparent;
}

.ms-cal__slots::-webkit-scrollbar-thumb {
	background-color: var(--ms-accent, currentColor);
	border-radius: 999px;
	opacity: .6;
}

.ms-cal__hint {
	opacity: .6;
	font-size: .92rem;
	line-height: 1.6;
}

.ms-slot {
	text-align: left;
	padding: 13px 16px;
	border-radius: var(--ms-radius-md, 16px);
	border: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
	background: transparent;
	color: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: border-color .2s, background .2s, transform .2s;
}

.ms-slot:hover {
	border-color: var(--ms-accent, currentColor);
	transform: translateX(2px);
}

.ms-slot.is-picked {
	background: var(--ms-accent, #5fe08a);
	color: #fff;
	border-color: transparent;
	font-weight: 700;
}

/* ---- booking form ---- */
.ms-form {
	margin-top: var(--ms-gap, 16px);
	padding: var(--ms-padding, 24px);
	border: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
	border-radius: var(--ms-radius-lg, 22px);
	background: var(--ms-surface, transparent);
}

.ms-form__field {
	margin-bottom: 14px;
}

.ms-form__field label {
	display: block;
	font-size: .85rem;
	font-weight: 600;
	margin-bottom: 6px;
}

.ms-form__field input,
.ms-form__field textarea {
	width: 100%;
	padding: 10px 12px;
	border-radius: var(--ms-radius-md, 16px);
	border: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
	background: transparent;
	color: inherit;
	font: inherit;
}

.ms-btn {
	display: inline-block;
	background: var(--ms-accent, #5fe08a);
	color: #fff;
	border: none;
	padding: 12px 22px;
	border-radius: var(--ms-radius-md, 16px);
	cursor: pointer;
	font-weight: 600;
	font: inherit;
}

.ms-btn:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.ms-btn--ghost {
	background: transparent;
	color: inherit;
	border: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
}

.ms-error {
	color: #e5484d;
	font-size: .88rem;
	margin-top: 8px;
}

.ms-confirmation {
	padding: var(--ms-padding, 24px);
	border: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
	border-radius: var(--ms-radius-lg, 22px);
	background: var(--ms-surface, transparent);
	text-align: center;
}

.ms-confirmation__icon {
	color: var(--ms-accent, #5fe08a);
	font-size: 2rem;
	margin-bottom: 12px;
}

/* ---- modal layout ---- */
.ms-scheduler[data-layout="modal"] .ms-cal-wrapper {
	display: none;
}

.ms-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 100000;
}

.ms-modal-overlay .ms-cal-wrapper {
	display: block !important;
	max-width: 900px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
}

.ms-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 1.6rem;
	cursor: pointer;
	line-height: 1;
}

@media (max-width: 640px) {
	.ms-cal {
		grid-template-columns: 1fr;
	}
	.ms-cal__panel {
		border-right: 0;
		border-bottom: 1px solid var(--ms-line, rgba(127, 127, 127, .3));
	}
}

/* ---- admin Style Settings live preview ---- */
.ms-style-preview-wrap {
	max-width: 720px;
	margin-top: 12px;
}
