/* Studio Bookings widget. Colours and fonts come from the theme through these variables. */
.sb-root {
	--sb-accent: var(--green, #2f4443);
	--sb-accent-soft: var(--green-soft, #e3e9e7);
	--sb-ink: var(--ink, #1d2a29);
	--sb-muted: var(--muted, #5a6766);
	--sb-line: var(--line, #dfe3df);
	--sb-paper: var(--paper, #fff);
	--sb-taken: #eceeeb;
	--sb-head: var(--font-head, Georgia, serif);
	--sb-radius: 8px;
	color: var(--sb-ink);
	font-size: 16px;
}
.sb-root *, .sb-root *::before, .sb-root *::after { box-sizing: border-box; }
.sb-loading { padding: 48px 0; text-align: center; color: var(--sb-muted); }

.sb-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
@media (max-width: 899px) { .sb-wrap { grid-template-columns: 1fr; gap: 24px; } }

/* Calendar */
.sb-cal { background: var(--sb-paper); border: 1px solid var(--sb-line); border-radius: var(--sb-radius); padding: 20px 20px 16px; }
.sb-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sb-prompt { margin: 0; font-weight: 600; text-align: center; font-size: 15px; }
.sb-nav { width: 40px; height: 40px; border-radius: 6px; border: 1px solid var(--sb-line); background: var(--sb-paper); color: var(--sb-ink); display: grid; place-items: center; cursor: pointer; }
.sb-nav:hover:not(:disabled) { border-color: var(--sb-accent); }
.sb-nav:disabled { opacity: .3; cursor: default; }
.sb-months { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 640px) { .sb-months { grid-template-columns: 1fr; } .sb-month-2 { display: none; } }
.sb-month-title { font-family: var(--sb-head); font-weight: 500; font-size: 20px; margin: 6px 0 10px; text-align: center; }
.sb-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.sb-dow { font-size: 12px; text-align: center; color: var(--sb-muted); padding: 4px 0; font-weight: 600; }
.sb-day {
	position: relative; aspect-ratio: 1 / 1.02; min-height: 42px; border: 0; border-radius: 6px; background: var(--sb-paper);
	font: inherit; color: var(--sb-ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0;
	transition: background-color .15s ease, color .15s ease;
}
.sb-num { font-size: 15px; font-weight: 600; line-height: 1; }
.sb-p { font-size: 10.5px; color: var(--sb-muted); line-height: 1; }
.sb-day:hover:not(:disabled) { background: var(--sb-accent-soft); }
.sb-day:focus-visible { outline: 2px solid var(--sb-accent); outline-offset: 1px; }
.sb-day:disabled { cursor: default; }
.sb-day.is-out { color: #b9c0bd; }
.sb-day.is-taken { background: var(--sb-taken); color: #9aa39f; }
.sb-day.is-taken .sb-num { text-decoration: line-through; text-decoration-thickness: 1px; }
.sb-day.is-can-out.is-taken { color: var(--sb-ink); }
.sb-day.is-in { background: var(--sb-accent-soft); border-radius: 0; }
.sb-day.is-start, .sb-day.is-end { background: var(--sb-accent); color: #fff; }
.sb-day.is-start .sb-p, .sb-day.is-end .sb-p { color: rgba(255,255,255,.8); }
.sb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sb-line); font-size: 13px; color: var(--sb-muted); }
.sb-k { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--sb-line); }
.sb-k-taken { background: var(--sb-taken); }
.sb-k-sel { background: var(--sb-accent); border-color: var(--sb-accent); }
.sb-link { background: none; border: 0; padding: 0; color: var(--sb-accent); text-decoration: underline; cursor: pointer; font: inherit; margin-left: auto; }

/* Side panel */
.sb-side { display: grid; gap: 16px; position: sticky; top: 96px; }
@media (max-width: 899px) { .sb-side { position: static; } }
.sb-summary, .sb-guests, .sb-form { background: var(--sb-paper); border: 1px solid var(--sb-line); border-radius: var(--sb-radius); padding: 20px; }
.sb-summary { scroll-margin-top: 90px; }
.sb-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.sb-dates > div { display: grid; gap: 2px; }
.sb-dates small { color: var(--sb-muted); font-size: 13px; }
.sb-dates strong { font-family: var(--sb-head); font-weight: 500; font-size: 19px; }
.sb-price { width: 100%; border-collapse: collapse; font-size: 15px; }
.sb-price td { padding: 7px 0; border-top: 1px solid var(--sb-line); }
.sb-price td:last-child { text-align: right; white-space: nowrap; }
.sb-price .sb-disc td { color: var(--sb-accent); }
.sb-price .sb-total td { font-weight: 700; font-size: 18px; border-top: 2px solid var(--sb-ink); padding-top: 10px; }
.sb-muted { color: var(--sb-muted); margin: 0; }
.sb-small { font-size: 13px; color: var(--sb-muted); margin: 12px 0 0; line-height: 1.5; }
.sb-error { color: #a2341f; font-size: 14px; margin: 8px 0 0; }
.sb-notice { background: #fbf6e7; border: 1px solid #ecdcae; border-radius: var(--sb-radius); padding: 14px 16px; margin: 0 0 20px; line-height: 1.5; }

.sb-guests { display: grid; gap: 12px; }
.sb-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sb-step-l { display: grid; }
.sb-step-l small { color: var(--sb-muted); font-size: 13px; }
.sb-step-c { display: flex; align-items: center; gap: 10px; }
.sb-step-c button { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--sb-line); background: var(--sb-paper); font-size: 20px; line-height: 1; color: var(--sb-ink); cursor: pointer; }
.sb-step-c button:hover:not(:disabled) { border-color: var(--sb-accent); }
.sb-step-c button:disabled { opacity: .35; cursor: default; }
.sb-step-c output { min-width: 18px; text-align: center; font-weight: 600; }

.sb-form { display: grid; gap: 14px; transition: opacity .2s ease; }
.sb-form.is-locked { opacity: .55; }
.sb-form h3 { font-family: var(--sb-head); font-weight: 500; font-size: 22px; margin: 0; }
.sb-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.sb-form label small { font-weight: 400; color: var(--sb-muted); }
.sb-opt { font-weight: 400; color: var(--sb-muted); }
.sb-form input:not([type=checkbox]), .sb-form textarea {
	width: 100%; font: inherit; font-size: 16px; font-weight: 400; padding: 11px 12px; border: 1px solid #c9d0cc; border-radius: 6px; background: #fff; color: var(--sb-ink);
}
.sb-form input:focus, .sb-form textarea:focus { outline: 2px solid var(--sb-accent); outline-offset: 0; border-color: var(--sb-accent); }
.sb-checks { display: grid; gap: 8px; }
.sb-check { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; line-height: 1.4; }
.sb-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--sb-accent); flex: none; }
.sb-check a { color: var(--sb-accent); }
.sb-code summary { cursor: pointer; font-size: 14px; color: var(--sb-accent); text-decoration: underline; }
.sb-code-row { display: flex; gap: 8px; margin-top: 8px; }
.sb-code-row input { text-transform: uppercase; }
.sb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.sb-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 22px;
	background: var(--sb-accent); color: #fff !important; border: 1px solid var(--sb-accent); border-radius: 6px;
	font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: background-color .15s ease, transform .1s ease;
}
.sb-btn:hover:not(:disabled) { background: #22312f; }
.sb-btn:active:not(:disabled) { transform: translateY(1px); }
.sb-btn:disabled { opacity: .5; cursor: default; }
.sb-btn.is-soft { background: transparent; color: var(--sb-accent) !important; }
.sb-btn-ghost { width: auto; min-height: 44px; background: transparent; color: var(--sb-accent) !important; }
.sb-secure { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 0; }

/* Confirmation */
.sb-confirm { max-width: 640px; background: var(--sb-paper, #fff); border: 1px solid var(--sb-line, #dfe3df); border-radius: 8px; padding: 32px; }
.sb-confirm h2 { font-family: var(--font-head, Georgia, serif); font-weight: 500; margin: 0 0 10px; }
.sb-dl { margin: 20px 0; display: grid; }
.sb-dl > div { display: grid; grid-template-columns: 140px 1fr; padding: 10px 0; border-top: 1px solid var(--line, #dfe3df); }
.sb-dl dt { color: var(--muted, #5a6766); }
.sb-dl dd { margin: 0; font-weight: 600; }
@media (max-width: 520px) { .sb-dl > div { grid-template-columns: 1fr; } .sb-confirm { padding: 22px; } }

@media (prefers-reduced-motion: reduce) { .sb-day, .sb-btn, .sb-form { transition: none; } }
