/* Frisør Booking – alt design styres af variablerne øverst.
   Overstyr dem i temaet eller under Indstillinger > Ekstra CSS. */

.fb-root {
	--fb-primary: #2f5d50;
	--fb-on-primary: #fff;
	--fb-radius: 10px;
	--fb-font: inherit;
	--fb-ink: #1e2522;
	--fb-muted: #66706b;
	--fb-line: #dde2df;
	--fb-surface: #fff;
	--fb-tint: color-mix(in srgb, var(--fb-primary) 8%, var(--fb-surface));
	--fb-gap: 1rem;

	container-type: inline-size;
	font-family: var(--fb-font);
	color: var(--fb-ink);
	line-height: 1.45;
	box-sizing: border-box;
}
.fb-root *, .fb-root *::before, .fb-root *::after { box-sizing: inherit; }

.fb-root[data-preset="blod"] {
	--fb-surface: color-mix(in srgb, var(--fb-primary) 5%, #fff);
	--fb-line: color-mix(in srgb, var(--fb-primary) 18%, #fff);
}
.fb-root[data-preset="mork"] {
	--fb-ink: #edf0ee;
	--fb-muted: #a3aca8;
	--fb-line: #39413e;
	--fb-surface: #1c201f;
	--fb-tint: color-mix(in srgb, var(--fb-primary) 22%, #1c201f);
	background: var(--fb-surface);
	padding: clamp(1rem, 3vw, 2rem);
	border-radius: var(--fb-radius);
}

/* ---------- Fælles elementer ---------- */

.fb-h { font-size: 1.35em; margin: 0 0 .6em; line-height: 1.2; }
.fb-h3 { font-size: 1.05em; margin: 0 0 .6em; }
.fb-muted { color: var(--fb-muted); }
.fb-small { font-size: .875em; }
.fb-empty { color: var(--fb-muted); }
.fb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.fb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	min-height: 44px; padding: .6em 1.3em;
	font: inherit; font-weight: 600; text-decoration: none;
	color: var(--fb-on-primary); background: var(--fb-primary);
	border: 1px solid var(--fb-primary); border-radius: var(--fb-radius);
	cursor: pointer; transition: filter .15s;
}
.fb-btn:hover { filter: brightness(1.08); color: var(--fb-on-primary); }
.fb-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.fb-btn--ghost { background: transparent; color: var(--fb-primary); }
.fb-btn--ghost:hover { background: var(--fb-tint); color: var(--fb-primary); }
.fb-link { background: none; border: 0; padding: 0; font: inherit; color: var(--fb-primary); text-decoration: underline; cursor: pointer; }

.fb-root :focus-visible { outline: 2px solid var(--fb-primary); outline-offset: 2px; }

.fb-field { display: block; margin: 0 0 .8em; }
.fb-field > span { display: block; font-size: .875em; font-weight: 600; margin-bottom: .25em; }
.fb-field input, .fb-field textarea {
	width: 100%; min-height: 44px; padding: .55em .7em;
	font: inherit; color: var(--fb-ink); background: var(--fb-surface);
	border: 1px solid var(--fb-line); border-radius: calc(var(--fb-radius) * .6);
}
.fb-field input:focus, .fb-field textarea:focus { border-color: var(--fb-primary); outline: none; box-shadow: 0 0 0 3px var(--fb-tint); }
.fb-check { display: flex; gap: .5em; align-items: flex-start; margin: .4em 0 1em; font-size: .925em; }
.fb-check input { margin-top: .2em; accent-color: var(--fb-primary); }

.fb-notice { padding: .75em 1em; border-radius: var(--fb-radius); background: var(--fb-tint); border-left: 3px solid var(--fb-primary); }
.fb-notice--error { background: #fdeeee; border-left-color: #b3261e; color: #5c1410; }

/* ---------- Booking: layout ---------- */

.fb-booking .fb-layout { display: grid; gap: calc(var(--fb-gap) * 2); }
@container (min-width: 760px) {
	.fb-booking .fb-layout { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
	.fb-booking .fb-ticket { position: sticky; top: 2rem; }
}

/* Trin: en ægte rækkefølge, derfor numre. */
.fb-step { border-top: 1px solid var(--fb-line); padding: 1.1em 0; }
.fb-step:first-child { border-top: 0; padding-top: 0; }
.fb-step__head { display: flex; align-items: center; gap: .75em; }
.fb-step__num {
	flex: none; width: 1.9em; height: 1.9em; display: grid; place-items: center;
	border-radius: 50%; font-size: .85em; font-weight: 700;
	border: 1.5px solid var(--fb-line); color: var(--fb-muted);
}
.fb-step.is-active .fb-step__num { background: var(--fb-primary); border-color: var(--fb-primary); color: var(--fb-on-primary); }
.fb-step.is-done .fb-step__num { border-color: var(--fb-primary); color: var(--fb-primary); }
.fb-step__title { font-weight: 700; font-size: 1.05em; margin: 0; }
.fb-step__value { margin-left: auto; text-align: right; color: var(--fb-muted); font-size: .925em; }
.fb-step__value .fb-link { margin-left: .6em; }
.fb-step__body { margin-top: 1em; }
.fb-step:not(.is-active) .fb-step__body { display: none; }
.fb-step.is-locked .fb-step__title { color: var(--fb-muted); }

/* Behandlinger og behandlere som en liste, ikke kort. */
.fb-options { display: grid; gap: .5em; margin: 0; padding: 0; list-style: none; }
.fb-option {
	display: flex; gap: 1em; align-items: center; width: 100%;
	padding: .85em 1em; text-align: left; font: inherit; color: inherit;
	background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius);
	cursor: pointer; transition: border-color .15s, background .15s;
}
.fb-option:hover { border-color: var(--fb-primary); }
.fb-option[aria-pressed="true"] { border-color: var(--fb-primary); background: var(--fb-tint); box-shadow: inset 3px 0 0 var(--fb-primary); }
.fb-option__main { flex: 1; min-width: 0; }
.fb-option__name { display: block; font-weight: 600; }
.fb-option__desc { display: block; font-size: .875em; color: var(--fb-muted); }
.fb-option__meta { flex: none; text-align: right; font-size: .925em; white-space: nowrap; }
.fb-option__meta strong { display: block; }
.fb-avatar {
	flex: none; width: 2.4em; height: 2.4em; border-radius: 50%; display: grid; place-items: center;
	background: var(--fb-tint); color: var(--fb-primary); font-weight: 700;
}

/* Dage */
.fb-days-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6em; }
.fb-days-nav strong { font-weight: 600; }
.fb-days-nav button { min-width: 44px; min-height: 44px; font: inherit; font-size: 1.1em; background: none; border: 1px solid var(--fb-line); border-radius: var(--fb-radius); color: var(--fb-ink); cursor: pointer; }
.fb-days-nav button:disabled { opacity: .3; cursor: default; }
.fb-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4em; }
.fb-day {
	display: flex; flex-direction: column; align-items: center; gap: .1em;
	padding: .55em 0; font: inherit; color: inherit;
	background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); cursor: pointer;
}
.fb-day__wd { font-size: .75em; color: var(--fb-muted); text-transform: capitalize; }
.fb-day__n { font-weight: 700; font-size: 1.1em; }
.fb-day:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
.fb-day:not(:disabled):hover { border-color: var(--fb-primary); }
.fb-day[aria-pressed="true"] { background: var(--fb-primary); border-color: var(--fb-primary); color: var(--fb-on-primary); }
.fb-day[aria-pressed="true"] .fb-day__wd { color: inherit; opacity: .8; }

