/* Ritmo Booking form. Colours follow the theme presets, with fallbacks. */
.rb {
	--rb-ink: var(--wp--preset--color--ink, #07090d);
	--rb-text: #0b0f15;
	--rb-muted: #4a5566;
	--rb-line: #d9dfe7;
	--rb-soft: #f2f5f9;
	--rb-card: #fff;
	--rb-blue: var(--wp--preset--color--blue, #1e90ff);
	--rb-blue-ink: #0a5fc4;
	--rb-accent: var(--wp--preset--color--orange, #ff6b1a);
	--rb-ok: #12805c;
	--rb-bad: #c62828;
	--rb-radius: 14px;
	color: var(--rb-text);
	background: var(--rb-card);
	border-radius: 22px;
	padding: clamp(18px, 4vw, 40px);
	box-shadow: 0 30px 80px -30px rgba(7, 9, 13, .45), 0 0 0 1px rgba(7, 9, 13, .06);
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}
.rb *, .rb *::before, .rb *::after { box-sizing: border-box; }
.rb [hidden] { display: none !important; }

.rb-progress { display: flex; gap: 6px; list-style: none; margin: 0 0 26px; padding: 0; counter-reset: s; }
.rb-progress li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 0 0; border-top: 3px solid var(--rb-line); font-size: 13px; font-weight: 700; color: var(--rb-muted); letter-spacing: .02em; }
.rb-progress li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rb-soft); font-size: 12px; }
.rb-progress li.is-active { border-color: var(--rb-accent); color: var(--rb-text); }
.rb-progress li.is-active span { background: var(--rb-accent); color: var(--rb-ink); }
.rb-progress li.is-done { border-color: var(--rb-blue); color: var(--rb-text); }
.rb-progress li.is-done span { background: var(--rb-blue); color: #fff; }
@media (max-width: 560px) { .rb-progress li { font-size: 0; gap: 0; justify-content: center; } .rb-progress li span { font-size: 12px; } }

.rb-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.rb-legend:focus, .rb-legend:focus-visible, .rb-done:focus, .rb-done:focus-visible { outline: none !important; }
.rb-legend { font-family: var(--wp--preset--font-family--display, inherit); font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800; line-height: 1.15; margin: 0 0 18px; padding: 0; color: var(--rb-text); outline: none; font-stretch: 112%; }
.rb-label { font-weight: 700; margin: 22px 0 10px; font-size: 15px; }
.rb-label small, .rb-field small { font-weight: 500; color: var(--rb-muted); }

.rb-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rb-service { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 16px 46px; border: 1.5px solid var(--rb-line); border-radius: var(--rb-radius); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; background: #fff; }
.rb-service:hover { border-color: #aab6c5; transform: translateY(-1px); }
.rb-service input { position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; accent-color: var(--rb-accent); margin: 0; }
.rb-service__name { font-weight: 800; }
.rb-service__desc { font-size: 14px; color: var(--rb-muted); line-height: 1.4; }
.rb-service:has(input:checked) { border-color: var(--rb-accent); box-shadow: 0 0 0 3px rgba(255, 107, 26, .18); }

.rb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-chip { position: relative; cursor: pointer; }
.rb-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rb-chip span { display: inline-block; padding: 9px 15px; border: 1.5px solid var(--rb-line); border-radius: 999px; font-size: 14px; font-weight: 600; background: #fff; transition: all .15s; }
.rb-chip:hover span { border-color: #aab6c5; }
.rb-chip input:checked + span { background: var(--rb-ink); border-color: var(--rb-ink); color: #fff; }
.rb-chip input:focus-visible + span { outline: 3px solid var(--rb-blue); outline-offset: 2px; }

.rb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rb-span-2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .rb-grid { grid-template-columns: 1fr; } }
.rb-field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; margin-top: 4px; }
.rb-field input, .rb-field select, .rb-field textarea { font: inherit; font-weight: 500; font-size: 16px; color: var(--rb-text); background: #fff; border: 1.5px solid var(--rb-line); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 48px; }
.rb-field textarea { resize: vertical; min-height: 90px; }
.rb-field input:focus, .rb-field select:focus, .rb-field textarea:focus { outline: none; border-color: var(--rb-blue); box-shadow: 0 0 0 3px rgba(30, 144, 255, .2); }
.rb .is-invalid { border-color: var(--rb-bad) !important; }
.rb-step > .rb-field { margin-top: 18px; }

.rb-error { color: var(--rb-bad); font-size: 14px; font-weight: 600; margin: 8px 0 0; }
.rb-alert { background: #fff4ef; border: 1px solid #ffc9ad; color: #7a2c00; padding: 12px 14px; border-radius: 12px; margin: 14px 0 0; }
.rb-alert a, .rb-hint a, .rb-fine a, .rb-link { color: var(--rb-blue-ink); font-weight: 700; }
.rb-link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.rb-hint { font-size: 14px; color: var(--rb-muted); margin: 16px 0 0; }
.rb-fine { font-size: 13px; color: var(--rb-muted); margin: 14px 0 0; text-align: center; }
.rb-loading { color: var(--rb-muted); padding: 30px 0; text-align: center; }

/* Calendar */
.rb-cal { max-width: 420px; }
.rb-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 17px; }
.rb-cal__nav { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--rb-line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--rb-text); }
.rb-cal__nav:disabled { opacity: .3; cursor: default; }
.rb-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rb-cal__dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--rb-muted); padding: 4px 0; }
.rb-day { aspect-ratio: 1; border-radius: 10px; border: 0; background: transparent; font: inherit; font-weight: 600; color: #a3adbb; cursor: default; position: relative; min-height: 40px; }
.rb-day.is-open { background: var(--rb-soft); color: var(--rb-text); cursor: pointer; font-weight: 800; }
.rb-day.is-open:hover { background: #e3e9f1; }
.rb-day.is-full { text-decoration: line-through; }
.rb-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--rb-blue); }
.rb-day.is-selected { background: var(--rb-ink) !important; color: #fff !important; }
.rb-cal__legend { font-size: 12px; color: var(--rb-muted); display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.rb-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: #dfe6ee; }
.rb-dot.is-full { background: #fff; border: 1px solid var(--rb-line); }
.rb-dot:not(:first-child) { margin-left: 10px; }
.rb-wins { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.rb-win { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--rb-line); background: #fff; font: inherit; cursor: pointer; text-align: left; color: var(--rb-text); }
.rb-win small { color: var(--rb-ok); font-weight: 700; font-size: 12px; }
.rb-win:disabled { opacity: .45; cursor: default; }
.rb-win:disabled small { color: var(--rb-muted); }
.rb-win.is-selected { border-color: var(--rb-accent); box-shadow: 0 0 0 3px rgba(255, 107, 26, .18); }
.rb-cal button:focus-visible, .rb-win:focus-visible, .rb-btn:focus-visible { outline: 3px solid var(--rb-blue); outline-offset: 2px; }

/* Summary + consent */
.rb-summary dl { margin: 0; border: 1px solid var(--rb-line); border-radius: var(--rb-radius); overflow: hidden; }
.rb-summary dl div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--rb-line); font-size: 14px; }
.rb-summary dl div:first-child { border-top: 0; }
.rb-summary dt { font-weight: 700; color: var(--rb-muted); }
.rb-summary dd { margin: 0; font-weight: 600; }
.rb-consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; font-size: 14px; cursor: pointer; }
.rb-consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--rb-accent); flex: none; }
.rb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.rb-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.rb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 24px; border-radius: 12px; border: 0; background: var(--rb-ink); color: #fff; font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.rb-btn:hover { transform: translateY(-1px); color: #fff; }
.rb-btn--ghost { background: transparent; color: var(--rb-text); border: 1.5px solid var(--rb-line); }
.rb-btn--ghost:hover { color: var(--rb-text); border-color: #aab6c5; }
.rb-btn--go { background: var(--rb-accent); color: var(--rb-ink); }
.rb-btn--go:hover { color: var(--rb-ink); }
.rb-btn--wa { background: #1fa855; color: #fff; }
.rb-btn.is-busy { opacity: .7; cursor: progress; }
@media (max-width: 560px) { .rb-nav .rb-btn { flex: 1; padding: 12px 14px; } }

/* Done */
.rb-done { text-align: center; padding: 20px 0 6px; outline: none; }
.rb-done__icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 800; background: #e7f6ef; color: var(--rb-ok); }
.rb-done__title { font-family: var(--wp--preset--font-family--display, inherit); font-size: 1.8rem; margin: 0 0 6px; color: var(--rb-text); font-stretch: 112%; }
.rb-done__when { font-weight: 800; margin: 0; }
.rb-done__note { color: var(--rb-muted); margin: 8px auto 20px; max-width: 420px; }
.rb-done__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

@media (prefers-reduced-motion: reduce) { .rb * { transition: none !important; } }
