/* Chioggia Booking Connect — widget di prenotazione diretta */
.cbcf {
	--cbcf-accent: #0f5c63;
	--cbcf-ink: #13272b;
	--cbcf-muted: #5d7073;
	--cbcf-line: #dde4e2;
	--cbcf-soft: #f3f6f5;
	--cbcf-paper: #ffffff;
	--cbcf-ocra: #b97a1f;
	--cbcf-bad: #b0402e;
	--cbcf-accent-soft: color-mix(in srgb, var(--cbcf-accent) 12%, #fff);
	--cbcf-display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--cbcf-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--cbcf-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
	color: var(--cbcf-ink);
	font: 15px/1.55 var(--cbcf-body);
	max-width: 1040px;
	margin: 0 auto;
	display: grid;
	gap: 22px;
	-webkit-font-smoothing: antialiased;
}
.cbcf *, .cbcf *::before, .cbcf *::after { box-sizing: border-box; }
.cbcf h2, .cbcf h3, .cbcf h4, .cbcf p { margin: 0; }
:where(.cbcf) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.cbcf-body { display: grid; gap: 18px; }
.cbcf :focus-visible { outline: 2px solid var(--cbcf-ocra); outline-offset: 2px; }
.cbcf .num { font-family: var(--cbcf-mono); font-variant-numeric: tabular-nums; }

.cbcf-head { display: grid; gap: 6px; }
.cbcf-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cbcf-ocra); font-weight: 600; }
.cbcf-title { font: 500 clamp(28px, 4vw, 40px)/1.1 var(--cbcf-display); letter-spacing: -.015em; text-wrap: balance; color: var(--cbcf-ink); }
.cbcf-sub { color: var(--cbcf-muted); max-width: 60ch; }

/* Barra di ricerca */
.cbcf-bar {
	display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 0;
	background: var(--cbcf-paper); border: 1px solid var(--cbcf-line); border-radius: 14px;
	box-shadow: 0 1px 2px rgba(19, 39, 43, .05), 0 14px 34px -22px rgba(19, 39, 43, .35);
	position: relative;
}
.cbcf-slot {
	border: 0; background: none; text-align: left; padding: 14px 18px; cursor: pointer; display: grid; gap: 2px;
	border-radius: 14px; min-width: 0;
}
.cbcf-slot + .cbcf-slot { border-left: 1px solid var(--cbcf-line); border-radius: 0; }
.cbcf-slot:hover, .cbcf-slot[aria-expanded="true"] { background: var(--cbcf-soft); }
.cbcf-slot small { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--cbcf-muted); font-weight: 600; }
.cbcf-slot b { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbcf-slot b.ph { color: var(--cbcf-muted); font-weight: 500; }
.cbcf-go { margin: 8px; }

.cbcf-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 1px solid var(--cbcf-accent); background: var(--cbcf-accent); color: #fff;
	padding: 12px 22px; border-radius: 10px; font-weight: 600; cursor: pointer; line-height: 1.2;
	transition: filter .15s, transform .1s;
}
.cbcf-btn:hover { filter: brightness(1.1); }
.cbcf-btn:active { transform: translateY(1px); }
.cbcf-btn[disabled] { opacity: .5; cursor: default; filter: none; }
.cbcf-btn.ghost { background: transparent; color: var(--cbcf-accent); }
.cbcf-btn.link { background: none; border: 0; color: var(--cbcf-accent); padding: 6px 0; font-weight: 600; }

/* Pannelli a comparsa */
.cbcf-pop {
	position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
	background: var(--cbcf-paper); border: 1px solid var(--cbcf-line); border-radius: 14px;
	box-shadow: 0 24px 50px -20px rgba(19, 39, 43, .35); padding: 18px;
	max-width: calc(100vw - 32px);
}
.cbcf-pop.anim { animation: cbcf-in .16s ease-out; }
.cbcf-pop.guests { left: auto; right: 0; width: 320px; display: grid; gap: 14px; }
@keyframes cbcf-in { from { opacity: 0; transform: translateY(-4px); } }

