/**
 * WP Consult Booking — front-end styles (theme-agnostic, RTL-aware).
 */

.wcb-booking,
.wcb-mybookings,
.wcb-confirmation,
.wcb-review {
	--wcb-primary: #1e3a5f;
	--wcb-primary-light: #2c5282;
	--wcb-border: #e2e8f0;
	--wcb-muted: #718096;
	--wcb-text: #2d3748;
	--wcb-radius: 12px;
	--wcb-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	color: var(--wcb-text);
	max-width: 760px;
	margin-inline: auto;
	box-sizing: border-box;
}

.wcb-booking *,
.wcb-mybookings *,
.wcb-confirmation *,
.wcb-review * {
	box-sizing: border-box;
}

.wcb-note {
	background: #f7fafc;
	border: 1px solid var(--wcb-border);
	border-radius: var(--wcb-radius);
	padding: 16px;
	text-align: center;
	color: var(--wcb-muted);
}

/* Step indicator */
.wcb-steps {
	display: flex;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	counter-reset: wcb;
}

.wcb-steps li {
	flex: 1;
	text-align: center;
	position: relative;
	color: var(--wcb-muted);
	font-size: 13px;
	padding-block-start: 38px;
}

.wcb-steps li::before {
	counter-increment: wcb;
	content: attr(data-dot);
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 50%;
	transform: translateX(-50%);
	width: 28px;
	height: 28px;
	line-height: 28px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #fff;
	font-weight: 700;
}

[dir="rtl"] .wcb-steps li::before {
	transform: translateX(50%);
}

.wcb-steps li::after {
	content: "";
	position: absolute;
	inset-block-start: 14px;
	inset-inline-start: -50%;
	width: 100%;
	height: 2px;
	background: #e2e8f0;
	z-index: -1;
}

.wcb-steps li:first-child::after {
	display: none;
}

.wcb-steps li.is-active::before,
.wcb-steps li.is-done::before {
	background: var(--wcb-primary);
}

.wcb-steps li.is-active {
	color: var(--wcb-primary);
	font-weight: 700;
}

/* Steps */
.wcb-step {
	display: none;
	background: #fff;
	border: 1px solid var(--wcb-border);
	border-radius: var(--wcb-radius);
	box-shadow: var(--wcb-shadow);
	padding: 24px;
}

.wcb-step.is-active {
	display: block;
}

.wcb-step-title {
	margin-block: 0 18px;
	color: var(--wcb-primary);
	font-size: 18px;
}

/* Service cards */
.wcb-service-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

.wcb-service-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	border: 2px solid var(--wcb-border);
	border-radius: var(--wcb-radius);
	padding: 16px;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
	position: relative;
}

.wcb-service-card:hover {
	border-color: var(--wcb-primary-light);
}

.wcb-service-card.is-selected {
	border-color: var(--wcb-primary);
	box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.wcb-service-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wcb-sc-icon {
	font-size: 26px;
}

.wcb-sc-name {
	font-weight: 700;
	color: var(--wcb-primary);
	font-size: 16px;
}

.wcb-sc-type {
	display: inline-block;
	font-size: 12px;
	color: var(--wcb-muted);
}

.wcb-sc-meta {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	margin-block-start: 4px;
}

.wcb-sc-price {
	font-weight: 700;
	color: var(--wcb-primary);
}

.wcb-sc-desc {
	font-size: 12px;
	color: var(--wcb-muted);
}

/* Fields */
.wcb-field {
	margin-block-end: 16px;
}

.wcb-field label {
	display: block;
	font-weight: 600;
	margin-block-end: 6px;
}

.wcb-field input,
.wcb-field textarea,
.wcb-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--wcb-border);
	border-radius: 8px;
	font-size: 15px;
}

.wcb-field.is-invalid input,
.wcb-field.is-invalid textarea {
	border-color: #c53030;
}

.wcb-req {
	color: #c53030;
}

.wcb-tz-note {
	color: var(--wcb-muted);
	font-size: 13px;
	margin-block: 0 12px;
}

/* Slots */
.wcb-slots {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-block: 8px 4px;
}

.wcb-slot-btn {
	border: 1px solid var(--wcb-primary);
	background: #fff;
	color: var(--wcb-primary);
	padding: 8px 16px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.2s, color 0.2s;
}

.wcb-slot-btn:hover {
	background: rgba(30, 58, 95, 0.08);
}

.wcb-slot-btn.is-selected {
	background: var(--wcb-primary);
	color: #fff;
}

.wcb-slots-loading,
.wcb-slots-empty {
	color: var(--wcb-muted);
	font-size: 14px;
}

.wcb-waiting-box {
	margin-block-start: 16px;
	padding: 16px;
	background: #f7fafc;
	border: 1px dashed var(--wcb-border);
	border-radius: var(--wcb-radius);
	text-align: center;
}

