/* Pärlans Tandvård – Opus booking widget.
   Neutral, self-contained styles scoped under .parlans-booking.
   Override the CSS variables to match the site theme. */

.parlans-booking {
	--pb-accent: #1f7a6d;
	--pb-accent-dark: #155a50;
	--pb-text: #1d2b2a;
	--pb-muted: #6b7b79;
	--pb-border: #dde5e3;
	--pb-bg: #ffffff;
	--pb-bg-soft: #f4f8f7;
	--pb-radius: 10px;
	--pb-error: #b3261e;

	max-width: 640px;
	margin: 0 auto;
	color: var(--pb-text);
	font-family: inherit;
	line-height: 1.5;
}

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

.parlans-booking__title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
}

/* Step indicator */
.parlans-booking__steps {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin-bottom: 1.25rem;
	font-size: 0.82rem;
	color: var(--pb-muted);
}

.pb-step {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.pb-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	background: var(--pb-bg-soft);
	border: 1px solid var(--pb-border);
	font-size: 0.75rem;
	font-weight: 600;
}

.pb-step.is-active { color: var(--pb-text); font-weight: 600; }
.pb-step.is-active .pb-step__num { background: var(--pb-accent); border-color: var(--pb-accent); color: #fff; }
.pb-step.is-done .pb-step__num { background: var(--pb-accent-dark); border-color: var(--pb-accent-dark); color: #fff; }

/* Panel */
.parlans-booking__panel {
	min-height: 120px;
}

/* Lists / cards */
.pb-list { display: grid; gap: 0.6rem; }

.pb-card {
	display: block;
	width: 100%;
	text-align: left;
	padding: 0.9rem 1rem;
	background: var(--pb-bg);
	border: 1px solid var(--pb-border);
	border-radius: var(--pb-radius);
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s, transform .05s;
	font: inherit;
	color: inherit;
}
.pb-card:hover { border-color: var(--pb-accent); box-shadow: 0 2px 10px rgba(31,122,109,.08); }
.pb-card:active { transform: translateY(1px); }

.pb-card__name { display: inline; font-weight: 600; }
.pb-card__dur { float: right; color: var(--pb-muted); font-size: 0.85rem; }
.pb-card__desc { display: block; margin-top: 0.2rem; color: var(--pb-muted); font-size: 0.85rem; }

/* Times */
.pb-times__head {
	font-weight: 600;
	margin-bottom: 0.75rem;
	text-transform: capitalize;
}

.pb-times {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 0.5rem;
}

.pb-time {
	padding: 0.6rem 0.4rem;
	border: 1px solid var(--pb-border);
	border-radius: var(--pb-radius);
	background: var(--pb-bg);
	cursor: pointer;
	font: inherit;
	font-variant-numeric: tabular-nums;
	transition: border-color .15s, background .15s;
}
.pb-time:hover { border-color: var(--pb-accent); background: var(--pb-bg-soft); }

.pb-times__nav {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 1rem;
}

/* Summary */
.pb-summary {
	background: var(--pb-bg-soft);
	border: 1px solid var(--pb-border);
	border-radius: var(--pb-radius);
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

/* Form */
.pb-form { display: grid; gap: 0.85rem; }
.pb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }

.pb-field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
.pb-field > span { font-weight: 600; }
.pb-field input,
.pb-field textarea {
	width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--pb-border);
	border-radius: 8px;
	font: inherit;
	background: var(--pb-bg);
	color: var(--pb-text);
}
.pb-field input:focus,
.pb-field textarea:focus {
	outline: none;
	border-color: var(--pb-accent);
	box-shadow: 0 0 0 3px rgba(31,122,109,.15);
}

.pb-check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.88rem;
	color: var(--pb-muted);
}
.pb-check input { margin-top: 0.2rem; }

.pb-form__actions {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.pb-form__error {
	color: var(--pb-error);
	background: rgba(179,38,30,.07);
	border: 1px solid rgba(179,38,30,.25);
	border-radius: 8px;
	padding: 0.6rem 0.8rem;
	font-size: 0.9rem;
}

/* Buttons */
.pb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.2rem;
	border-radius: 8px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, border-color .15s, opacity .15s;
}
.pb-btn:disabled { opacity: .6; cursor: default; }

