/**
 * Hoja Booking Pro — Public / Frontend Styles
 *
 * @package HojaBookingPro
 * @since   1.0.0
 */

/* ── Imports ────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset ──────────────────────────────────────────────────────────────── */

.hoja-bp-wrap *,
.hoja-bp-wrap *::before,
.hoja-bp-wrap *::after {
	box-sizing: border-box;
}

/* ── Container ───────────────────────────────────────────────────────────── */

.hoja-bp-wrap {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 15px;
	color: #1e293b;
	max-width: 800px;
	margin: 0 auto;
	padding: 0;
}

/* ── Step Indicator ──────────────────────────────────────────────────────── */

.hoja-bp-steps {
	display: flex;
	align-items: center;
	margin-bottom: 32px;
}

.hoja-bp-step {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.hoja-bp-step__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #94a3b8;
	font-weight: 700;
	font-size: 14px;
	border: 2px solid #e2e8f0;
	transition: all 0.25s;
}

.hoja-bp-step__label {
	font-size: 13px;
	font-weight: 600;
	color: #94a3b8;
	transition: color 0.25s;
}

.hoja-bp-step.active .hoja-bp-step__num {
	background: #1e293b;
	color: #fff;
	border-color: #1e293b;
}

.hoja-bp-step.active .hoja-bp-step__label {
	color: #1e293b;
}

.hoja-bp-step.completed .hoja-bp-step__num {
	background: #10b981;
	color: #fff;
	border-color: #10b981;
}

.hoja-bp-step.completed .hoja-bp-step__label {
	color: #10b981;
}

.hoja-bp-step-divider {
	flex: 1;
	height: 2px;
	background: #e2e8f0;
	margin: 0 8px;
}

@media (max-width: 520px) {
	.hoja-bp-step__label { display: none; }
	.hoja-bp-step__num { width: 30px; height: 30px; font-size: 12px; }
}

/* ── Alert ───────────────────────────────────────────────────────────────── */

.hoja-bp-alert {
	padding: 14px 18px;
	border-radius: 10px;
	margin-bottom: 20px;
	font-size: 14px;
	font-weight: 500;
}

.hoja-bp-alert--success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.hoja-bp-alert--error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.hoja-bp-alert--warning {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fde68a;
}

/* ── Panels ──────────────────────────────────────────────────────────────── */

.hoja-bp-panel {
	animation: hoja-fadeIn 0.2s ease;
}

.hoja-bp-panel--hidden {
	display: none;
}

@keyframes hoja-fadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.hoja-bp-panel__title {
	font-size: 20px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 20px;
}

.hoja-bp-panel__nav {
	display: flex;
	gap: 12px;
	margin-top: 24px;
}

/* ── Card Grid (services / resources) ───────────────────────────────────── */

.hoja-bp-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
	margin-bottom: 8px;
}

.hoja-bp-card {
	background: #fff;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	padding: 18px;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
	text-align: center;
}

.hoja-bp-card:hover {
	border-color: #94a3b8;
	box-shadow: 0 4px 16px rgba(0,0,0,0.07);
	transform: translateY(-2px);
}

.hoja-bp-card.selected {
	border-color: #1e293b;
	background: #f8fafc;
	box-shadow: 0 0 0 3px rgba(30,41,59,0.12);
}

.hoja-bp-card__name {
	font-weight: 700;
	font-size: 15px;
	color: #1e293b;
	margin-bottom: 4px;
}

.hoja-bp-card__meta {
	font-size: 13px;
	color: #64748b;
}

/* ── Date Picker ─────────────────────────────────────────────────────────── */

.hoja-bp-date-row {
	margin-bottom: 24px;
}

/* Override Flatpickr to match plugin theme */
.flatpickr-calendar {
	border-radius: 12px !important;
	box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important;
	font-family: 'Inter', sans-serif !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
	background: #1e293b !important;
	border-color: #1e293b !important;
}

/* ── Slots Grid ──────────────────────────────────────────────────────────── */

.hoja-bp-slots-wrap {
	margin-bottom: 20px;
}

.hoja-bp-slots-legend {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 12px;
	font-size: 13px;
	color: #64748b;
}

