html, body {
	overflow-x: hidden;
	height: 100%;
	margin: 0;
	padding: 0;
}

#root {
	overflow-x: hidden;
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
}

.loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.loading-overlay.active {
	opacity: 1;
	visibility: visible;
}

.custom-spinner {
	width: 60px;
	height: 60px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2563EB;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 20px;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.loading-text {
	font-weight: 600;
	color: #1e293b;
	font-size: 1.1rem;
}

/* Modern Selection Cards */
.items_tab {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}

.itemListElement {
	position: relative;
	background: white;
	border: 1px solid var(--ag-border);
	border-radius: 1rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding: 0 !important;
	margin-top: 5px;
}

.itemListElement:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.1);
	border-color: var(--ag-blue);
}

.itemListElement.active {
	border-color: var(--ag-blue);
	background: rgba(37, 99, 235, 0.03);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.item_details {
	padding: 1.5rem;
	padding-bottom: 4.5rem;
	display: flex !important;
	flex-direction: column;
	height: 100%;
}

/* Employee card: no bottom button — center layout */
.employee-card .item_details {
	padding-bottom: 1.5rem;
	align-items: center;
	text-align: center;
	cursor: pointer;
}

.employee-avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--ag-border);
	margin-bottom: 0.75rem;
	transition: border-color 0.3s ease;
}

.employee-avatar-placeholder {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: #f1f5f9;
	border: 2px solid var(--ag-border);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.75rem;
	transition: border-color 0.3s ease;
}

.employee-card.active .employee-avatar,
.employee-card.active .employee-avatar-placeholder {
	border-color: var(--ag-blue);
}

.item_name {
	font-weight: 700;
	color: var(--ag-text-dark);
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}

.item_meta {
	color: var(--ag-text-muted);
	font-size: 0.875rem;
	display: flex;
	gap: 1rem;
}

.item_select_part {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 1rem 1.5rem;
	background: #f8fafc;
	border-top: 1px solid var(--ag-border);
	display: flex !important;
	align-items: center;
	justify-content: space-between;
}

.service_price_field {
	font-weight: 800;
	color: var(--ag-blue);
	font-size: 1.1rem;
}

.btn-check:checked+.btn-outline-primary {
	background-color: var(--ag-blue) !important;
	border-color: var(--ag-blue) !important;
	color: white !important;
}

.text_header {
	border-bottom: 2px solid #f1f5f9;
	padding-bottom: 1rem;
	margin-bottom: 2rem;
}

.text_header span {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--ag-text-dark);
	letter-spacing: -0.02em;
}

/* Step Indicators */
.step {
	height: 8px;
	width: 40px;
	margin: 0 4px;
	background-color: #e2e8f0;
	border: none;
	border-radius: 999px;
	display: inline-block;
	opacity: 0.5;
	transition: all 0.4s ease;
}

.step.active {
	opacity: 1;
	background-color: var(--ag-blue);
	width: 60px;
}

.step.finish {
	background-color: var(--ag-green);
}

#calendar {
	background: white;
	border-radius: 1rem;
	padding: 1.5rem;
	border: 1px solid var(--ag-border);
}

/* Calendly-style Time Selector */
.time-slots-container {
	margin-top: 1.5rem;
}

.day-periods-tabs {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	overflow-x: auto;
	padding-bottom: 5px;
	scrollbar-width: thin;
}

.period-tab {
	padding: 0.6rem 1.25rem;
	border-radius: 99px;
	background: #f1f5f9;
	color: #64748b;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

.period-tab:hover {
	background: #e2e8f0;
}

.period-tab.active {
	background: var(--ag-blue);
	color: white;
}

.time-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 0.75rem;
}

.time-slot {
	padding: 0.75rem;
	border-radius: 0.75rem;
	border: 1.5px solid #e2e8f0;
	background: white;
	color: #1e293b;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.time-slot:hover:not(.selected) {
	border-color: var(--ag-blue);
	color: var(--ag-blue);
	background: rgba(37, 99, 235, 0.03);
}

