/* =========================================================
   YBF Bookings — layout only. Decorative styles belong in
   the theme once the custom theme is built.
   ========================================================= */

/* Calendar container */
.ybf-calendar-wrap {
	position: relative;
}

#ybf-calendar {
	min-height: 500px;
}

/* =========================================================
   Calendar top bar
   ========================================================= */

.ybf-cal-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.ybf-cal-bar-left,
.ybf-cal-bar-state {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	background: #fff;
	border: 1.5px solid #ddd8d0;
	border-radius: 20px;
	padding: 5px 16px;
	font-size: 14px !important;
	line-height: 1.5;
	color: #404a3d !important;
}

.ybf-cal-bar-left:empty {
	display: none;
}

.ybf-cal-bar-sep {
	margin: 0 0.5rem;
	opacity: 0.35;
}

.ybf-cal-bar-link,
.ybf-cal-bar-btn {
	color: #404a3d !important;
	background: none;
	border: none;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ybf-cal-bar-credits {
	color: #5b8c51 !important;
	font-weight: 700;
}

/* =========================================================
   Modal
   ========================================================= */

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

.ybf-modal:not([hidden]) {
	display: flex;
}

.ybf-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.ybf-modal-content {
	position: relative;
	background: #fff;
	padding: 2rem;
	max-width: 480px;
	width: 90%;
	border-radius: 4px;
	max-height: 90vh;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ybf-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 32px !important;
	height: 32px !important;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #666 !important;
	transition: color 0.15s;
}

.ybf-modal-close:hover {
	background: transparent !important;
	color: #111 !important;
}

/* Meta row — spots + price side by side */
.ybf-modal-meta {
	display: flex;
	gap: 1.5rem;
	margin: 1rem 0;
}

/* Actions */
.ybf-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

.ybf-btn {
	display: inline-block;
	padding: 0.75rem 1rem;
	text-align: center;
	cursor: pointer;
	border: none;
	font-size: 1rem !important;
	text-decoration: none !important;
	box-sizing: border-box;
	background: #404a3d !important;
	color: #eddd5e !important;
	border-radius: 6px;
	font-weight: 700;
	letter-spacing: 0.02em;
	font-family: inherit;
}

/* Full-width only inside the booking modal */
.ybf-modal-actions .ybf-btn {
	display: block;
	width: 100%;
}

.ybf-btn[hidden],
.ybf-modal-course-notice[hidden],
.ybf-modal-buy-pass[hidden] {
	display: none;
}

.ybf-modal-buy-pass {
	display: block;
	margin-top: 0.5rem;
	text-align: center;
	font-size: 0.875rem;
	color: #5b8c51 !important;
	text-decoration: underline;
	cursor: pointer;
}

.ybf-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Status message */
.ybf-modal-message:empty {
	display: none;
}

.ybf-modal-message {
	margin-top: 1rem;
	font-size: 0.9em;
}

/* =========================================================
   Auth form (sign up / log in)
   ========================================================= */

.ybf-auth-wrap {
	max-width: 420px;
	margin: 2rem auto;
}

.ybf-auth-tabs {
	display: flex;
	border-bottom: 2px solid #f5f0e9;
	margin-bottom: 2rem;
}

.ybf-auth-tab {
	flex: 1;
	padding: 0.75rem 1rem;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
	font-family: "Barlow", sans-serif;
	font-size: 1rem;
	font-weight: 500;
	color: #878986;
	transition: color 0.15s, border-color 0.15s;
}

.ybf-auth-tab[aria-selected="true"] {
	color: #404a3d;
	border-bottom-color: #eddd5e;
}

.ybf-auth-panel[aria-hidden="true"] {
	display: none;
}

.ybf-auth-field {
	margin-bottom: 1.25rem;
}

.ybf-auth-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #404a3d;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ybf-auth-field input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1.5px solid #d8d3cc;
	border-radius: 3px;
	font-family: "Barlow", sans-serif;
	font-size: 1rem;
	color: #404a3d;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.ybf-auth-field input:focus {
	outline: none;
	border-color: #404a3d;
}

