/* Nexta Booking — stile del calendario. Eredita i colori del tema Nexta Coworking se presente. */
.nxb, .nxb-page {
	--nxb-ink: var(--ink, #21201e);
	--nxb-muted: var(--muted, #6d6a65);
	--nxb-line: var(--line, #e9e6e1);
	--nxb-soft: var(--soft, #f7f5f2);
	--nxb-accent: var(--accent, #f5ba6c);
	--nxb-accent-2: var(--accent-2, #f0a54a);
	--nxb-accent-soft: var(--accent-soft, #fdf1e1);
	--nxb-accent-ink: var(--accent-ink, #b8701d);
	--nxb-ok: #2f8a5b;
	--nxb-err: #c0392b;
	--nxb-r: 16px;
	--nxb-display: var(--display, inherit);
	color: var(--nxb-ink);
	font-size: 16px;
}
.nxb *, .nxb *::before, .nxb *::after { box-sizing: border-box; }
.nxb button { font: inherit; color: inherit; cursor: pointer; }
.nxb button:disabled { cursor: not-allowed; }
.nxb :focus-visible { outline: 3px solid var(--nxb-accent); outline-offset: 2px; }
.nxb-loading { padding: 40px; text-align: center; color: var(--nxb-muted); }
.nxb-muted { color: var(--nxb-muted); margin: 0; }

.nxb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.nxb-steps { display: grid; gap: 28px; min-width: 0; }
.nxb-step__title { display: flex; align-items: center; gap: 12px; font-family: var(--nxb-display); font-size: 20px; letter-spacing: -.01em; margin: 0 0 14px; }
.nxb-step__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--nxb-ink); color: var(--nxb-accent); font-size: 14px; font-weight: 800; flex: 0 0 auto; }

/* Formula */
.nxb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nxb-chip { padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--nxb-line); background: #fff; font-weight: 700; }
.nxb-chip.is-on { background: var(--nxb-ink); border-color: var(--nxb-ink); color: #fff; }
.nxb-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.nxb-type { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: var(--nxb-r); border: 1.5px solid var(--nxb-line); background: #fff; text-align: left; transition: border-color .15s, background .15s; }
.nxb-type strong { font-size: 16px; }
.nxb-type span { font-size: 14px; color: var(--nxb-muted); }
.nxb-type:hover { border-color: var(--nxb-ink); }
.nxb-type.is-on { border-color: var(--nxb-accent); background: var(--nxb-accent-soft); box-shadow: inset 0 0 0 1px var(--nxb-accent); }
.nxb-seats:empty { display: none; }
.nxb-stepper { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 16px; border: 1.5px solid var(--nxb-line); border-radius: 999px; }
.nxb-stepper__label { font-weight: 700; margin-right: 6px; }
.nxb-stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--nxb-soft); font-size: 20px; line-height: 1; }
.nxb-stepper output { min-width: 22px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Calendario */
.nxb-cal { border: 1.5px solid var(--nxb-line); border-radius: var(--nxb-r); padding: 14px; background: #fff; }
.nxb-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nxb-cal__head strong { font-family: var(--nxb-display); font-size: 18px; }
.nxb-cal__nav { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--nxb-soft); font-size: 22px; line-height: 1; }
.nxb-cal__nav:disabled { opacity: .3; }
.nxb-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.nxb-cal__dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--nxb-muted); padding: 4px 0; }
.nxb-day { position: relative; aspect-ratio: 1 / 1; max-height: 54px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; transition: background .15s; }
.nxb-day::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; }
.nxb-day--free::after { background: var(--nxb-ok); }
.nxb-day--partial::after { background: var(--nxb-accent-2); }
.nxb .nxb-day--full { color: #c4bfb7; text-decoration: line-through; }
.nxb .nxb-day--closed { color: #cdc8c0; }
.nxb .nxb-day--loading { color: #a9a49c; }
.nxb .nxb-day:not(:disabled) { cursor: pointer; }
.nxb-day:not(:disabled):hover { background: var(--nxb-soft); }
.nxb-day.is-today { box-shadow: inset 0 0 0 1.5px var(--nxb-line); }
.nxb .nxb-day.is-on { background: var(--nxb-ink); color: #fff; }
.nxb-day.is-on::after { background: var(--nxb-accent); }
.nxb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--nxb-muted); margin: 10px 0 0; }
.nxb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.nxb-dot--free { background: var(--nxb-ok); }
.nxb-dot--partial { background: var(--nxb-accent-2); }
.nxb-dot--full { background: #c4bfb7; }

/* Orari */
.nxb-time__date { font-weight: 700; margin: 0 0 12px; }
.nxb-time__date::first-letter { text-transform: uppercase; }
.nxb-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 14px; }
.nxb-slot { padding: 11px 0; border-radius: 12px; border: 1.5px solid var(--nxb-line); background: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.nxb-slot:not(:disabled):hover { border-color: var(--nxb-ink); }
.nxb-slot:disabled { background: var(--nxb-soft); color: #c4bfb7; text-decoration: line-through; border-color: transparent; }
.nxb-slot.is-on { background: var(--nxb-ink); border-color: var(--nxb-ink); color: #fff; }
.nxb-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.nxb-option { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 16px 18px; border-radius: var(--nxb-r); border: 1.5px solid var(--nxb-line); background: #fff; text-align: left; }
.nxb-option span { color: var(--nxb-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.nxb-option.is-on { border-color: var(--nxb-accent); background: var(--nxb-accent-soft); box-shadow: inset 0 0 0 1px var(--nxb-accent); }
.nxb-option:disabled, .nxb-option.is-off { opacity: .45; background: var(--nxb-soft); box-shadow: none; border-color: transparent; }

/* Form */
.nxb-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.nxb-field { display: flex; flex-direction: column; gap: 6px; }
.nxb-field--full { grid-column: 1 / -1; }
.nxb-field--inline { flex-direction: row; align-items: center; gap: 12px; }
.nxb-field span { font-size: 14px; font-weight: 700; }
.nxb-field input, .nxb-field select, .nxb-field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--nxb-line); border-radius: 12px; background: #fff; font: inherit; color: inherit; }
.nxb-field--inline select { width: auto; }
.nxb-field input:focus, .nxb-field select:focus, .nxb-field textarea:focus { outline: none; border-color: var(--nxb-accent); box-shadow: 0 0 0 4px rgba(245, 186, 108, .25); }
.nxb-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--nxb-muted); margin-bottom: 14px; }
.nxb-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--nxb-accent-2); flex: 0 0 auto; }
.nxb-check a { color: var(--nxb-ink); }
.nxb-note { font-size: 14px; padding: 12px 14px; border-radius: 12px; background: var(--nxb-accent-soft); margin: 0 0 14px; }
.nxb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nxb-error { color: var(--nxb-err); background: #fbeaea; padding: 12px 14px; border-radius: 12px; font-weight: 600; margin: 0 0 14px; }
.nxb-error[hidden] { display: none; }

/* Bottoni */
.nxb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.nxb-btn--lg { padding: 16px 30px; font-size: 16px; }
.nxb-btn--primary { background: var(--nxb-accent); color: var(--nxb-ink); }
.nxb-btn--primary:not(:disabled):hover { background: var(--nxb-accent-2); transform: translateY(-1px); }
.nxb-btn--primary:disabled { opacity: .45; }
.nxb-btn--ghost { background: #fff; border-color: var(--nxb-line); color: var(--nxb-ink); }
.nxb-btn--danger { background: #fff; border-color: #e7c3bf; color: var(--nxb-err); }
.nxb-btn--danger:hover { background: #fbeaea; }
.nxb-submit { width: 100%; }

/* Riepilogo */
.nxb-summary-card { position: sticky; top: calc(var(--header-h, 76px) + 20px); background: var(--nxb-ink); color: #fff; border-radius: 22px; padding: 24px; }
.nxb-summary-card__space { font-family: var(--nxb-display); font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 0 0 14px; }
.nxb-summary-card__list { margin: 0; }
.nxb-summary-card__list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: 14.5px; }
.nxb-summary-card__list dt { color: rgba(255, 255, 255, .6); }
.nxb-summary-card__list dd { margin: 0; font-weight: 700; text-align: right; }
.nxb-summary-card__list dd::first-letter { text-transform: uppercase; }
.nxb-summary-card__total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 6px; }
.nxb-summary-card__total strong { font-family: var(--nxb-display); font-size: 34px; color: var(--nxb-accent); letter-spacing: -.03em; }
.nxb-summary-card__pay { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .65); }

/* Esito */
.nxb-done { text-align: center; max-width: 560px; margin: 0 auto; padding: 24px 0; }
.nxb-done__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--nxb-accent); color: var(--nxb-ink); font-size: 34px; font-weight: 800; margin-bottom: 14px; }
.nxb-done h3 { font-family: var(--nxb-display); font-size: 30px; margin: 0 0 10px; }
.nxb-done p { color: var(--nxb-muted); }
.nxb-summary { text-align: left; margin: 20px 0; background: var(--nxb-soft); border-radius: var(--nxb-r); padding: 6px 18px; }
.nxb-summary div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--nxb-line); }
.nxb-summary div:last-child { border-bottom: 0; }
.nxb-summary dt { color: var(--nxb-muted); }
.nxb-summary dd { margin: 0; font-weight: 700; text-align: right; }

/* Pagine da link email */
.nxb-page { padding: calc(var(--header-h, 76px) + 40px) 16px 80px; background: var(--nxb-soft); min-height: 60vh; }
.nxb-page__inner { max-width: 640px; margin: 0 auto; background: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 40px); box-shadow: 0 8px 24px rgba(33, 32, 30, .06); }
.nxb-page__title { font-family: var(--nxb-display); font-size: clamp(28px, 4vw, 38px); letter-spacing: -.03em; margin: 0 0 18px; }
.nxb-page .nxb-summary { background: var(--nxb-soft); }
.nxb-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--nxb-soft); }
.nxb-badge--pending { background: #fff4e0; color: #9a5b0b; }
.nxb-badge--confirmed { background: #e7f5ed; color: var(--nxb-ok); }
.nxb-badge--rejected, .nxb-badge--cancelled { background: #fbeaea; color: var(--nxb-err); }
.nxb-alert { padding: 14px 16px; border-radius: 12px; background: var(--nxb-soft); font-weight: 600; }
.nxb-alert--ok { background: #e7f5ed; color: var(--nxb-ok); }
.nxb-alert--err { background: #fbeaea; color: var(--nxb-err); }
.nxb-cancel { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--nxb-line); }
.nxb-cancel small { color: var(--nxb-muted); }
.nxb-quote { margin: 0 0 18px; padding: 12px 16px; border-left: 3px solid var(--nxb-accent); background: var(--nxb-accent-soft); border-radius: 0 12px 12px 0; }
.nxb-admin-form { display: grid; gap: 10px; margin-top: 20px; }
.nxb-admin-form label { font-weight: 700; font-size: 14px; }
.nxb-admin-form textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--nxb-line); border-radius: 12px; font: inherit; }
.nxb-admin-form .nxb-btn { justify-self: start; }
.nxb-muted { color: var(--nxb-muted); }

@media (max-width: 900px) {
	.nxb-layout { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
	.nxb-steps { display: contents; }
	.nxb-summary-card { position: static; order: 4; }
	.nxb-step:nth-child(4) { order: 5; }
}
@media (max-width: 560px) {
	.nxb-form__grid { grid-template-columns: 1fr; }
	.nxb-cal { padding: 10px 6px; }
	.nxb-day { border-radius: 10px; font-size: 15px; }
	.nxb-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Diagnostica (?nxb_debug=1) */
.nxb-debug { margin-top: 24px; padding: 16px; border-radius: 12px; background: #1d1c1a; color: #e9e6e1; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }

.nxb-cal__empty { margin: 10px 4px 2px; font-size: 14px; }
