:root {
	--alsaif-teal: #026f6c;
	--alsaif-teal-dark: #015250;
	--alsaif-teal-tint: rgba(2, 111, 108, 0.1);
	--alsaif-gold: #bdac66;
	--alsaif-gold-dark: #8a7a3a;
	--alsaif-gold-tint: #fbf8ef;
	--alsaif-surface: #fbfbf9;
	--alsaif-border: #e6e6e0;
	--alsaif-text: #22221f;
	--alsaif-text-muted: #6b6b63;
	--alsaif-danger: var(--alsaif-gold-dark);
	--alsaif-danger-border: var(--alsaif-gold);
	--alsaif-danger-bg: var(--alsaif-gold-tint);
	--alsaif-radius: 10px;
	--alsaif-font-ar: 'El Messiri', sans-serif;
	--alsaif-font-en: 'Poppins', sans-serif;
}

/* ---------------------------------------------------------------
 * Bilingual switching: show/hide by data-lang, respecting the
 * element's natural display type (span stays inline, p stays block).
 * ------------------------------------------------------------- */
[data-lang] { display: none; }
.alsaif-lang-ar [data-lang="ar"] { display: revert; }
.alsaif-lang-en [data-lang="en"] { display: revert; }

.alsaif-lang-scope {
	font-family: var(--alsaif-font-ar);
	color: var(--alsaif-text);
	direction: rtl;
}
.alsaif-lang-scope.alsaif-lang-en {
	font-family: var(--alsaif-font-en);
	direction: ltr;
}
.alsaif-lang-scope * { box-sizing: border-box; }
.alsaif-lang-scope button {
	border: none;
	background: none;
	font-family: inherit;
	color: inherit;
	appearance: none;
	-webkit-appearance: none;
}
.alsaif-lang-scope a { text-decoration: none; }

/* Each content shortcode (login/booking/my-bookings) carries this too,
 * so it looks right regardless of where the header/footer sit on the page. */
html, body { overflow-x: hidden; max-width: 100%; }
.alsaif-page { max-width: 1180px; margin: 0 auto; padding: 24px 32px; font-size: 15px; }

/* ---------------------------------------------------------------
 * Top bar: just the centered logo
 * ------------------------------------------------------------- */
.alsaif-top-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 20px;
	border-bottom: 2px solid var(--alsaif-teal) !important;
	background: #ffffff;
	position: sticky;
	top: 0;
	z-index: 40;
}
.alsaif-logo { height: 40px; width: auto; display: block; }

/* ---------------------------------------------------------------
 * Bottom nav: a compact floating pill "dock", detached from the
 * screen edges and centered - a distinct app-like alternative to
 * a flat full-width bar. The active tab fills with the gold brand
 * color; the rest sit quietly on the white pill.
 * ------------------------------------------------------------- */
