/* =========================================================================
   IMPASTO PIZZERIA CONTEMPORANEA - Stili front-end prenotazione tavoli
   Design moderno, responsive, mobile-first.
   ========================================================================= */

.ipz-widget {
	--ipz-dark: #1f1a17;
	--ipz-gold: #d9a441;
	--ipz-gold-light: #f4c04b;
	--ipz-bg: #faf7f2;
	--ipz-border: #eadfce;
	--ipz-text: #2b2622;
	--ipz-muted: #8a8177;
	--ipz-success: #2e7d4f;
	--ipz-danger: #c0392b;
	--ipz-radius: 14px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: var(--ipz-text);
	max-width: 640px;
	margin: 0 auto;
	box-sizing: border-box;
}
.ipz-widget *, .ipz-widget *::before, .ipz-widget *::after { box-sizing: border-box; }

.ipz-card {
	background: #fff;
	border: 1px solid var(--ipz-border);
	border-radius: var(--ipz-radius);
	box-shadow: 0 12px 32px rgba(31, 26, 23, 0.08);
	padding: 32px;
}

.ipz-card__header { margin-bottom: 24px; text-align: center; }
.ipz-title { font-size: 24px; margin: 0 0 6px; color: var(--ipz-dark); letter-spacing: .3px; }
.ipz-subtitle { margin: 0; color: var(--ipz-muted); font-size: 14px; }

.ipz-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 16px;
}
@media (max-width: 520px) {
	.ipz-form__row { grid-template-columns: 1fr; gap: 12px; }
	.ipz-card { padding: 22px; border-radius: 10px; }
}

.ipz-field { display: flex; flex-direction: column; margin-bottom: 4px; }
.ipz-field--full { margin-bottom: 16px; }

.ipz-field label {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--ipz-dark);
}

.ipz-field input,
.ipz-field textarea {
	border: 1.5px solid var(--ipz-border);
	border-radius: 9px;
	padding: 11px 13px;
	font-size: 15px;
	background: var(--ipz-bg);
	transition: border-color .15s ease, box-shadow .15s ease;
	width: 100%;
	font-family: inherit;
}
.ipz-field input:focus,
.ipz-field textarea:focus {
	outline: none;
	border-color: var(--ipz-gold);
	box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.25);
	background: #fff;
}
.ipz-field input:invalid:not(:placeholder-shown) { border-color: var(--ipz-danger); }

/* Honeypot: nascosto in modo robusto ai bot ma invisibile e non focusabile per l'utente reale */
.ipz-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* Turni */
.ipz-shifts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ipz-shifts__placeholder { font-size: 13px; color: var(--ipz-muted); margin: 6px 0; }

.ipz-shift-btn {
	flex: 1 1 150px;
	border: 1.5px solid var(--ipz-border);
	background: var(--ipz-bg);
	border-radius: 10px;
	padding: 12px 10px;
	text-align: center;
	cursor: pointer;
	font-size: 14px;
	transition: all .15s ease;
	font-family: inherit;
}
.ipz-shift-btn strong { display: block; font-size: 15px; margin-bottom: 2px; }
.ipz-shift-btn:hover:not(.is-disabled) { border-color: var(--ipz-gold); }
.ipz-shift-btn.is-selected {
	background: var(--ipz-dark);
	border-color: var(--ipz-dark);
	color: var(--ipz-gold-light);
}
.ipz-shift-btn.is-disabled {
	opacity: .45;
	cursor: not-allowed;
	text-decoration: line-through;
}

.ipz-message { font-size: 14px; margin: 10px 0; min-height: 0; }
.ipz-message--error { color: var(--ipz-danger); font-weight: 600; }
.ipz-message--success { color: var(--ipz-success); font-weight: 600; }

.ipz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px 20px;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .1s ease, opacity .15s ease;
}
.ipz-btn:active { transform: scale(0.98); }
.ipz-btn--primary { background: var(--ipz-dark); color: var(--ipz-gold-light); }
.ipz-btn--primary:hover { opacity: .92; }
.ipz-btn--primary:disabled { opacity: .6; cursor: not-allowed; }
.ipz-btn--danger { background: #fff; color: var(--ipz-danger); border: 1.5px solid var(--ipz-danger); }

.ipz-btn__spinner {
	width: 16px; height: 16px;
	border: 2px solid rgba(244, 192, 75, .35);
	border-top-color: var(--ipz-gold-light);
	border-radius: 50%;
	display: none;
	animation: ipz-spin .7s linear infinite;
}
.ipz-btn.is-loading .ipz-btn__spinner { display: inline-block; }
.ipz-btn.is-loading .ipz-btn__label { opacity: .7; }
@keyframes ipz-spin { to { transform: rotate(360deg); } }

.ipz-privacy-note { font-size: 12px; color: var(--ipz-muted); text-align: center; margin-top: 14px; }

.ipz-success-panel { text-align: center; padding: 12px 0; }
.ipz-success-icon {
	width: 56px; height: 56px; border-radius: 50%;
	background: var(--ipz-success); color: #fff;
	font-size: 28px; line-height: 56px; margin: 0 auto 14px;
}
.ipz-success-code {
	font-size: 22px; font-weight: 800; letter-spacing: 1px;
	color: var(--ipz-dark); background: var(--ipz-bg);
	border: 1.5px dashed var(--ipz-gold); border-radius: 10px;
	padding: 10px; display: inline-block; margin: 10px 0;
}

.ipz-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 14px; }
.ipz-summary-table td { padding: 8px 0; border-bottom: 1px solid var(--ipz-border); }
.ipz-summary-table td:first-child { color: var(--ipz-muted); font-weight: 600; width: 40%; }

