/* SJ Booking — front-end widget styles. Scoped under .sjbk-app. */

.sjbk-app {
	--sjbk-accent: #2563eb;
	--sjbk-bg: #ffffff;
	--sjbk-border: #e5e7eb;
	--sjbk-text: #111827;
	--sjbk-muted: #6b7280;
	--sjbk-radius: 12px;
	max-width: 640px;
	margin: 0 auto;
	color: var(--sjbk-text);
	font-family: inherit;
	line-height: 1.45;
}

.sjbk-title {
	font-size: 1.5rem;
	margin: 0 0 1rem;
	text-align: center;
}

.sjbk-mount {
	background: var(--sjbk-bg);
	border: 1px solid var(--sjbk-border);
	border-radius: var(--sjbk-radius);
	padding: 1.25rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.sjbk-loading,
.sjbk-empty,
.sjbk-error {
	text-align: center;
	color: var(--sjbk-muted);
	padding: 1.5rem 0;
}

.sjbk-error { color: #b91c1c; }

.sjbk-step-head {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin-bottom: 1rem;
}

.sjbk-step-label {
	font-weight: 600;
	font-size: 1.1rem;
}

.sjbk-back {
	background: none;
	border: none;
	color: var(--sjbk-accent);
	cursor: pointer;
	font-size: .95rem;
	padding: 0;
}

.sjbk-service-pill {
	display: inline-block;
	background: #f3f4f6;
	border-radius: 999px;
	padding: .35rem .9rem;
	font-size: .85rem;
	color: var(--sjbk-muted);
	margin-bottom: 1rem;
}

.sjbk-course-context {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 10px;
	padding: .75rem 1rem;
	margin-bottom: 1rem;
	font-size: .92rem;
	line-height: 1.45;
}

.sjbk-course-context__label {
	color: var(--sjbk-muted);
	font-weight: 600;
}

.sjbk-course-context__name {
	font-weight: 600;
	color: #1e3a8a;
}

.sjbk-course-context__link {
	color: inherit;
	text-decoration: none;
}

.sjbk-course-context__link:hover {
	text-decoration: underline;
}

.sjbk-context-banner {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 0.75rem 1rem;
	margin-bottom: 0.75rem;
	font-size: 0.95rem;
	line-height: 1.45;
}

.sjbk-context-banner--teacher {
	background: #f0fdf4;
	border-color: #bbf7d0;
}

.sjbk-context-banner--student {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.sjbk-context-banner__label {
	color: #64748b;
	font-weight: 600;
	margin-right: 0.25rem;
}

.sjbk-context-banner__meta {
	color: #64748b;
	font-size: 0.88rem;
}

/* Services */
.sjbk-services { display: grid; gap: .75rem; }

.sjbk-service-card {
	text-align: left;
	background: #fff;
	border: 1px solid var(--sjbk-border);
	border-left: 4px solid var(--sjbk-accent);
	border-radius: 10px;
	padding: .9rem 1rem;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: .25rem;
	transition: box-shadow .15s, transform .05s;
}

.sjbk-service-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .1); }
.sjbk-service-card:active { transform: translateY(1px); }
.sjbk-service-name { font-weight: 600; }
.sjbk-service-meta { font-size: .85rem; color: var(--sjbk-muted); }
.sjbk-service-desc { font-size: .85rem; color: var(--sjbk-muted); margin-top: .25rem; }

/* Dates */
.sjbk-dates {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
	gap: .5rem;
	max-height: 280px;
	overflow-y: auto;
	padding: .25rem;
}

.sjbk-date-btn {
	background: #fff;
	border: 1px solid var(--sjbk-border);
	border-radius: 10px;
	padding: .5rem 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	transition: border-color .15s, background .15s;
}

.sjbk-date-btn:hover { border-color: var(--sjbk-accent); }
.sjbk-date-dow { font-size: .7rem; text-transform: uppercase; color: var(--sjbk-muted); }
.sjbk-date-day { font-size: 1.2rem; font-weight: 700; }
.sjbk-date-mon { font-size: .7rem; color: var(--sjbk-muted); }

/* Slots */
.sjbk-slots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	gap: .5rem;
}

.sjbk-slot-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	line-height: 1.25;
	background: #fff;
	border: 1px solid var(--sjbk-border);
	border-radius: 8px;
	padding: .6rem 0;
	cursor: pointer;
	font-size: .9rem;
	transition: border-color .15s, background .15s, color .15s;
}

.sjbk-slot-time--primary {
	font-weight: 600;
}

.sjbk-slot-time--secondary {
	font-size: 0.82em;
	opacity: 0.8;
}

.sjbk-timezone-note {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	line-height: 1.45;
}

.sjbk-timezone-note__heading {
	font-weight: 600;
	margin-bottom: 0.2rem;
}

.sjbk-timezone-note__row {
	margin: 0;
}

.sjbk-slot-btn:hover {
	border-color: var(--sjbk-accent);
	background: var(--sjbk-accent);
	color: #fff;
}

