/*!
 * QuickVisit — public booking widget styles
 * Author: mitzero <https://mitzero.pl>
 * License: GPL-2.0-or-later
 */
.qv-widget {
	--qv-accent: #2563eb;
	--qv-text: #14181f;
	--qv-muted: #56606c;
	--qv-faint: #79828d;
	--qv-border: #e2e5ea;
	--qv-bg-soft: #f6f7fa;
	font-family: inherit;
	color: var(--qv-text);
	max-width: 460px;
	line-height: 1.45;
}
.qv-widget * { box-sizing: border-box; }
.qv-widget button, .qv-widget input, .qv-widget select, .qv-widget textarea { font-family: inherit; }

.qv-card {
	background: #fff;
	border: 1px solid var(--qv-border);
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .12);
}
.qv-card__eyebrow {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--qv-accent);
}
.qv-card__title { margin: 0 0 18px; font-size: 20px; font-weight: 750; letter-spacing: -.01em; }

/* stepper */
.qv-steps {
	position: relative;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 4px;
	margin: 0 0 24px;
	padding: 0;
}
.qv-steps::before {
	content: '';
	position: absolute;
	top: 13px;
	left: 13px;
	right: 13px;
	height: 2px;
	background: var(--qv-border);
}
.qv-step {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: var(--qv-faint);
	flex: 1;
	text-align: center;
}
.qv-step__n {
	width: 26px; height: 26px;
	border-radius: 999px;
	background: #eef0f4;
	border: 2px solid #fff;
	display: inline-flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 12px;
	color: var(--qv-faint);
	transition: background .15s, color .15s;
}
.qv-step__l { max-width: 74px; }
.qv-step.is-active { color: var(--qv-text); font-weight: 650; }
.qv-step.is-active .qv-step__n { background: var(--qv-accent); color: #fff; }
.qv-step.is-done .qv-step__n { background: #17b26a; color: #fff; }
.qv-step.is-done { color: var(--qv-muted); }

/* type cards */
.qv-types { display: grid; gap: 10px; }
.qv-type {
	--qv-type: var(--qv-accent);
	text-align: left;
	border: 1px solid var(--qv-border);
	border-left: 4px solid var(--qv-type);
	background: #fff;
	border-radius: 12px;
	padding: 14px 16px;
	cursor: pointer;
	display: grid;
	gap: 5px;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.qv-type:hover { border-color: var(--qv-type); box-shadow: 0 4px 14px -6px rgba(16, 24, 40, .18); transform: translateY(-1px); }
.qv-type:focus-visible { outline: 2px solid var(--qv-type); outline-offset: 2px; }
.qv-type__name { font-weight: 700; font-size: 15px; }
.qv-type__meta { display: flex; align-items: center; gap: 8px; }
.qv-type__badge {
	font-size: 11px; font-weight: 700; letter-spacing: .02em;
	background: rgba(37, 99, 235, .1);
	background: color-mix(in srgb, var(--qv-type) 14%, white);
	color: var(--qv-type);
	border-radius: 999px; padding: 2px 9px;
	white-space: nowrap;
}
.qv-type__channel { font-size: 12.5px; color: var(--qv-muted); }
.qv-type__desc { font-size: 12.5px; color: var(--qv-faint); line-height: 1.4; }

.qv-back {
	background: none; border: none; color: var(--qv-muted);
	cursor: pointer; padding: 0 0 14px; font-size: 13px; font-weight: 600;
	display: inline-flex; align-items: center; gap: 4px;
}
.qv-back:hover { color: var(--qv-text); }

.qv-tz, .qv-muted { font-size: 12.5px; color: var(--qv-muted); }
.qv-chosen {
	font-size: 13.5px; font-weight: 650;
	background: var(--qv-bg-soft); border: 1px solid var(--qv-border);
	border-radius: 9px; padding: 10px 12px; margin: 8px 0 16px;
}

.qv-day { margin-bottom: 16px; }
.qv-day__label { margin: 0 0 8px; font-size: 13px; font-weight: 650; text-transform: capitalize; color: var(--qv-text); }
.qv-day__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.qv-slot {
	border: 1px solid #d3d8e0;
	background: #fff;
	border-radius: 9px;
	padding: 9px 6px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: border-color .12s, color .12s;
}
.qv-slot:hover { border-color: var(--qv-accent); color: var(--qv-accent); }
.qv-slot:focus-visible { outline: 2px solid var(--qv-accent); outline-offset: 2px; }
.qv-slot.is-active { background: var(--qv-accent); color: #fff; border-color: var(--qv-accent); }

.qv-legend { font-size: 11.5px; color: var(--qv-faint); margin: 0 0 12px; }
.qv-field { display: grid; gap: 5px; margin-bottom: 14px; }
.qv-field__label { font-size: 12.5px; font-weight: 650; color: var(--qv-muted); }
.qv-req { color: #d92d20; font-weight: 700; }
.qv-opt { color: var(--qv-faint); font-weight: 400; }
.qv-rodo { font-size: 11px; line-height: 1.55; color: var(--qv-faint); margin: 14px 0 0; }
.qv-check--req { font-weight: 550; color: var(--qv-muted); }
.qv-check--req a { color: var(--qv-accent); text-decoration: underline; }
.qv-field input {
	border: 1px solid #d3d8e0;
	border-radius: 9px;
	padding: 10px 12px;
	font-size: 14.5px;
	width: 100%;
	color: var(--qv-text);
	background: #fff;
	transition: border-color .12s, box-shadow .12s;
}
.qv-field input::placeholder { color: var(--qv-faint); }
.qv-field input:focus { outline: none; border-color: var(--qv-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }

.qv-check { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--qv-muted); margin: 8px 0 16px; line-height: 1.4; }
.qv-check input { margin-top: 2px; flex-shrink: 0; }

.qv-submit, .qv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	text-align: center;
	background: var(--qv-accent);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 13px 16px;
	font-size: 14.5px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	margin-top: 8px;
	box-shadow: 0 2px 8px -2px rgba(37, 99, 235, .35);
	transition: filter .12s, transform .12s;
}
.qv-submit:hover, .qv-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.qv-submit[disabled] { opacity: .75; cursor: default; transform: none; }
.qv-submit[disabled]::before {
	content: '';
	width: 14px; height: 14px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 999px;
	animation: qv-spin .65s linear infinite;
}
.qv-btn--ghost { background: #fff; color: var(--qv-accent); border: 1px solid var(--qv-accent); box-shadow: none; }
.qv-btn--danger { background: #d92d20; box-shadow: 0 2px 8px -2px rgba(217, 45, 32, .35); }
.qv-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--qv-accent); }
.qv-link:hover { text-decoration: underline; }
.qv-reassure { margin: 10px 0 0; font-size: 11.5px; color: var(--qv-faint); text-align: center; line-height: 1.4; }

.qv-alert {
	background: #fef3f2; border: 1px solid #fecdca; color: #b42318;
	border-radius: 9px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px;
	display: flex; gap: 8px; align-items: flex-start; line-height: 1.4;
}
.qv-alert::before {
	content: '!'; flex-shrink: 0; margin-top: 1px;
	width: 16px; height: 16px; border-radius: 999px;
	background: #b42318; color: #fff; font-size: 11px; font-weight: 800;
	display: inline-flex; align-items: center; justify-content: center;
}
.qv-loading { color: var(--qv-faint); font-size: 13px; }

.qv-success { text-align: center; }
.qv-success__check {
	width: 52px; height: 52px; border-radius: 999px;
	background: #d1fadf; color: #05603a;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 26px; margin-bottom: 14px;
	animation: qv-pop .35s cubic-bezier(.34, 1.56, .64, 1);
}
.qv-success h3 { margin: 0 0 6px; font-size: 19px; }
.qv-success__when { font-weight: 700; margin: 4px 0; font-size: 14.5px; }
.qv-success .qv-btn, .qv-success .qv-link { margin-top: 10px; }

@keyframes qv-pop {
	from { transform: scale(.5); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}
@keyframes qv-spin {
	to { transform: rotate(360deg); }
}

/* floating button + modal */
.qv-fab {
	position: fixed;
	right: 20px; bottom: 20px;
	z-index: 99998;
	background: var(--qv-accent, #2563eb);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 14px 22px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 10px 28px -6px rgba(16, 24, 40, .3);
	transition: transform .15s, box-shadow .15s;
}
.qv-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -6px rgba(16, 24, 40, .38); }
.qv-widget--modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(16, 24, 40, .55);
	align-items: center;
	justify-content: center;
	padding: 16px;
	max-width: none;
	backdrop-filter: blur(2px);
}
.qv-widget--modal[hidden] { display: none !important; }
.qv-widget--modal.is-open { display: flex; }
.qv-widget--modal .qv-card { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; position: relative; }
.qv-modal-close {
	position: absolute;
	top: 14px; right: 16px;
	width: 34px; height: 34px;
	border: none;
	border-radius: 999px;
	background: var(--qv-bg-soft);
	color: var(--qv-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background .12s;
}
.qv-modal-close:hover { background: #e9ebf0; }

@media (max-width: 380px) {
	.qv-card { padding: 18px; }
	.qv-step__l { display: none; }
}

@media (prefers-color-scheme: dark) {
	.qv-widget {
		--qv-text: #eef0f4;
		--qv-muted: #aab1bd;
		--qv-faint: #838d99;
		--qv-border: #2b2f3a;
		--qv-bg-soft: #21252e;
	}
	.qv-card { background: #1a1d24; box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5); }
	.qv-type, .qv-slot, .qv-field input { background: #21252e; border-color: #2b2f3a; color: var(--qv-text); }
	.qv-chosen { background: #21252e; }
	.qv-step__n { background: #2b2f3a; border-color: #1a1d24; }
	.qv-modal-close { background: #21252e; }
	.qv-modal-close:hover { background: #2b2f3a; }
	.qv-alert { background: rgba(217, 45, 32, .14); border-color: rgba(217, 45, 32, .35); color: #ff9c92; }
}
