/* Reserva Barra Flotante — solo móvil */

:root {
	--rbf-bg: rgba(255, 255, 255, 0.95);
	--rbf-border: #e5e5e5;
	--rbf-text: #111111;
	--rbf-reservar-bg: #c4a574;
	--rbf-reservar-bg-hover: #b39363;
	--rbf-reservar-text: #111111;
	--rbf-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
	--rbf-bar-h: 72px;
	--rbf-radius: 10px;
}

/* Ocultar en desktop */
.rbf-bar {
	display: none;
}

@media (max-width: 767px) {
	.rbf-bar {
		display: flex;
		align-items: center;
		gap: 10px;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 99990;
		padding: 12px 14px;
		padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		background: var(--rbf-bg);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-top: 1px solid var(--rbf-border);
		box-shadow: var(--rbf-shadow);
		box-sizing: border-box;
	}

	/* Espacio para que el contenido no quede bajo la barra */
	body {
		padding-bottom: calc(var(--rbf-bar-h) + env(safe-area-inset-bottom, 0px)) !important;
	}
}

.rbf-btn-reservar {
	flex: 1 1 auto;
	min-width: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 20px;
	border: none;
	border-radius: var(--rbf-radius);
	background: var(--rbf-reservar-bg);
	color: var(--rbf-reservar-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.rbf-btn-reservar:hover,
.rbf-btn-reservar:focus-visible {
	background: var(--rbf-reservar-bg-hover);
	outline: none;
}

.rbf-btn-reservar:active {
	transform: scale(0.98);
}

.rbf-btn-icon {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--rbf-border);
	border-radius: var(--rbf-radius);
	background: transparent;
	color: var(--rbf-text);
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.rbf-btn-icon:hover,
.rbf-btn-icon:focus-visible {
	background: #f5f5f5;
	border-color: #ccc;
	outline: none;
}

/* —— Modal —— */
.rbf-modal[hidden] {
	display: none !important;
}

.rbf-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

@media (min-width: 768px) {
	.rbf-modal {
		align-items: center;
		padding: 24px;
	}
}

.rbf-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: rbf-fade-in 0.25s ease;
}

.rbf-modal-panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 640px;
	height: 96dvh;
	max-height: 96dvh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px 16px 0 0;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	animation: rbf-slide-up 0.3s ease;
}

/* Fallback para navegadores sin dvh */
@supports not (height: 96dvh) {
	.rbf-modal-panel {
		height: 96vh;
		max-height: 96vh;
	}
}

@media (min-width: 768px) {
	.rbf-modal-panel {
		border-radius: 16px;
		height: auto;
		max-height: 92vh;
	}
}

.rbf-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--rbf-border);
	flex-shrink: 0;
}

.rbf-modal-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--rbf-text);
}

.rbf-modal-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: var(--rbf-text);
	cursor: pointer;
	transition: background 0.2s ease;
}

.rbf-modal-close:hover,
.rbf-modal-close:focus-visible {
	background: #f0f0f0;
	outline: none;
}

.rbf-modal-body {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	flex: 1 1 auto;
	min-height: 0;
	padding: 4px 8px 8px;
}

.rbf-reservation-widget {
	background: #fff;
	border-radius: 12px;
	height: 100%;
}

.rbf-reservation-widget iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 680px;
	border: 0;
}

body.rbf-modal-open {
	overflow: hidden;
}

@keyframes rbf-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes rbf-slide-up {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rbf-modal-overlay,
	.rbf-modal-panel {
		animation: none;
	}
}