.hoja-bp-legend-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.hoja-bp-legend-dot--available  { background: #10b981; }
.hoja-bp-legend-dot--tbc        { background: #f59e0b; }
.hoja-bp-legend-dot--confirmed  { background: #ef4444; }

.hoja-bp-slots-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.hoja-bp-slot {
	padding: 10px 14px;
	border-radius: 10px;
	border: 2px solid #e2e8f0;
	background: #fff;
	text-align: center;
	cursor: pointer;
	transition: all 0.15s;
	font-size: 14px;
	font-weight: 600;
	min-width: 120px;
	position: relative;
}

.hoja-bp-slot--disabled {
	cursor: not-allowed;
}

.hoja-bp-slot:hover:not(.hoja-bp-slot--unavailable):not(.hoja-bp-slot--confirmed):not(.hoja-bp-slot--disabled) {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.hoja-bp-slot__time {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
}

/* Hide status label in new compact view — status shown via border color */
.hoja-bp-slot__status {
	display: none;
}

/* Available */
.hoja-bp-slot--available {
	border-color: #10b981;
}

.hoja-bp-slot--available .hoja-bp-slot__time {
	color: #065f46;
}

/* ── Multi-slot Range Selection ──────────────────────────────────────────── */

/* Hover preview (before click) */
.hoja-bp-slot--hover-range {
	background: #f0fdf4;
	border-color: #6ee7b7;
	outline: none;
}

/* Clicked range — start / mid / end share a teal fill */
.hoja-bp-slot--range-start,
.hoja-bp-slot--range-mid,
.hoja-bp-slot--range-end {
	background: #10b981;
	border-color: #10b981;
	color: #fff;
}

.hoja-bp-slot--range-start .hoja-bp-slot__time,
.hoja-bp-slot--range-mid .hoja-bp-slot__time,
.hoja-bp-slot--range-end .hoja-bp-slot__time {
	color: #fff;
}

/* Start: rounded on left, square on right */
.hoja-bp-slot--range-start:not(.hoja-bp-slot--range-end) {
	border-top-right-radius: 4px;
	border-bottom-right-radius: 4px;
	border-right-width: 1px;
}

/* Mid: square on both sides */
.hoja-bp-slot--range-mid {
	border-radius: 4px;
	border-left-width: 1px;
	border-right-width: 1px;
}

/* End: square on left, rounded on right */
.hoja-bp-slot--range-end:not(.hoja-bp-slot--range-start) {
	border-top-left-radius: 4px;
	border-bottom-left-radius: 4px;
	border-left-width: 1px;
}

/* Invalid range (not enough consecutive free slots) */
.hoja-bp-slot--range-invalid {
	background: #fee2e2;
	border-color: #fca5a5;
}

.hoja-bp-slot--range-invalid .hoja-bp-slot__time {
	color: #991b1b;
}

/* TBC */
.hoja-bp-slot--tbc {
	border-color: #f59e0b;
	background: #fffbeb;
}

.hoja-bp-slot--tbc .hoja-bp-slot__time {
	color: #78350f;
}

.hoja-bp-slot--tbc.hoja-bp-slot--range-start,
.hoja-bp-slot--tbc.hoja-bp-slot--range-mid,
.hoja-bp-slot--tbc.hoja-bp-slot--range-end {
	background: #f59e0b;
	border-color: #f59e0b;
}

/* Confirmed / Unavailable */
.hoja-bp-slot--confirmed,
.hoja-bp-slot--unavailable {
	border-color: #e2e8f0;
	background: #f8fafc;
	cursor: not-allowed;
	opacity: 0.55;
}

.hoja-bp-slot--confirmed .hoja-bp-slot__time,
.hoja-bp-slot--unavailable .hoja-bp-slot__time {
	color: #94a3b8;
}

/* ── TBC Warning ─────────────────────────────────────────────────────────── */

.hoja-bp-tbc-warning {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 16px;
	background: #fef3c7;
	border: 1px solid #fde68a;
	border-radius: 10px;
	margin-bottom: 16px;
	font-size: 14px;
	color: #92400e;
}

/* Prevent display:flex from overriding the native [hidden] attribute */
.hoja-bp-tbc-warning[hidden] {
	display: none !important;
}

.hoja-bp-tbc-icon {
	font-size: 18px;
	flex-shrink: 0;
}

/* ── Booking Summary ─────────────────────────────────────────────────────── */

.hoja-bp-summary {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 16px 20px;
	margin-bottom: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.hoja-bp-summary__item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #1e293b;
}

.hoja-bp-summary__icon {
	font-size: 18px;
}

/* ── Form ────────────────────────────────────────────────────────────────── */

.hoja-bp-form-row {
	margin-bottom: 16px;
}

.hoja-bp-form-row--check {
	margin-bottom: 12px;
}

.hoja-bp-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.hoja-bp-required {
	color: #ef4444;
}

.hoja-bp-input,
.hoja-bp-textarea {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	font-size: 15px;
	color: #1e293b;
	background: #fff;
	font-family: 'Inter', sans-serif;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.hoja-bp-input:focus,
.hoja-bp-textarea:focus {
	border-color: #1e293b;
	box-shadow: 0 0 0 3px rgba(30,41,59,0.1);
	outline: none;
}

.hoja-bp-input--sm {
	width: auto;
}

.hoja-bp-textarea {
	resize: vertical;
}

.hoja-bp-check-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	color: #374151;
	line-height: 1.5;
}

.hoja-bp-check-label input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.hoja-bp-field-error {
	display: block;
	color: #dc2626;
	font-size: 12px;
	margin-top: 5px;
	min-height: 18px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.hoja-bp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 24px;
	border-radius: 10px;
	border: 2px solid #e2e8f0;
	background: #fff;
	color: #1e293b;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s;
	font-family: 'Inter', sans-serif;
	line-height: 1;
}

.hoja-bp-btn:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
}

.hoja-bp-btn--primary {
	background: #1e293b;
	color: #fff;
	border-color: #1e293b;
}

.hoja-bp-btn--primary:hover {
	background: #334155;
	border-color: #334155;
	color: #fff;
}

.hoja-bp-btn--primary:disabled {
	background: #94a3b8;
	border-color: #94a3b8;
	cursor: not-allowed;
}

.hoja-bp-btn--ghost {
	background: transparent;
	border-color: #e2e8f0;
	color: #64748b;
}

.hoja-bp-btn--ghost:hover {
	background: #f1f5f9;
	color: #1e293b;
}

/* ── Success Panel ───────────────────────────────────────────────────────── */

.hoja-bp-panel--success {
	text-align: center;
	padding: 48px 24px;
}

.hoja-bp-success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: #dcfce7;
	color: #16a34a;
	font-size: 36px;
	margin: 0 auto 24px;
	animation: hoja-popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes hoja-popIn {
	from { transform: scale(0.5); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}

.hoja-bp-success-title {
	font-size: 24px;
	font-weight: 800;
	color: #1e293b;
	margin-bottom: 12px;
}

.hoja-bp-success-msg {
	font-size: 15px;
	color: #64748b;
	max-width: 480px;
	margin: 0 auto 28px;
	line-height: 1.6;
}

/* ── Loader ──────────────────────────────────────────────────────────────── */

.hoja-bp-loader {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 0;
	color: #94a3b8;
	font-size: 14px;
}

.hoja-bp-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #e2e8f0;
	border-top-color: #1e293b;
	border-radius: 50%;
	animation: hoja-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes hoja-spin {
	to { transform: rotate(360deg); }
}

/* ── Timeline Track & Slider ────────────────────────────────────────────── */
.hoja-bp-timeline-container {
	margin-top: 25px;
	margin-bottom: 25px;
	padding: 10px 0;
	user-select: none;
}

.hoja-bp-timeline-track-wrap {
	position: relative;
	width: 100%;
	height: 48px;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.hoja-bp-timeline-track {
	position: relative;
	width: 100%;
	height: 100%;
}

.hoja-bp-timeline-blocked-segments {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hoja-bp-timeline-segment--blocked {
	position: absolute;
	top: 0;
	height: 100%;
	background: repeating-linear-gradient(
		45deg,
		#fee2e2,
		#fee2e2 10px,
		#fecaca 10px,
		#fecaca 20px
	);
	border-left: 1px solid #fca5a5;
	border-right: 1px solid #fca5a5;
	opacity: 0.85;
}

.hoja-bp-timeline-slider {
	position: absolute;
	top: 4px;
	height: 40px;
	background: #3b82f6;
	border-radius: 8px;
	cursor: grab;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(59, 130, 246, 0.06);
	transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.2s ease, box-shadow 0.2s ease;
	z-index: 10;
}

.hoja-bp-timeline-slider--dragging {
	transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
}


.hoja-bp-timeline-slider:active {
	cursor: grabbing;
	box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4), 0 4px 6px -2px rgba(59, 130, 246, 0.1);
}

.hoja-bp-timeline-slider--valid {
	background: #10b981;
	box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}
.hoja-bp-timeline-slider--valid:active {
	box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

.hoja-bp-timeline-slider--invalid {
	background: #ef4444;
	box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}
.hoja-bp-timeline-slider--invalid:active {
	box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4);
}

.hoja-bp-timeline-slider-label {
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	pointer-events: none;
	text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.hoja-bp-timeline-slider::before,
.hoja-bp-timeline-slider::after {
	content: '';
	position: absolute;
	top: 12px;
	width: 2px;
	height: 16px;
	background: rgba(255,255,255,0.5);
	border-radius: 1px;
}
.hoja-bp-timeline-slider::before { left: 8px; }
.hoja-bp-timeline-slider::after { right: 8px; }

.hoja-bp-timeline-ticks {
	position: relative;
	width: 100%;
	height: 25px;
	margin-top: 8px;
	margin-left: 15pt;	
}

.hoja-bp-timeline-tick {
	position: absolute;
	top: 0;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.hoja-bp-timeline-tick-line {
	width: 1px;
	height: 6px;
	background: #cbd5e1;
}

.hoja-bp-timeline-tick-label {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	margin-top: 4px;
}

/* ── Slot Shifter ───────────────────────────────────────────────────────── */

.hoja-bp-slots-shifter {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	margin-top: 20px;
	padding: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hoja-bp-shifter-btn {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #334155;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 4px;
	user-select: none;
}

.hoja-bp-shifter-btn:hover:not(:disabled) {
	background: #f1f5f9;
	border-color: #94a3b8;
	color: #0f172a;
}

.hoja-bp-shifter-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	background: #f1f5f9;
	border-color: #cbd5e1;
}

.hoja-bp-shifter-label {
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
	font-family: inherit;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 520px) {
	.hoja-bp-slots-grid {
		gap: 4px;
	}

	.hoja-bp-slot {
		min-width: 68px;
		padding: 8px 10px;
		font-size: 13px;
	}

	.hoja-bp-summary {
		flex-direction: column;
		gap: 10px;
	}

	.hoja-bp-panel__nav {
		flex-direction: column;
	}

	.hoja-bp-btn {
		width: 100%;
	}
}