.cbcf-cal { display: grid; grid-template-columns: repeat(2, 272px); gap: 26px; }
.cbcf-cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cbcf-cal-nav button { border: 1px solid var(--cbcf-line); background: var(--cbcf-paper); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.cbcf-cal-nav button[disabled] { opacity: .35; cursor: default; }
.cbcf-month h4 { font: 600 16px var(--cbcf-display); text-align: center; margin-bottom: 8px; text-transform: capitalize; }
.cbcf-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px 0; }
.cbcf-days .dow { font-size: 11px; text-align: center; color: var(--cbcf-muted); padding: 4px 0; font-weight: 600; }
.cbcf-day {
	border: 0; background: none; height: 38px; cursor: pointer; font-size: 14px; position: relative; padding: 0; min-width: 0; color: inherit;
	font-variant-numeric: tabular-nums; border-radius: 0;
}
.cbcf-day span { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto; border-radius: 50%; transition: background .1s; }
.cbcf-day:hover:not([disabled]) span { background: var(--cbcf-accent-soft); }
.cbcf-day[disabled] { color: #b9c4c2; cursor: default; text-decoration: line-through; text-decoration-color: transparent; }
.cbcf-day.in { background: var(--cbcf-accent-soft); }
.cbcf-day.start, .cbcf-day.end { background: linear-gradient(90deg, transparent 50%, var(--cbcf-accent-soft) 50%); }
.cbcf-day.end { background: linear-gradient(90deg, var(--cbcf-accent-soft) 50%, transparent 50%); }
.cbcf-day.start.end { background: none; }
.cbcf .cbcf-day.start span, .cbcf .cbcf-day.end span { background: var(--cbcf-accent); color: #fff; font-weight: 600; }
.cbcf-day.today span { box-shadow: inset 0 0 0 1px var(--cbcf-ocra); }
.cbcf-cal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cbcf-line); color: var(--cbcf-muted); font-size: 13.5px; gap: 12px; }

.cbcf-stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cbcf-stepper b { display: block; font-weight: 600; }
.cbcf-stepper small { color: var(--cbcf-muted); font-size: 12.5px; }
.cbcf-stepper .ctl { display: flex; align-items: center; gap: 12px; }
.cbcf-stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--cbcf-line); background: var(--cbcf-paper); cursor: pointer; font-size: 18px; line-height: 1; }
.cbcf-stepper button[disabled] { opacity: .35; cursor: default; }
.cbcf-stepper output { min-width: 18px; text-align: center; font-weight: 600; }

/* Promesse */
.cbcf-perks { display: flex; gap: 8px 22px; flex-wrap: wrap; color: var(--cbcf-muted); font-size: 13.5px; }
.cbcf-perks span::before { content: "✓"; color: var(--cbcf-accent); font-weight: 700; margin-right: 6px; }

