/* ==========================================================================
   WP Booking Appointment - Modern Frontend Styles (Mockup Matched)
   ========================================================================== */

:root {
	--wbb-primary: #00a859;
	--wbb-accent: #e60012;
	--wbb-border: #e2e8f0;
	--wbb-bg: #ffffff;
	--wbb-text: #0f172a;
	--wbb-muted: #64748b;
	--wbb-subtle: #f8fafc;
}

.wbb-wrap {
	--wbb-primary: #00a859;
	--wbb-accent: #e60012;
	max-width: 820px;
	margin: 0 auto;
	color: #0f172a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

.wbb-wrap * {
	box-sizing: border-box;
}

.wbb-form {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 28px 24px;
	box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}

.wbb-form-title {
	margin: 0 0 20px;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
}

.wbb-alert {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 20px;
	font-size: 13.5px;
	line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Step Header Component (Red Circle Badge + Two-Line Title)
   -------------------------------------------------------------------------- */
.wbb-step {
	margin-bottom: 20px;
}

.wbb-step-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.wbb-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	min-width: 28px;
	border-radius: 50%;
	background: var(--wbb-accent, #e60012);
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.wbb-step-title-wrap {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.wbb-step-title {
	margin: 0;
	font-size: 15.5px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.25;
}

.wbb-step-desc {
	margin: 0;
	font-size: 12px;
	color: #64748b;
	line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Step 1: Workshop Branches (3-Column Cards)
   -------------------------------------------------------------------------- */
.wbb-step-branch {
	margin-bottom: 24px;
}

.wbb-branches {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

@media (max-width: 768px) {
	.wbb-branches {
		grid-template-columns: 1fr;
	}
}

.wbb-branch {
	position: relative;
	display: block;
	cursor: pointer;
}

.wbb-branch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wbb-branch-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px;
	background: #ffffff;
	height: 100%;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.wbb-branch:hover .wbb-branch-card {
	border-color: #cbd5e1;
}

.wbb-branch input:checked + .wbb-branch-card {
	border-color: var(--wbb-accent, #e60012);
	box-shadow: 0 0 0 1px var(--wbb-accent, #e60012);
}

.wbb-branch-check {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid #94a3b8;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.wbb-branch input:checked + .wbb-branch-card .wbb-branch-check {
	background: var(--wbb-accent, #e60012);
	border-color: var(--wbb-accent, #e60012);
}

.wbb-check-svg {
	width: 13px;
	height: 13px;
	stroke: #ffffff;
	display: none;
}

.wbb-branch input:checked + .wbb-branch-card .wbb-check-svg {
	display: block;
}

.wbb-branch-img {
	display: block;
	width: 100%;
	height: 110px;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: #f1f5f9;
}

.wbb-branch-img-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
}

.wbb-branch-img-placeholder svg {
	width: 44px;
	height: 44px;
	opacity: 0.6;
}

.wbb-branch-body {
	padding: 10px 2px 2px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.wbb-branch-name {
	font-weight: 700;
	font-size: 14px;
	color: #0f172a;
	line-height: 1.3;
}

.wbb-branch-sub {
	font-size: 11.5px;
	font-style: italic;
	color: #64748b;
	line-height: 1.35;
}

.wbb-branch-addr {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	font-size: 11.5px;
	color: #475569;
	margin-top: 6px;
	line-height: 1.35;
}

.wbb-pin-icon {
	width: 14px;
	height: 14px;
	min-width: 14px;
	color: var(--wbb-accent, #e60012);
	margin-top: 1px;
}

/* --------------------------------------------------------------------------
   Two-Column Layout: Left (Calendar) vs Right (Time + Details)
   -------------------------------------------------------------------------- */
.wbb-main-grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 22px;
	align-items: start;
	margin-bottom: 22px;
}

@media (max-width: 768px) {
	.wbb-main-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

.wbb-col-left,
.wbb-col-right {
	display: flex;
	flex-direction: column;
}

.wbb-col-right {
	gap: 18px;
}

/* --------------------------------------------------------------------------
   Step 2: Calendar Widget
   -------------------------------------------------------------------------- */
.wbb-cal {
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	padding: 14px;
	background: #ffffff;
}

.wbb-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.wbb-cal-title {
	font-weight: 700;
	font-size: 15px;
	color: #0f172a;
	text-align: center;
	flex: 1;
}

.wbb-cal-nav {
	border: 1px solid #e2e8f0;
	background: #ffffff;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #475569;
	transition: all 0.15s;
}

.wbb-cal-nav:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #0f172a;
}

.wbb-cal-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 6px;
}

.wbb-cal-weekdays span {
	text-align: center;
	font-size: 11.5px;
	font-weight: 600;
	color: #64748b;
	padding: 4px 0;
}

.wbb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.wbb-cal-loading {
	grid-column: 1 / -1;
	text-align: center;
	padding: 30px;
	color: #64748b;
	font-size: 13px;
}

.wbb-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	border: 1px solid transparent;
	background: #ffffff;
	border-radius: 8px;
	cursor: pointer;
	padding: 4px 2px;
	font-family: inherit;
	transition: all 0.15s;
	user-select: none;
}

.wbb-day-empty {
	border: 0;
	background: transparent;
	cursor: default;
	min-height: 0;
	pointer-events: none;
}

.wbb-day-n {
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.2;
	color: #0f172a;
}

.wbb-day-meta {
	font-size: 9px;
	line-height: 1.1;
	font-weight: 600;
	text-align: center;
	margin-top: 2px;
}

.wbb-day.state-open {
	border-color: #f1f5f9;
}

.wbb-day.state-open .wbb-day-meta {
	color: #16a34a;
}

.wbb-day.state-open:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
}

.wbb-day.state-full {
	background: #f8fafc;
	border-color: #f1f5f9;
	color: #94a3b8;
	cursor: not-allowed;
}

.wbb-day.state-full .wbb-day-n {
	color: #64748b;
}

.wbb-day.state-full .wbb-day-meta {
	color: #94a3b8;
}

.wbb-day.state-closed,
.wbb-day.state-past {
	background: transparent;
	color: #cbd5e1;
	cursor: not-allowed;
}

.wbb-day.state-closed .wbb-day-n,
.wbb-day.state-past .wbb-day-n {
	color: #cbd5e1;
}

.wbb-day.is-today {
	outline: 1.5px dashed #94a3b8;
	outline-offset: -2px;
}

/* Selected Day in Calendar (Solid Red with Crisp White Text) */
.wbb-day.is-selected {
	background: var(--wbb-accent, #e60012) !important;
	border-color: var(--wbb-accent, #e60012) !important;
	color: #ffffff !important;
}

.wbb-day.is-selected .wbb-day-n {
	color: #ffffff !important;
}

.wbb-day.is-selected .wbb-day-meta {
	color: #ffffff !important;
}

.wbb-day:disabled {
	pointer-events: none;
}

.wbb-cal-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: 14px;
	padding-top: 10px;
	border-top: 1px solid #f1f5f9;
	font-size: 11px;
	color: #475569;
}

.wbb-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 4px;
}

.wbb-dot-open {
	background: #16a34a;
}

.wbb-dot-full {
	background: var(--wbb-accent, #e60012);
}

.wbb-dot-today {
	background: #94a3b8;
}

.wbb-cal-notice {
	font-size: 11px;
	color: #64748b;
	margin: 8px 0 0;
	line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Step 3: Select Time (3-Column Slot Buttons)
   -------------------------------------------------------------------------- */
.wbb-time-subtitle {
	color: #64748b;
}

.wbb-time-subtitle strong {
	color: #0f172a;
}

.wbb-slots {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	align-content: start;
}

@media (max-width: 480px) {
	.wbb-slots {
		grid-template-columns: repeat(2, 1fr);
	}
}

.wbb-slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 10px 4px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	background: #ffffff;
	cursor: pointer;
	text-align: center;
	font-family: inherit;
	transition: all 0.15s;
	width: 100%;
}

.wbb-slot:hover {
	border-color: #cbd5e1;
}

.wbb-slot-label {
	font-weight: 700;
	font-size: 13px;
	color: #0f172a;
	line-height: 1.2;
}

.wbb-slot-meta {
	font-size: 11px;
	font-weight: 600;
	color: #16a34a;
	margin-top: 3px;
	line-height: 1;
}

/* Selected Slot (White bg + Bright Red Border) */
.wbb-slot.is-selected {
	border-color: var(--wbb-accent, #e60012) !important;
	box-shadow: 0 0 0 1px var(--wbb-accent, #e60012);
	background: #ffffff;
}

/* Full Slot (Disabled, light gray bg, soft red text) */
.wbb-slot.is-full {
	background: #f8fafc;
	border-color: #f1f5f9;
	cursor: not-allowed;
}

.wbb-slot.is-full .wbb-slot-label {
	color: #94a3b8;
}

.wbb-slot.is-full .wbb-slot-meta {
	color: #ef4444;
}

/* --------------------------------------------------------------------------
   Step 4: Customer Details Form
   -------------------------------------------------------------------------- */
.wbb-fields {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wbb-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wbb-field label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
}

.wbb-field-icon {
	width: 15px;
	height: 15px;
	color: #64748b;
	flex-shrink: 0;
}

.wbb-field em {
	color: var(--wbb-accent, #e60012);
	font-style: normal;
}

.wbb-field input,
.wbb-field textarea {
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 13.5px;
	font-family: inherit;
	color: #0f172a;
	width: 100%;
	background: #ffffff;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.wbb-field input::placeholder,
.wbb-field textarea::placeholder {
	color: #94a3b8;
	font-size: 13px;
}

.wbb-field input:focus,
.wbb-field textarea:focus {
	border-color: var(--wbb-accent, #e60012);
	outline: none;
	box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.08);
}

.wbb-field textarea {
	resize: vertical;
	min-height: 52px;
}

.wbb-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Bottom Full-Width Actions (WhatsApp Button + Lock Note)
   -------------------------------------------------------------------------- */
.wbb-footer {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.wbb-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	background: var(--wbb-primary, #00a859);
	color: #ffffff;
	border: 0;
	border-radius: 12px;
	padding: 15px 24px;
	font-size: 16px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 168, 89, 0.22);
	transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.wbb-submit:hover {
	filter: brightness(0.93);
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 168, 89, 0.28);
}

.wbb-submit:active {
	transform: translateY(0);
}

.wbb-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.wbb-wa-icon {
	width: 24px;
	height: 24px;
	fill: #ffffff;
	flex-shrink: 0;
}

.wbb-arrow-icon {
	width: 20px;
	height: 20px;
	stroke: #ffffff;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.wbb-submit:hover .wbb-arrow-icon {
	transform: translateX(4px);
}

.wbb-disclaimer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
	font-size: 12px;
	color: #64748b;
	margin: 0;
}

.wbb-lock-icon {
	width: 13px;
	height: 13px;
	fill: #64748b;
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Booking Complete State
   -------------------------------------------------------------------------- */
.wbb-done {
	text-align: center;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 40px 24px;
	box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}

.wbb-done-icon {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--wbb-primary, #00a859);
	color: #ffffff;
	font-size: 28px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.wbb-done-msg {
	font-size: 15px;
	color: #0f172a;
	margin: 0 0 18px;
	line-height: 1.5;
}

.wbb-done-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--wbb-primary, #00a859);
	color: #ffffff;
	text-decoration: none;
	padding: 12px 24px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 14.5px;
	transition: filter 0.15s;
}

.wbb-done-link:hover {
	filter: brightness(0.92);
}