.ybf-auth-submit {
	width: 100%;
	padding: 0.875rem;
	margin-top: 0.25rem;
	background: #404a3d;
	color: #fff;
	border: none;
	border-radius: 3px;
	font-family: "Barlow", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: opacity 0.15s;
}

.ybf-auth-submit:hover {
	opacity: 0.88;
}

.ybf-auth-submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.ybf-auth-message {
	margin-top: 1rem;
	font-size: 0.9em;
	padding: 0.75rem 1rem;
	border-radius: 3px;
}

.ybf-auth-message:empty {
	display: none;
}

.ybf-auth-message--error {
	background: #fef2f2;
	color: #b91c1c;
}

.ybf-auth-message--success {
	background: #f0fdf4;
	color: #15803d;
}

.ybf-auth-footer {
	margin-top: 1.5rem;
	text-align: center;
	font-size: 0.875rem;
	color: #878986;
}

.ybf-auth-footer a,
.ybf-auth-switch {
	color: #404a3d;
	font-weight: 600;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Narrower content box for the auth modal */
.ybf-auth-modal-inner {
	max-width: 360px;
}

.ybf-auth-loggedin {
	max-width: 420px;
	margin: 2rem auto;
	text-align: center;
	color: #404a3d;
}

.ybf-auth-loggedin a {
	color: #404a3d;
	font-weight: 600;
}

/* =========================================================
   Mobile responsive overrides (≤ 600 px)
   ========================================================= */

@media (max-width: 600px) {

	/* Stack status pills vertically, full-width */
	.ybf-cal-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.ybf-cal-bar-left,
	.ybf-cal-bar-state {
		justify-content: center;
		text-align: center;
	}

	/* Bottom-sheet modal */
	.ybf-modal {
		align-items: flex-end;
	}

	.ybf-modal-content {
		width: 100%;
		max-width: 100%;
		max-height: 88vh;
		border-radius: 16px 16px 0 0;
		padding: 1.25rem 1.25rem 2rem;
	}

	/* Tighten FullCalendar toolbar buttons */
	.fc .fc-toolbar {
		gap: 0.4rem;
	}

	.fc .fc-button {
		padding: 0.3em 0.55em !important;
		font-size: 0.8rem !important;
	}

	.fc .fc-toolbar-title {
		font-size: 1rem !important;
	}

	/* Give list-view rows more breathing room on touch screens */
	.fc-list-event td {
		padding: 0.6em 0.75em !important;
	}

}

/* ---- Bundle cards [ybf_bundles] ---- */
.ybf-bundles {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	align-items: stretch;
}

.ybf-bundle-card {
	flex: 1 1 220px;
	max-width: 320px;
	border: 1.5px solid #ddd8d0;
	border-radius: 12px;
	padding: 1.5rem;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	position: relative;
}

/* Override theme heading styles */
.ybf-bundle-name {
	font-size: 1.2rem !important;
	font-weight: 700 !important;
	color: #404a3d !important;
	margin: 0 !important;
	line-height: 1.3 !important;
	font-family: inherit !important;
}

.ybf-bundle-desc {
	font-size: 1rem;
	color: #6b7280;
	margin: 0;
}

.ybf-bundle-desc p {
	margin: 0;
}

.ybf-bundle-meta {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	flex-wrap: wrap;
}

.ybf-bundle-credits {
	font-size: 0.9375rem;
	background: #f5f0e9;
	color: #404a3d;
	font-weight: 600;
	padding: 0.2em 0.7em;
	border-radius: 20px;
}

.ybf-bundle-per-class {
	font-size: 0.9375rem;
	color: #878986;
}

.ybf-bundle-price {
	font-size: 2rem !important;
	font-weight: 700 !important;
	color: #404a3d !important;
	margin: 0.25rem 0 0 !important;
	font-family: inherit !important;
	line-height: 1.1 !important;
}

.ybf-bundle-buy-btn {
	margin-top: auto;
	padding: 0.875rem 1rem !important;
	background: #404a3d;
	color: #eddd5e !important;
	font-weight: 700;
	border-radius: 6px;
	text-align: center;
	font-size: 1rem !important;
	letter-spacing: 0.02em;
}