/* Risultati */
.cbcf-results { display: grid; gap: 14px; }
.cbcf-results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cbcf-results-head h3 { font: 500 22px var(--cbcf-display); }
.cbcf-results-head p { color: var(--cbcf-muted); font-size: 14px; }
.cbcf-room {
	display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; background: var(--cbcf-paper);
	border: 1px solid var(--cbcf-line); border-radius: 14px; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.cbcf-room:hover { border-color: color-mix(in srgb, var(--cbcf-accent) 40%, var(--cbcf-line)); box-shadow: 0 16px 34px -24px rgba(19, 39, 43, .45); }
.cbcf-room.off { opacity: .62; }
.cbcf-room.off:hover { box-shadow: none; border-color: var(--cbcf-line); }
.cbcf-art { position: relative; min-height: 170px; background: var(--cbcf-accent) center/cover no-repeat; overflow: hidden; }
.cbcf-art.gen::after {
	content: ""; position: absolute; inset: auto 0 0 0; height: 55%;
	background:
		repeating-linear-gradient(0deg, transparent 0 9px, rgba(255,255,255,.07) 9px 10px),
		linear-gradient(transparent, rgba(0,0,0,.2));
}
.cbcf-art .mono-letter { position: absolute; left: 18px; bottom: 12px; font: italic 500 54px/1 var(--cbcf-display); color: rgba(255,255,255,.9); }
.cbcf-art .cap { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--cbcf-ink); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.cbcf-info { padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.cbcf-info h4 { font: 500 21px/1.2 var(--cbcf-display); }
.cbcf-info p { color: var(--cbcf-muted); font-size: 14px; }
.cbcf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cbcf-chips span { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--cbcf-soft); color: var(--cbcf-ink); }
.cbcf-price { padding: 18px 20px; border-left: 1px dashed var(--cbcf-line); display: grid; gap: 4px; align-content: center; text-align: right; }
.cbcf-price .tot { font: 500 28px/1 var(--cbcf-display); letter-spacing: -.01em; }
.cbcf-price small { color: var(--cbcf-muted); font-size: 12.5px; }
.cbcf-price .left { color: var(--cbcf-ocra); font-weight: 600; font-size: 12.5px; }
.cbcf-price .why { color: var(--cbcf-bad); font-size: 13px; font-weight: 500; }
.cbcf-price .cbcf-btn { margin-top: 10px; }

/* Checkout */
.cbcf-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.cbcf-form { background: var(--cbcf-paper); border: 1px solid var(--cbcf-line); border-radius: 14px; padding: 22px; display: grid; gap: 14px; }
.cbcf-form h3 { font: 500 22px var(--cbcf-display); }
.cbcf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.cbcf-field { display: grid; gap: 5px; }
.cbcf-field label { font-size: 13px; font-weight: 600; }
.cbcf-field input, .cbcf-field select, .cbcf-field textarea {
	border: 1px solid #c9d3d1; border-radius: 9px; padding: 11px 12px; background: #fff; width: 100%; max-width: 100%;
}
.cbcf-field input:focus, .cbcf-field select:focus, .cbcf-field textarea:focus { outline: none; border-color: var(--cbcf-accent); box-shadow: 0 0 0 3px var(--cbcf-accent-soft); }
.cbcf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.cbcf-consent { display: flex; gap: 10px; font-size: 13.5px; color: var(--cbcf-muted); align-items: flex-start; }
.cbcf-consent input { margin-top: 4px; accent-color: var(--cbcf-accent); }
.cbcf-error { color: var(--cbcf-bad); font-weight: 500; font-size: 14px; }
.cbcf-summary { background: var(--cbcf-soft); border-radius: 14px; padding: 20px; display: grid; gap: 12px; position: sticky; top: 24px; }
.cbcf-summary h4 { font: 500 19px var(--cbcf-display); }
.cbcf-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.cbcf-summary dt { color: var(--cbcf-muted); }
.cbcf-summary dd { margin: 0; text-align: right; font-weight: 500; }
.cbcf-summary .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--cbcf-line); padding-top: 12px; }
.cbcf-summary .total b { font: 500 26px var(--cbcf-display); }
.cbcf-summary .note { font-size: 12.5px; color: var(--cbcf-muted); }

/* Conferma */
.cbcf-done { background: var(--cbcf-paper); border: 1px solid var(--cbcf-line); border-radius: 16px; padding: 34px 28px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.cbcf-done .seal { width: 64px; height: 64px; border-radius: 50%; background: var(--cbcf-accent-soft); color: var(--cbcf-accent); display: grid; place-items: center; }
.cbcf-done h3 { font: 500 28px var(--cbcf-display); }
.cbcf-done p { color: var(--cbcf-muted); max-width: 52ch; }
.cbcf-done .ref { font: 500 20px var(--cbcf-mono); letter-spacing: .08em; background: var(--cbcf-soft); padding: 8px 16px; border-radius: 10px; }

.cbcf-skel { height: 170px; border-radius: 14px; background: linear-gradient(90deg, var(--cbcf-soft), #e7eceb, var(--cbcf-soft)); background-size: 200% 100%; animation: cbcf-sh 1.2s infinite; }
@keyframes cbcf-sh { to { background-position: -200% 0; } }

@media (max-width: 880px) {
	.cbcf-bar { grid-template-columns: 1fr 1fr; }
	.cbcf-go { grid-column: 1 / -1; margin: 0 8px 8px; }
	.cbcf-room { grid-template-columns: 1fr; }
	.cbcf-art { min-height: 140px; }
	.cbcf-price { border-left: 0; border-top: 1px dashed var(--cbcf-line); text-align: left; grid-template-columns: 1fr auto; align-items: center; }
	.cbcf-price .cbcf-btn { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
	.cbcf-checkout { grid-template-columns: 1fr; }
	.cbcf-summary { position: static; order: -1; }
	.cbcf-cal { grid-template-columns: 1fr; }
	.cbcf-cal .cbcf-month + .cbcf-month { display: none; }
	.cbcf-pop { left: 0; right: 0; }
	.cbcf-pop.anim { animation: cbcf-in .16s ease-out; }
.cbcf-pop.guests { width: auto; left: 0; }
}
@media (max-width: 480px) {
	.cbcf-bar { grid-template-columns: 1fr; }
	.cbcf-slot + .cbcf-slot { border-left: 0; border-top: 1px solid var(--cbcf-line); }
	.cbcf-day { height: 40px; }
	.cbcf-day span { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) { .cbcf * { animation: none !important; transition: none !important; } }