/* Buttons */
.wcb-btn,
.wcb-btn-outline,
.wcb-btn-danger {
	display: inline-block;
	border-radius: 8px;
	padding: 11px 24px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background 0.2s, color 0.2s;
}

.wcb-btn {
	background: var(--wcb-primary);
	color: #fff;
	border-color: var(--wcb-primary);
}

.wcb-btn:hover {
	background: var(--wcb-primary-light);
	border-color: var(--wcb-primary-light);
}

.wcb-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.wcb-btn-outline {
	background: #fff;
	color: var(--wcb-primary);
	border-color: var(--wcb-primary);
}

.wcb-btn-danger {
	background: #c53030;
	color: #fff;
	border-color: #c53030;
}

.wcb-step-actions {
	display: flex;
	justify-content: space-between;
	margin-block-start: 22px;
	gap: 10px;
}

/* Summary */
.wcb-summary {
	background: #f7fafc;
	border-radius: var(--wcb-radius);
	padding: 16px;
}

.wcb-summary .wcb-detail-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-block-end: 1px solid var(--wcb-border);
}

.wcb-summary .wcb-detail-row:last-child {
	border-block-end: 0;
}

/* Badges */
.wcb-badge {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.wcb-badge-confirmed { background: #c6f6d5; color: #2f855a; }
.wcb-badge-pending { background: #fefcbf; color: #b7791f; }
.wcb-badge-temporary { background: #e2e8f0; color: #4a5568; }
.wcb-badge-cancelled { background: #fed7d7; color: #c53030; }
.wcb-badge-completed { background: #bee3f8; color: #2b6cb0; }

/* My bookings */
.wcb-mb-list {
	display: grid;
	gap: 14px;
}

.wcb-mb-card {
	background: #fff;
	border: 1px solid var(--wcb-border);
	border-radius: var(--wcb-radius);
	box-shadow: var(--wcb-shadow);
	padding: 18px;
}

.wcb-mb-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-block-end: 10px;
}

.wcb-mb-service {
	font-weight: 700;
	color: var(--wcb-primary);
	font-size: 16px;
}

.wcb-mb-meta {
	display: flex;
	gap: 18px;
	color: var(--wcb-muted);
	font-size: 14px;
}

.wcb-mb-actions {
	display: flex;
	gap: 10px;
	margin-block-start: 14px;
}

.wcb-mb-actions button {
	padding: 7px 16px;
	font-size: 14px;
}

.wcb-resched-panel {
	margin-block-start: 14px;
	padding-block-start: 14px;
	border-block-start: 1px solid var(--wcb-border);
}

.wcb-resched-panel label {
	display: block;
	font-weight: 600;
	margin-block-end: 6px;
}

.wcb-resched-date {
	padding: 8px 10px;
	border: 1px solid var(--wcb-border);
	border-radius: 8px;
}

/* Confirmation */
.wcb-confirm-card {
	background: #fff;
	border: 1px solid var(--wcb-border);
	border-radius: var(--wcb-radius);
	box-shadow: var(--wcb-shadow);
	padding: 30px;
	text-align: center;
	margin-block: 20px;
}

.wcb-confirm-check {
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #c6f6d5;
	color: #2f855a;
	font-size: 34px;
	line-height: 64px;
}

.wcb-confirm-title {
	color: var(--wcb-primary);
	margin-block: 0 8px;
}

.wcb-confirm-msg {
	color: var(--wcb-muted);
	margin-block-end: 18px;
}

.wcb-confirm-details {
	text-align: start;
	max-width: 420px;
	margin-inline: auto;
}

.wcb-detail-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 0;
	border-block-end: 1px solid var(--wcb-border);
}

.wcb-detail-label {
	color: var(--wcb-muted);
}

.wcb-detail-value {
	font-weight: 600;
}

/* Review stars */
.wcb-review-card {
	background: #fff;
	border: 1px solid var(--wcb-border);
	border-radius: var(--wcb-radius);
	box-shadow: var(--wcb-shadow);
	padding: 24px;
}

.wcb-review-title {
	color: var(--wcb-primary);
	margin-block: 0 16px;
}

.wcb-stars {
	display: flex;
	gap: 6px;
	margin-block-end: 18px;
	font-size: 32px;
}

.wcb-star {
	background: none;
	border: 0;
	cursor: pointer;
	color: #cbd5e0;
	padding: 0;
	line-height: 1;
	transition: color 0.15s;
}

.wcb-star.is-active {
	color: #f6c64b;
}

/* Toasts */
.wcb-toasts {
	position: fixed;
	inset-block-end: 20px;
	inset-inline-end: 20px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wcb-toast {
	background: var(--wcb-primary);
	color: #fff;
	padding: 12px 18px;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	font-size: 14px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.25s, transform 0.25s;
}

.wcb-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.wcb-toast.is-success { background: #2f855a; }
.wcb-toast.is-error { background: #c53030; }

@media (max-width: 600px) {
	.wcb-steps li {
		font-size: 11px;
	}
	.wcb-step {
		padding: 18px;
	}
}