.pb-btn--primary { background: var(--pb-accent); color: #fff; }
.pb-btn--primary:hover:not(:disabled) { background: var(--pb-accent-dark); }

.pb-btn--ghost { background: transparent; border-color: var(--pb-border); color: var(--pb-text); }
.pb-btn--ghost:hover { border-color: var(--pb-accent); color: var(--pb-accent); }

.pb-backbar { margin-top: 1rem; }

/* States */
.pb-loading { display: flex; align-items: center; gap: 0.6rem; color: var(--pb-muted); padding: 1.5rem 0; }
.pb-spinner {
	width: 1.1rem; height: 1.1rem;
	border: 2px solid var(--pb-border);
	border-top-color: var(--pb-accent);
	border-radius: 50%;
	animation: pb-spin .7s linear infinite;
	display: inline-block;
}
@keyframes pb-spin { to { transform: rotate(360deg); } }

.pb-msg { padding: 1rem; background: var(--pb-bg-soft); border-radius: var(--pb-radius); color: var(--pb-muted); }
.pb-msg--warn { background: #fff8e6; border: 1px solid #f2d98a; color: #7a5b00; }
.pb-msg--error { background: rgba(179,38,30,.07); border: 1px solid rgba(179,38,30,.25); color: var(--pb-error); }

/* Done */
.pb-done { text-align: center; padding: 1.5rem 0; }
.pb-done__check {
	width: 3rem; height: 3rem; margin: 0 auto 0.75rem;
	border-radius: 50%; background: var(--pb-accent); color: #fff;
	font-size: 1.6rem; line-height: 3rem;
}
.pb-done__detail { color: var(--pb-muted); }

/* Small screens */
@media (max-width: 480px) {
	.pb-row { grid-template-columns: 1fr; }
	.parlans-booking__steps { font-size: 0.75rem; }
}

/* Shown when the day displayed is not the day the visitor asked for. */
.pb-times__note {
	font-size: 0.9em;
	opacity: 0.75;
	margin-bottom: 0.25rem;
}

/* ---------------------------------------------------------------------------
 * Week view (Mon–Sun grid, mirrors the Opus booking page)
 * ------------------------------------------------------------------------ */

.pb-week__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
}

.pb-week__label {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 1.15rem;
}

.pb-week__num {
	font-size: 0.85rem;
	opacity: 0.7;
	font-weight: 400;
}

.pb-week__nav {
	display: flex;
	gap: 0.25rem;
	margin-left: auto;
}

.pb-btn--icon {
	min-width: 2.25rem;
	padding: 0.35rem 0.6rem;
	line-height: 1;
	font-size: 1.1rem;
}

.pb-btn--icon[disabled] {
	opacity: 0.35;
	cursor: not-allowed;
}

.pb-week__jump {
	padding: 0.35rem 0.5rem;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 6px;
	font: inherit;
	font-size: 0.9rem;
	background: #fff;
}

.pb-week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1px;
	background: rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	overflow: hidden;
}

.pb-week__day {
	background: #fff;
	display: flex;
	flex-direction: column;
	min-height: 6rem;
}

.pb-week__dayhead {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.1rem;
	padding: 0.5rem 0.25rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	background: rgba(0, 0, 0, 0.02);
}

.pb-week__wd {
	font-size: 0.72rem;
	text-transform: lowercase;
	opacity: 0.7;
	text-align: center;
}

.pb-week__dn {
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1;
}

.pb-week__day.is-today .pb-week__dayhead {
	background: rgba(0, 0, 0, 0.06);
}

.pb-week__day.is-today .pb-week__dn {
	text-decoration: underline;
}

.pb-week__slots {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0.35rem 0.25rem;
}

.pb-week__slots .pb-time {
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1.2;
	padding: 0.3rem 0.15rem;
	width: 100%;
	font-size: 0.82rem;
}

.pb-time__to {
	font-size: 0.75rem;
	opacity: 0.7;
}

.pb-week__empty {
	margin: 0.75rem 0;
	opacity: 0.8;
}

/* Seven columns don't fit a phone: stack the days that actually have times. */
@media (max-width: 640px) {
	.pb-week {
		grid-template-columns: 1fr;
	}

	.pb-week__day.is-empty {
		display: none;
	}

	.pb-week__day {
		min-height: 0;
	}

	.pb-week__dayhead {
		flex-direction: row;
		justify-content: flex-start;
		gap: 0.4rem;
		padding: 0.4rem 0.6rem;
	}

	.pb-week__wd {
		font-size: 0.85rem;
	}

	.pb-week__slots {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.35rem;
		padding: 0.5rem 0.6rem;
	}

	.pb-week__slots .pb-time {
		width: auto;
		flex-direction: row;
		gap: 0.25rem;
		min-width: 5.5rem;
	}
}