/* Form */
.sjbk-form { display: grid; gap: .85rem; }

.sjbk-field { display: grid; gap: .3rem; font-size: .9rem; }
.sjbk-field span { font-weight: 500; }

.sjbk-field input,
.sjbk-field textarea {
	width: 100%;
	border: 1px solid var(--sjbk-border);
	border-radius: 8px;
	padding: .6rem .7rem;
	font-size: .95rem;
	font-family: inherit;
	box-sizing: border-box;
}

.sjbk-field input:focus,
.sjbk-field textarea:focus {
	outline: none;
	border-color: var(--sjbk-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.sjbk-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.sjbk-form-error { color: #b91c1c; font-size: .9rem; min-height: 1em; }

.sjbk-submit {
	background: var(--sjbk-accent);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: .8rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s;
}

.sjbk-submit:hover { opacity: .92; }
.sjbk-submit:disabled { opacity: .6; cursor: default; }
.sjbk-submit.is-loading { opacity: .6; }

/* Done */
.sjbk-done { text-align: center; padding: 1.5rem 0; }

.sjbk-done-sub,
.sjbk-done-prompt {
	color: var(--sjbk-muted);
	font-size: .9rem;
	margin-top: .75rem;
}

.sjbk-done-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	justify-content: center;
	margin-top: 1rem;
}

.sjbk-done-actions .sjbk-submit,
.sjbk-done-actions .sjbk-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 11rem;
	padding: .65rem 1rem;
	border-radius: 6px;
	text-decoration: none;
	font-size: .95rem;
	cursor: pointer;
}

.sjbk-done-actions .sjbk-btn-secondary {
	border: 1px solid var(--sjbk-border, #d0d7de);
	background: #fff;
	color: inherit;
}

.sjbk-done-check {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #16a34a;
	color: #fff;
	font-size: 1.8rem;
	line-height: 56px;
	margin: 0 auto 1rem;
}

.sjbk-done-msg { font-size: 1.05rem; margin-bottom: .5rem; }
.sjbk-done-detail { color: var(--sjbk-muted); font-size: .9rem; }

.sjbk-muted {
	color: var(--sjbk-muted);
	font-size: .9rem;
	margin: 0 0 .75rem;
}

.sjbk-notice {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	color: #1e40af;
	font-size: .9rem;
	margin: 0 0 1rem;
	padding: .65rem .85rem;
}

.sjbk-step-error,
.sjbk-form-error {
	color: #b91c1c;
	font-size: .9rem;
	margin: .5rem 0;
}

.sjbk-booking-as {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	margin-bottom: 1rem;
	padding: .65rem .85rem;
}

.sjbk-booking-as-label {
	color: var(--sjbk-muted);
}

.sjbk-saved-contact {
	color: var(--sjbk-muted);
	font-size: .9rem;
	margin: 0 0 1rem;
}

.sjbk-link-btn {
	background: none;
	border: none;
	color: var(--sjbk-accent);
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
}

/* Range scheduling */
.sjbk-range-fields {
	display: grid;
	gap: .85rem;
	margin-bottom: 1rem;
}

.sjbk-range-policy {
	margin: 0 0 1rem;
}

.sjbk-range-policy--static + .sjbk-mount .sjbk-range-policy {
	display: none;
}

.sjbk-notice--lead {
	font-weight: 600;
}

.sjbk-app--range .sjbk-submit.sjbk-next-start,
.sjbk-app--range .sjbk-submit.sjbk-next-end {
	width: 100%;
	margin-top: .5rem;
}

/* Custom form fields */
.sjbk-field-help {
	margin: .35rem 0 0;
	font-size: .82rem;
	color: var(--sjbk-muted);
}

.sjbk-field-radio legend,
.sjbk-field-checkboxes legend,
.sjbk-field-address legend {
	font-weight: 600;
	font-size: .88rem;
	margin-bottom: .4rem;
	padding: 0;
}

.sjbk-radio-opt,
.sjbk-check-opt {
	display: block;
	margin: .35rem 0;
	font-size: .92rem;
}

.sjbk-check-opt input,
.sjbk-radio-opt input {
	width: auto;
	margin-right: .35rem;
}

.sjbk-field-check {
	flex-direction: row;
	align-items: center;
	gap: .5rem;
}

.sjbk-field-check input { width: auto; }

.sjbk-address-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: .65rem;
}

@media (max-width: 520px) {
	.sjbk-address-row { grid-template-columns: 1fr; }
}

.sjbk-done-setup {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--sjbk-border);
	text-align: left;
}

.sjbk-done-setup__title {
	margin: 0 0 .75rem;
	font-size: 1.05rem;
}

.sjbk-setup-password__intro {
	margin: 0 0 1rem;
	color: var(--sjbk-muted);
}

.sjbk-setup-password__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .65rem;
	margin-top: .75rem;
}

.sjbk-setup-password__success {
	text-align: center;
	padding: .5rem 0;
}

.sjbk-setup-password__head h3 {
	margin: 0 0 .75rem;
	font-size: 1.1rem;
}