.alsaif-bottom-nav {
	position: fixed;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	z-index: 2147483647;
	display: flex;
	align-items: center;
	gap: 4px;
	background: #ffffff;
	padding: 6px;
	border-radius: 999px;
	box-shadow: 0 10px 30px rgba(20, 20, 18, 0.16), 0 2px 8px rgba(20, 20, 18, 0.08);
	max-width: calc(100vw - 32px);
}
.alsaif-bottom-nav-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: var(--alsaif-text-muted);
	text-decoration: none;
	background: none;
	border: none;
	font-family: inherit;
	cursor: pointer;
	padding: 11px 20px;
	border-radius: 999px;
	white-space: nowrap;
	transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
}
.alsaif-bottom-nav-item i { font-size: 18px; }
.alsaif-bottom-nav-item:hover { background: var(--alsaif-gold-tint); color: var(--alsaif-gold-dark); }
.alsaif-bottom-nav-item:active { transform: scale(0.95); }
.alsaif-bottom-nav-item.is-active { background: var(--alsaif-gold); color: #ffffff; font-weight: 700; }
.alsaif-avatar {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--alsaif-gold-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	flex-shrink: 0;
}

/* ---------------------------------------------------------------
 * Main + Footer
 * ------------------------------------------------------------- */
.alsaif-footer {
	border-top: 1px solid #eee6d0;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #fdfcf8;
	font-size: 12px;
	color: #8a8a80;
}
.alsaif-footer-icon {
	width: 18px;
	height: 18px;
	border-radius: 4px;
	background: var(--alsaif-teal);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
}

/* ---------------------------------------------------------------
 * Buttons, cards, alerts
 * ------------------------------------------------------------- */
.alsaif-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 18px;
	border-radius: 8px;
	border: 1px solid var(--alsaif-border) !important;
	background: #ffffff !important;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	text-decoration: none;
	color: var(--alsaif-text);
}
.alsaif-btn-primary { background: var(--alsaif-teal) !important; border-color: var(--alsaif-teal) !important; color: #ffffff !important; }
.alsaif-btn-primary:hover { background: var(--alsaif-teal-dark) !important; color: #ffffff !important; }
.alsaif-btn-ghost { background: transparent !important; }
.alsaif-btn-ms { border-color: var(--alsaif-gold) !important; background: var(--alsaif-gold-tint) !important; color: var(--alsaif-gold-dark); width: 100%; }

.alsaif-card { background: #ffffff; border: 1px solid var(--alsaif-border); border-radius: 12px; padding: 1.5rem; }
.alsaif-card-centered { max-width: 420px; margin: 3rem auto; text-align: center; }
.alsaif-card-centered .alsaif-btn { margin-top: 12px; }

.alsaif-alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alsaif-alert-error { background: var(--alsaif-danger-bg); color: var(--alsaif-danger); }
.alsaif-alert-preview { background: var(--alsaif-gold-tint); color: var(--alsaif-gold-dark); border: 1px solid var(--alsaif-gold); }

/* ---------------------------------------------------------------
 * Login page
 * ------------------------------------------------------------- */
.alsaif-login-wrap { display: flex; align-items: center; justify-content: center; min-height: 55vh; padding: 2rem 0; }
.alsaif-login-card { width: 100%; max-width: 360px; text-align: center; padding: 2rem 1.5rem; }
.alsaif-login-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--alsaif-teal-tint);
	color: var(--alsaif-teal);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	margin: 0 auto 1rem;
}
.alsaif-login-title { font-size: 16px; font-weight: 500; margin: 0 0 20px; }
.alsaif-login-note {
	font-size: 12px;
	color: var(--alsaif-text-muted);
	margin-top: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

/* ---------------------------------------------------------------
 * Booking toolbar + room tabs
 * ------------------------------------------------------------- */
.alsaif-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.alsaif-booking-app { background: #ffffff; border: 1px solid var(--alsaif-border); border-radius: 16px; padding: 20px; }
.alsaif-room-tabs {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	background: var(--alsaif-surface);
	border: 1px solid var(--alsaif-border);
	border-radius: 999px;
	padding: 4px;
}
.alsaif-room-tab {
	height: 38px;
	padding: 0 20px;
	border-radius: 999px;
	border: none !important;
	background: transparent !important;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	color: var(--alsaif-text-muted);
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.alsaif-room-tab.is-active {
	color: var(--alsaif-teal) !important;
	background: #ffffff !important;
	font-weight: 600;
	box-shadow: 0 1px 2px rgba(20, 20, 18, 0.06), 0 2px 8px rgba(20, 20, 18, 0.06);
}
.alsaif-room-tab:active { transform: scale(0.97); }
.alsaif-week-nav { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--alsaif-text-muted); }
.alsaif-week-nav button { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--alsaif-text-muted); }
.alsaif-week-nav button:hover { color: var(--alsaif-teal); }

/* ---------------------------------------------------------------
 * Booking layout: mini month calendar + scrollable day columns
 * of pill-shaped available time slots (only free times are shown).
 * ------------------------------------------------------------- */
.alsaif-booking-layout { display: flex; align-items: flex-start; gap: 28px; }

.alsaif-mini-cal { width: 240px; flex-shrink: 0; padding-inline-end: 24px; border-inline-end: 1px solid var(--alsaif-border); box-sizing: border-box; overflow: hidden; }
.alsaif-mini-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.alsaif-mini-cal-header button { background: none; border: none !important; cursor: pointer; font-size: 18px; color: var(--alsaif-text-muted); }
.alsaif-mini-cal-header button:hover { color: var(--alsaif-teal); }
.alsaif-mini-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.alsaif-mini-cal-weekday { text-align: center; font-size: 11px; color: var(--alsaif-text-muted); padding-bottom: 6px; }
.alsaif-mini-cal-day {
	text-align: center;
	font-size: 13px;
	height: 32px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	cursor: pointer;
	background: none;
	border: none !important;
	font-family: inherit;
	color: var(--alsaif-text);
	padding: 0;
	min-width: 0;
}
.alsaif-mini-cal-day.is-available { background: var(--alsaif-teal-tint); color: var(--alsaif-teal-dark); }
.alsaif-mini-cal-day:hover:not(:disabled) { background: var(--alsaif-teal-tint); }
.alsaif-mini-cal-day:disabled { color: var(--alsaif-text-muted); opacity: 0.5; cursor: not-allowed; text-decoration: line-through; }
.alsaif-mini-cal-day.is-selected { background: var(--alsaif-teal) !important; color: #ffffff !important; }
.alsaif-mini-cal-day.is-empty { visibility: hidden; }

.alsaif-days-scroll { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.alsaif-days-row { display: flex; gap: 10px; width: 100%; min-width: max-content; padding-bottom: 4px; }
.alsaif-day-col { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 100px; }
.alsaif-day-col-header {
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	padding-bottom: 10px;
	margin-bottom: 4px;
	border-bottom: 2px solid var(--alsaif-teal) !important;
}
.alsaif-day-col-header .alsaif-day-name { display: block; font-size: 11px; color: var(--alsaif-text-muted); font-weight: 400; margin-bottom: 2px; letter-spacing: 0.02em; }
.alsaif-day-col-empty { min-height: 40px; }
.alsaif-slot-pill {
	height: 40px;
	width: 100%;
	padding: 0 8px;
	border-radius: 999px;
	border: 1px solid var(--alsaif-teal) !important;
	background: #ffffff !important;
	color: var(--alsaif-teal) !important;
	font-family: inherit;
	font-size: 13px;
	white-space: nowrap;
	box-sizing: border-box;
	cursor: pointer;
	transition: transform 0.1s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.alsaif-slot-pill:hover { background: var(--alsaif-teal) !important; color: #ffffff !important; box-shadow: 0 2px 8px rgba(2, 111, 108, 0.25); }
.alsaif-slot-pill:active:not(:disabled) { transform: scale(0.94); }
@property --alsaif-angle {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}
.alsaif-slot-pill.alsaif-slot-now {
	position: relative;
	padding-inline-end: 18px;
}
.alsaif-now-dot {
	position: absolute;
	top: 6px;
	inset-inline-end: 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: conic-gradient(from var(--alsaif-angle, 0deg), var(--alsaif-teal), var(--alsaif-text-muted), var(--alsaif-teal));
	animation: alsaifBorderSpin 2.5s linear infinite;
	pointer-events: none;
}
.alsaif-slot-pill.alsaif-slot-now:hover .alsaif-now-dot { animation-play-state: paused; }
@keyframes alsaifBorderSpin {
	to { --alsaif-angle: 360deg; }
}
.alsaif-slot-pill.is-past,
.alsaif-slot-pill.is-booked,
.alsaif-slot-pill:disabled {
	border: 1px solid var(--alsaif-border) !important;
	background: var(--alsaif-surface) !important;
	color: var(--alsaif-text-muted) !important;
	cursor: not-allowed;
	opacity: 0.75;
	position: relative;
}
.alsaif-slot-pill.is-past { text-decoration: line-through; }
.alsaif-slot-pill.is-booked { padding-inline-end: 18px; }
.alsaif-booked-dot {
	position: absolute;
	top: 6px;
	inset-inline-end: 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #c0392b;
}
.alsaif-slot-pill.is-past:hover,
.alsaif-slot-pill.is-booked:hover,
.alsaif-slot-pill:disabled:hover { background: var(--alsaif-surface) !important; color: var(--alsaif-text-muted) !important; }
.alsaif-no-slots { font-size: 14px; color: var(--alsaif-text-muted); text-align: center; padding: 8px 4px; }

.alsaif-legend { display: flex; align-items: center; gap: 16px; margin-top: 18px; font-size: 13px; color: var(--alsaif-text-muted); }
.alsaif-legend > span { display: flex; align-items: center; gap: 6px; }
.alsaif-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.alsaif-dot-free { border: 1.5px solid var(--alsaif-teal); }

.alsaif-loading { text-align: center; padding: 40px 0; color: var(--alsaif-text-muted); font-size: 14px; }

/* ---------------------------------------------------------------
 * Booking panel - normal in-flow content (all layout is set inline
 * in the PHP template so it works even before this stylesheet loads).
 * ------------------------------------------------------------- */
.alsaif-booking-panel[hidden] { display: none; }
.alsaif-booking-panel h3 { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.alsaif-modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.alsaif-modal-error { color: var(--alsaif-danger); font-size: 12px; margin: 0 0 10px; }
.alsaif-modal-error[hidden] { display: none; }

/* ---------------------------------------------------------------
 * My bookings
 * ------------------------------------------------------------- */
.alsaif-section-label { font-size: 13px; color: var(--alsaif-text-muted); margin: 20px 0 12px; }
.alsaif-section-label:first-child { margin-top: 0; }
.alsaif-booking-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #ffffff;
	border: 1px solid var(--alsaif-border);
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 10px;
	gap: 10px;
	flex-wrap: wrap;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.alsaif-booking-item:hover { box-shadow: 0 2px 6px rgba(20, 20, 18, 0.04), 0 8px 20px rgba(20, 20, 18, 0.06); }
.alsaif-booking-item.is-past { opacity: 0.6; }
.alsaif-booking-item-info { display: flex; align-items: center; gap: 12px; }
.alsaif-booking-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-size: 18px;
	flex-shrink: 0;
}
.alsaif-booking-title { font-weight: 600; font-size: 14px; margin: 0; }
.alsaif-booking-meta { font-size: 12px; color: var(--alsaif-text-muted); margin: 2px 0 0; }
.alsaif-cancel-btn {
	font-size: 12px;
	height: 30px;
	padding: 0 12px;
	color: var(--alsaif-gold-dark);
	background: #ffffff !important;
	border: 1px solid var(--alsaif-gold) !important;
	border-radius: 999px;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s ease, transform 0.1s ease;
}
.alsaif-cancel-btn:hover { background: var(--alsaif-gold-tint) !important; }
.alsaif-cancel-btn:active { transform: scale(0.95); }

/* ---------------------------------------------------------------
 * Responsive: mobile reads like an app (flat, full-bleed, compact),
 * desktop reads like a website (roomier, centered, gentle elevation).
 * ------------------------------------------------------------- */

/* Mobile (default / app-like) */
@media (max-width: 640px) {
	.alsaif-top-bar { padding: 10px 14px; }
	.alsaif-logo { height: 32px; }

	.alsaif-page { padding: 16px 12px; }

	.alsaif-booking-app { padding: 14px; border-radius: 14px; }

	.alsaif-toolbar { gap: 10px; }
	.alsaif-room-tabs { width: 100%; }
	.alsaif-room-tab { flex: 1; }

	[data-alsaif-duration-group] { flex-wrap: wrap; }
	[data-alsaif-duration-group] .alsaif-duration-btn { flex: 1 1 30% !important; min-width: 0; }
	[data-alsaif-duration-group] .alsaif-duration-btn[data-duration="till_slot_end"] { flex: 1 1 100% !important; }

	.alsaif-booking-item { border-inline-width: 0; border-radius: 10px; }
	.alsaif-login-wrap, .alsaif-card-centered { margin-top: 1rem; }

	.alsaif-booking-layout { flex-direction: column; }
	.alsaif-mini-cal { width: 100%; padding-inline-end: 0; border-inline-end: none; padding-bottom: 16px; border-bottom: 1px solid var(--alsaif-border); }

	.alsaif-days-scroll { overflow-x: hidden !important; }
	.alsaif-days-row { min-width: 0; gap: 6px; }
	.alsaif-day-col { min-width: 0; gap: 6px; }
	.alsaif-slot-pill { font-size: 11px; padding: 0 4px; }

	.alsaif-bottom-nav-item { padding: 9px 14px; font-size: 11px; gap: 5px; }
	.alsaif-bottom-nav-item i { font-size: 17px; }

	/* No position:fixed at all on mobile - it renders as a normal,
	 * static block at the end of the page instead of floating. */
	.alsaif-bottom-nav {
		position: static !important;
		left: auto !important;
		right: auto !important;
		bottom: auto !important;
		transform: none !important;
		margin: 24px auto 20px !important;
		max-width: 300px !important;
		box-shadow: 0 4px 14px rgba(20, 20, 18, 0.12) !important;
	}
	.alsaif-page { padding-bottom: 24px !important; }
}

/* Desktop (roomier, website-like) */
@media (min-width: 641px) {
	.alsaif-page { padding: 40px 24px; }

	.alsaif-card,
	.alsaif-booking-app,
	.alsaif-booking-item,
	.alsaif-booking-panel {
		box-shadow: 0 1px 2px rgba(20, 20, 18, 0.03), 0 10px 30px rgba(20, 20, 18, 0.045);
	}

	.alsaif-top-bar { padding: 16px 32px; }
	.alsaif-footer { padding: 18px 24px; }

	.alsaif-booking-panel { width: 50% !important; min-width: 420px; margin-inline: auto !important; }
}

/* Large desktop: a touch more breathing room, still contained */
@media (min-width: 1200px) {
	.alsaif-page { max-width: 1280px; }
}