.ipz-manage-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ipz-manage-actions .ipz-btn { flex: 1 1 200px; }

/* =========================================================================
   WIZARD A STEP: indicatore di avanzamento
   ========================================================================= */
.ipz-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 28px;
	gap: 6px;
}
.ipz-progress__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	opacity: .45;
}
.ipz-progress__step.is-active,
.ipz-progress__step.is-done { opacity: 1; }
.ipz-progress__num {
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--ipz-border);
	color: var(--ipz-dark);
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 13px;
	transition: background .2s ease, color .2s ease;
}
.ipz-progress__step.is-active .ipz-progress__num { background: var(--ipz-dark); color: var(--ipz-gold-light); }
.ipz-progress__step.is-done .ipz-progress__num { background: var(--ipz-success); color: #fff; }
.ipz-progress__label { font-size: 11px; font-weight: 600; text-align: center; white-space: nowrap; }
.ipz-progress__line { width: 32px; height: 2px; background: var(--ipz-border); margin-bottom: 18px; }
@media (max-width: 480px) {
	.ipz-progress__label { display: none; }
	.ipz-progress__line { width: 18px; margin-bottom: 0; }
}

/* Riepilogo step precedente, con link "Modifica" */
.ipz-selection-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--ipz-bg);
	border: 1px solid var(--ipz-border);
	border-radius: 9px;
	padding: 10px 14px;
	font-size: 14px;
	margin-bottom: 18px;
}
.ipz-link-btn {
	background: none; border: none; padding: 0;
	color: var(--ipz-gold); font-weight: 700; font-size: 13px;
	cursor: pointer; text-decoration: underline;
}

.ipz-step-actions { display: flex; gap: 12px; margin-top: 8px; }
.ipz-step-actions .ipz-btn { flex: 1 1 auto; }
.ipz-btn--ghost {
	background: #fff;
	color: var(--ipz-dark);
	border: 1.5px solid var(--ipz-border);
}
.ipz-btn--ghost:hover { border-color: var(--ipz-gold); }

/* =========================================================================
   STEPPER NUMERO PERSONE
   ========================================================================= */
.ipz-stepper {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--ipz-bg);
	border: 1.5px solid var(--ipz-border);
	border-radius: 10px;
	padding: 10px 16px;
	width: fit-content;
}
.ipz-stepper__btn {
	width: 34px; height: 34px;
	border-radius: 50%;
	border: none;
	background: var(--ipz-dark);
	color: var(--ipz-gold-light);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.ipz-stepper__btn:disabled { opacity: .35; cursor: not-allowed; }
.ipz-stepper__value { font-size: 20px; font-weight: 800; min-width: 24px; text-align: center; }
.ipz-stepper__unit { font-size: 13px; color: var(--ipz-muted); }

/* =========================================================================
   CALENDARIO MENSILE PERSONALIZZATO
   ========================================================================= */
.ipz-calendar {
	border: 1.5px solid var(--ipz-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}
.ipz-calendar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--ipz-dark);
	color: var(--ipz-gold-light);
	padding: 12px 16px;
}
.ipz-calendar__month { font-weight: 700; font-size: 15px; letter-spacing: .3px; }
.ipz-calendar__nav {
	background: none; border: none; color: var(--ipz-gold-light);
	font-size: 22px; line-height: 1; cursor: pointer; padding: 0 6px;
}
.ipz-calendar__nav:disabled { opacity: .25; cursor: not-allowed; }

.ipz-calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: var(--ipz-bg);
	font-size: 11px;
	font-weight: 700;
	color: var(--ipz-muted);
	text-transform: uppercase;
}
.ipz-calendar__weekdays span { text-align: center; padding: 8px 0; }

.ipz-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	padding: 10px;
}
.ipz-cal-day {
	aspect-ratio: 1 / 1;
	border: none;
	background: var(--ipz-bg);
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background .12s ease, color .12s ease;
}
.ipz-cal-day--empty { background: transparent; cursor: default; }
.ipz-cal-day:hover:not(.is-disabled):not(.is-selected) { background: #f0e2c2; }
.ipz-cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--ipz-gold); font-weight: 700; }
.ipz-cal-day.is-selected { background: var(--ipz-dark); color: var(--ipz-gold-light); font-weight: 700; }
.ipz-cal-day.is-disabled { color: #c9c1b4; background: transparent; cursor: not-allowed; text-decoration: line-through; }
.ipz-cal-day.is-special-open { box-shadow: inset 0 0 0 1.5px #4caf6d; }

/* Nota per gruppi numerosi (adulti + bambini al limite massimo) */
.ipz-large-group-note {
	font-size: 13px;
	color: var(--ipz-muted);
	margin: 6px 0 4px;
	min-height: 0;
	transition: color .15s ease;
}
.ipz-large-group-note.is-visible {
	color: var(--ipz-danger);
	font-weight: 600;
}