.time-slot.selected {
	background: var(--ag-blue);
	color: white;
	border-color: var(--ag-blue);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.no-slots-message {
	text-align: center;
	padding: 2rem;
	background: #fffafa;
	border: 1px dashed #fecaca;
	border-radius: 1rem;
	color: #991b1b;
}

.next-available-suggestion {
	margin-top: 1rem;
	padding: 1rem;
	background: #f0f9ff;
	border-radius: 0.75rem;
	border: 1px solid #bae6fd;
	text-align: center;
}

.next-available-btn {
	margin-top: 0.5rem;
	background: var(--ag-blue);
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	font-weight: 600;
	font-size: 0.875rem;
}

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

.fc-day.selected-day-highlight {
	background-color: rgba(37, 99, 235, 0.1) !important;
	border: 2px solid var(--ag-blue) !important;
	border-radius: 0.5rem;
}

/* Horizontal Date Picker Styles */
.date-picker-scroll {
	display: flex;
	gap: 0.75rem;
	overflow-x: auto;
	padding: 0.75rem 1.25rem;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none;  /* IE and Edge */
}

.date-picker-scroll::-webkit-scrollbar {
	display: none; /* Chrome, Safari, Opera */
}

.date-chip {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 70px;
	padding: 0.75rem;
	border-radius: 1rem;
	background: white;
	border: 2px solid #e2e8f0;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	scroll-snap-align: start;
}

.date-chip:hover:not(.active) {
	border-color: #cbd5e1;
	background: #f8fafc;
}

.date-chip.active {
	border-color: var(--ag-blue);
	background: rgba(37, 99, 235, 0.05);
	transform: scale(1.05);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.date-chip .day-name {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	margin-bottom: 0.25rem;
}

.date-chip.active .day-name {
	color: var(--ag-blue);
}

.date-chip .day-number {
	font-size: 1.25rem;
	font-weight: 800;
	color: #1e293b;
}

.date-chip.active .day-number {
	color: var(--ag-blue);
}

/* Sticky Navigation Footer */
#navigation-sticky-wrapper {
	padding: 2rem 0;
	background: transparent;
	border-top: none;
	margin-top: 0;
}

@media (max-width: 768px) {
	#navigation-sticky-wrapper {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		background: rgba(255, 255, 255, 0.9);
		backdrop-filter: blur(15px);
		-webkit-backdrop-filter: blur(15px);
		padding: 1.25rem 0;
		box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
		z-index: 10000; /* Extremely high to beat any card */
		border-top: 1px solid rgba(0, 0, 0, 0.05);
		display: block !important;
		animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
		margin-top: 0;
	}

	.w-100-mobile { width: 100%; }
	.footer-btn-container { justify-content: flex-end; gap: 0.75rem !important; }

	#sticky-summary {
		display: flex;
		flex-direction: column;
		margin-right: auto;
	}

	.container-sticky {
		padding: 0 1.5rem !important;
	}

	#sticky-summary .summary-label {
		font-size: 0.7rem;
		text-transform: uppercase;
		color: #64748b;
		font-weight: 700;
		letter-spacing: 0.05em;
	}

	#sticky-summary .summary-value {
		font-size: 1.35rem;
		font-weight: 800;
		color: #1e293b;
		line-height: 1.2;
	}

	#navigation-sticky-wrapper .ag-btn {
		margin-top: 0 !important;
		padding: 0.85rem 1.75rem !important;
		font-size: 0.95rem !important;
		border-radius: 12px !important;
	}

	#next-btn-count {
		font-size: 0.8rem;
		padding: 0.4em 0.7em;
	}

	#main-form-container {
		padding-bottom: 120px !important;
	}

	.steps-indicator-container {
		display: none;
	}
}

@keyframes slideUp {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

.booking-profile-nav {
	margin-bottom: 12px;
}

.booking-profile-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: 10px;
	color: #1d4ed8;
	background: #eff6ff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.booking-profile-link:hover {
	color: #1e40af;
	background: #dbeafe;
}

.booking-profile-link:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: 3px;
}

.booking-business-header {
	margin-bottom: 24px;
}

.booking-business-header h1 {
	overflow-wrap: anywhere;
}

/* Keep the complete logo visible, including wide business wordmarks. */
.store-logo-appointment {
	height: 112px;
	width: 224px;
	max-width: 100%;
	object-fit: contain;
	border-radius: 12px;
}

@media (max-width: 576px) {
	.store-logo-appointment {
		height: 96px;
		width: 192px;
	}

	#main-form-container {
		margin-top: 12px !important;
	}

	.items_tab {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Small "Powered by Buukea" mark at the bottom of the booking card — for
   brand discovery: clients of the business who don't know Buukea yet. */
.powered-by-buukea {
	text-align: center;
	margin-top: 32px;
	padding-top: 16px;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.powered-by-buukea a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 500;
	color: #94a3b8;
	text-decoration: none;
	letter-spacing: 0.01em;
	transition: color 0.15s ease;
}

.powered-by-buukea a:hover {
	color: #64748b;
}

.powered-by-buukea-logo {
	height: 13px;
	width: auto;
	display: inline-block;
	vertical-align: middle;
	filter: grayscale(1) opacity(0.75);
	transition: filter 0.15s ease;
}

.powered-by-buukea a:hover .powered-by-buukea-logo {
	filter: grayscale(0) opacity(1);
}

/* International phone input (intl-tel-input): country-code selector next to
   the phone field, matching the .form-control look used everywhere else on
   this page. The library's default width is content-sized, so it needs an
   explicit 100% to sit correctly inside the .col-sm-6 grid column. */
.iti {
	display: block;
	width: 100%;
}

.iti input.form-control {
	width: 100%;
}

/* Room for the separate dial-code chip (separateDialCode: true) on the left. */
.iti--separate-dial-code input.form-control {
	padding-left: 90px;
}

/* Link directo de un profesional (/a/{slug}/{id}-{nombre}): muestra con
   quién se está reservando, en lugar del paso de elegir empleado. */
.booking-professional {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
	padding: 8px 16px 8px 8px;
	border: 1px solid var(--ag-border);
	border-radius: 999px;
	background: #fff;
}

.booking-professional-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.booking-professional-avatar-empty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	color: #94a3b8;
}