/* Tider */
.fb-slots { margin-top: 1.2em; }
.fb-slot-group + .fb-slot-group { margin-top: .9em; }
.fb-slot-group__label { font-size: .85em; color: var(--fb-muted); margin: 0 0 .4em; }
.fb-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6em, 1fr)); gap: .4em; }
.fb-slot {
	min-height: 44px; font: inherit; font-variant-numeric: tabular-nums; font-weight: 600; color: inherit;
	background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); cursor: pointer;
}
.fb-slot:hover { border-color: var(--fb-primary); color: var(--fb-primary); }
.fb-slot[aria-pressed="true"] { background: var(--fb-primary); border-color: var(--fb-primary); color: var(--fb-on-primary); }
.fb-loading { color: var(--fb-muted); font-size: .925em; }

/* Oplysninger */
.fb-details { display: grid; gap: 0 1em; }
@container (min-width: 520px) { .fb-details { grid-template-columns: 1fr 1fr; } .fb-details .fb-span { grid-column: 1 / -1; } }
.fb-terms { font-size: .875em; color: var(--fb-muted); margin: 0 0 .5em; }
.fb-error { color: #b3261e; font-weight: 600; margin: .6em 0 0; }
.fb-root[data-preset="mork"] .fb-error { color: #ffb4ab; }

/* ---------- Tidskortet: det lille kort salonen giver med hjem ---------- */

.fb-ticket {
	position: relative;
	padding: 1.25em 1.25em 1.1em;
	background: var(--fb-surface);
	border: 1.5px dashed color-mix(in srgb, var(--fb-primary) 45%, var(--fb-line));
	border-radius: var(--fb-radius);
}
.fb-ticket::before {
	content: ""; position: absolute; left: 1.25em; right: 1.25em; top: 0; height: 4px;
	background: var(--fb-primary); border-radius: 0 0 4px 4px;
}
.fb-ticket__salon { font-weight: 700; margin: .2em 0 .9em; font-size: 1.05em; }
.fb-ticket__row { display: grid; grid-template-columns: 5.2em 1fr; gap: .5em; align-items: end; margin: 0 0 .7em; }
.fb-ticket__k { font-size: .8em; color: var(--fb-muted); }
.fb-ticket__v {
	min-height: 1.5em; padding-bottom: .15em;
	border-bottom: 1px solid var(--fb-line);
	font-weight: 600; overflow-wrap: anywhere;
}
.fb-ticket__v:empty::after { content: "\00a0"; }
.fb-ticket__v.is-new { animation: fb-ink .5s ease-out; }
.fb-ticket__total { display: flex; justify-content: space-between; margin-top: 1em; padding-top: .8em; border-top: 1px solid var(--fb-line); font-weight: 700; }
.fb-ticket__account { margin: 1em 0 0; font-size: .85em; color: var(--fb-muted); }

@keyframes fb-ink { from { color: var(--fb-primary); background: var(--fb-tint); } to { background: transparent; } }

/* På små skærme ligger kortet som en kompakt bjælke i bunden. */
@container (max-width: 759px) {
	.fb-ticket { position: sticky; bottom: .5rem; z-index: 5; order: 2; padding: .8em 1em; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); border-style: solid; }
	.fb-ticket::before { display: none; }
	.fb-ticket__salon, .fb-ticket__row--staff, .fb-ticket__account { display: none; }
	.fb-ticket__row { grid-template-columns: 4.5em 1fr; margin-bottom: .3em; }
	.fb-ticket__total { margin-top: .4em; padding-top: .4em; }
	.fb-ticket.is-empty { display: none; }
}

/* Bekræftelse */
.fb-done { text-align: left; max-width: 34em; }
.fb-done .fb-ticket { margin: 1.2em 0; position: relative; bottom: auto; box-shadow: none; border-style: dashed; padding: 1.25em 1.25em 1.1em; }
.fb-done:focus, .fb-step__title:focus { outline: none; }
.fb-done .fb-ticket::before { display: block; }
.fb-done .fb-ticket__salon, .fb-done .fb-ticket__row--staff { display: block; }
.fb-done .fb-ticket__row--staff { display: grid; }
.fb-done__actions { display: flex; gap: .6em; flex-wrap: wrap; }

/* ---------- Konto ---------- */

.fb-auth { display: grid; gap: 1.5em; }
@container (min-width: 640px) { .fb-auth { grid-template-columns: 1fr 1fr; } }
.fb-card { padding: 1.4em; background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); }
.fb-dash__head { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; margin-bottom: 1em; }
.fb-dash__head .fb-h { margin: 0; }
.fb-section { padding: 1.2em 0; border-top: 1px solid var(--fb-line); }
.fb-list { list-style: none; margin: 0; padding: 0; }
.fb-booking-row { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: .8em 0; border-bottom: 1px solid var(--fb-line); }
.fb-booking-row:last-child { border-bottom: 0; }
.fb-booking-row > div { display: flex; flex-direction: column; }
.fb-booking-row strong::first-letter { text-transform: uppercase; }
.fb-list--quiet .fb-booking-row { padding: .5em 0; font-size: .925em; }
.fb-booking-row.is-cancelled { opacity: .5; }
.fb-form--inline { display: grid; gap: 0 1em; max-width: 40em; }
@container (min-width: 560px) { .fb-form--inline { grid-template-columns: 1fr 1fr; } .fb-form--inline .fb-btn { justify-self: start; } }
.fb-form--inline input:disabled { opacity: .6; }

@media (prefers-reduced-motion: reduce) {
	.fb-root *, .fb-root *::before, .fb-root *::after { animation: none !important; transition: none !important; }
}
