/* ==========================================================================
   jogine-booking — frontend.css
   Mobile-first. Min 48 px tap targets. Min 16 px font.
   Colour palette: #4a7c59 green, white backgrounds, #333 text.
   ========================================================================== */

/* ── Schedule container ─────────────────────────────────────────────────── */

.jogine-schedule {
	max-width: 780px;
	margin: 0 auto;
	padding: 0 16px 48px;
	font-size: 16px;
	color: #333;
	line-height: 1.5;
}

/* ── Week navigation bar ─────────────────────────────────────────────────── */

.jogine-schedule__nav {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 4px;
	padding: 20px 0 16px;
}

.jogine-schedule__week-label {
	font-size: 15px;
	font-weight: 500;
	color: #444;
	margin-right: 8px;
}

.jogine-nav-arrow {
	/* 48 px tap target */
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	border-radius: 50%;
	font-size: 22px;
	color: #555;
	cursor: pointer;
	transition: background 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.jogine-nav-arrow:hover,
.jogine-nav-arrow:focus-visible {
	background: #eee;
	outline: none;
}

.jogine-nav-thisweek {
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid #ccc;
	border-radius: 24px;
	background: white;
	font-size: 15px;
	color: #444;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.jogine-nav-thisweek:hover,
.jogine-nav-thisweek:focus-visible {
	background: #f5f5f5;
	border-color: #aaa;
	outline: none;
}

/* ── Loading / error states ─────────────────────────────────────────────── */

.jogine-schedule__loading {
	height: 120px;
	background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: jogine-shimmer 1.4s infinite;
	border-radius: 8px;
	margin: 8px 0;
}

@keyframes jogine-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.jogine-schedule__error {
	padding: 16px;
	background: #fdecea;
	border-radius: 8px;
	color: #c62828;
	font-size: 15px;
}

/* ── Day sections ────────────────────────────────────────────────────────── */

.jogine-day {
	background: white;
	border-radius: 8px;
	margin-bottom: 12px;
	overflow: hidden;
}

.jogine-day__heading {
	font-size: 15px;
	font-weight: 700;
	color: #222;
	margin: 0;
	padding: 18px 24px 10px;
}

.jogine-day__empty {
	padding: 4px 24px 18px;
	margin: 0;
	font-size: 14px;
	color: #888;
}

/* ── Class rows ──────────────────────────────────────────────────────────── */

.jogine-class-row {
	display: flex;
	align-items: center;
	padding: 12px 24px;
	gap: 14px;
	border-top: 1px solid #f5f5f5;
	transition: background 0.12s;
}

.jogine-class-row:hover {
	background: #fafafa;
}

.jogine-class-row--cancelled {
	opacity: 0.7;
}

/* Time */
.jogine-class-row__time {
	min-width: 44px;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	color: #555;
	flex-shrink: 0;
}

/* Teacher */
.jogine-class-row__teacher {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.jogine-teacher-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	background: #ddd;
	display: block;
}

.jogine-teacher-avatar--placeholder {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ddd;
	display: inline-block;
}

.jogine-class-row__teacher-name {
	font-size: 13px;
	color: #666;
	white-space: nowrap;
}

/* Class info */
.jogine-class-row__info {
	flex: 1;
	min-width: 0;
}

.jogine-class-row__title-line {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.jogine-class__title {
	font-size: 15px;
	font-weight: 500;
	color: #222;
}

.jogine-class__title--cancelled {
	text-decoration: line-through;
	color: #999;
}

.jogine-class-row__location {
	font-size: 13px;
	color: #888;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jogine-class__spots {
	font-size: 13px;
}

.jogine-class__spots--low {
	color: #d46d00;
	font-weight: 500;
}

/* Badges */
.jogine-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	vertical-align: middle;
	flex-shrink: 0;
}

.jogine-badge--cancelled {
	background: #333;
	color: white;
}

/* Action column */
.jogine-class-row__action {
	flex-shrink: 0;
	margin-left: auto;
}

/* ── Book / action buttons ────────────────────────────────────────────────── */

.jogine-book-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	min-width: 110px;
	padding: 0 20px;
	border: none;
	border-radius: 24px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, transform 0.1s;
	-webkit-tap-highlight-color: transparent;
	background: #555;
	color: white;
}

.jogine-book-btn:hover:not( :disabled ) {
	background: #3d3d3d;
}

.jogine-book-btn:active:not( :disabled ) {
	transform: scale( 0.97 );
}

.jogine-book-btn--low {
	background: #d46d00;
}

.jogine-book-btn--low:hover:not( :disabled ) {
	background: #b85c00;
}

.jogine-book-btn--booked {
	background: #4a7c59;
}

.jogine-book-btn--booked:hover:not( :disabled ) {
	background: #3d6849;
}

.jogine-book-btn:disabled,
.jogine-book-btn--full,
.jogine-book-btn--closed {
	background: #ccc;
	color: #888;
	cursor: not-allowed;
}

/* Inline success flash */
.jogine-inline-success {
	display: inline-block;
	font-size: 13px;
	color: #4a7c59;
	font-weight: 500;
	margin-left: 8px;
	animation: jogine-fade-out 3s forwards;
}

@keyframes jogine-fade-out {
	0%, 60% { opacity: 1; }
	100%     { opacity: 0; }
}

/* ── Modals (auth + booking confirmation) ────────────────────────────────── */

/* Shared modal overlay */
.jogine-auth-modal,
.jogine-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 16px;
}

.jogine-auth-modal[hidden],
.jogine-modal[hidden] {
	display: none;
}

.jogine-auth-modal__backdrop,
.jogine-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.45 );
}

/* Dialog box */
.jogine-auth-modal__dialog,
.jogine-modal__dialog {
	position: relative;
	background: white;
	border-radius: 14px;
	padding: 32px;
	max-width: 420px;
	width: 100%;
	box-shadow: 0 24px 60px rgba( 0, 0, 0, 0.18 );
}

/* Close button */
.jogine-auth-modal__close,
.jogine-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	border-radius: 50%;
	font-size: 18px;
	color: #666;
	cursor: pointer;
	transition: background 0.15s;
}

.jogine-auth-modal__close:hover,
.jogine-modal__close:hover {
	background: #f0f0f0;
}

/* Headings */
.jogine-auth-modal__heading,
.jogine-modal__heading {
	font-size: 20px;
	font-weight: 700;
	color: #222;
	margin: 0 0 8px;
	padding-right: 28px;
}

.jogine-auth-modal__subtext {
	font-size: 15px;
	color: #666;
	margin: 0 0 20px;
	line-height: 1.5;
}

/* Step containers (form / success) */
.jogine-auth-modal__step {
	display: block;
}

.jogine-auth-modal__step[hidden] {
	display: none !important; /* overrides the explicit display:block on the class */
}

/* Form */
.jogine-auth-modal__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.jogine-auth-modal__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.jogine-auth-modal__label {
	font-size: 14px;
	font-weight: 500;
	color: #444;
}

.jogine-auth-modal__input {
	height: 52px;
	padding: 0 16px;
	border: 1.5px solid #ddd;
	border-radius: 8px;
	font-size: 16px; /* 16 px prevents iOS auto-zoom */
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.jogine-auth-modal__input:focus {
	outline: none;
	border-color: #4a7c59;
}

/* Error paragraph in auth modal */
.jogine-auth-modal__error {
	font-size: 13px;
	color: #c62828;
	margin: 0;
	padding: 8px 12px;
	background: #fdecea;
	border-radius: 6px;
}

.jogine-auth-modal__error[hidden] {
	display: none;
}

/* Auth modal buttons */
.jogine-auth-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	width: 100%;
	padding: 0 24px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.jogine-auth-modal__btn--primary {
	background: #4a7c59;
	color: white;
}

.jogine-auth-modal__btn--primary:hover:not( :disabled ) {
	background: #3d6849;
}

.jogine-auth-modal__btn--primary:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.jogine-auth-modal__btn--secondary {
	background: transparent;
	color: #4a7c59;
	border: 1.5px solid #4a7c59;
	margin-top: 8px;
}

.jogine-auth-modal__btn--secondary:hover {
	background: #f0f7f2;
}

/* ── Booking confirmation modal specifics ────────────────────────────────── */

.jogine-confirm-class {
	font-size: 16px;
	font-weight: 600;
	color: #222;
	margin: 0 0 12px;
}

.jogine-confirm-pass-notice {
	font-size: 15px;
	color: #444;
	background: #f0f7f2;
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 24px;
	line-height: 1.55;
}

.jogine-confirm-error {
	font-size: 14px;
	color: #c62828;
	background: #fdecea;
	border-radius: 6px;
	padding: 8px 12px;
	margin-bottom: 12px;
}

.jogine-confirm-error[hidden] {
	display: none;
}

.jogine-confirm-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ── Shared .jogine-btn (confirm modal buttons) ───────────────────────────── */

.jogine-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	width: 100%;
	padding: 0 24px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.jogine-btn--primary {
	background: #4a7c59;
	color: white;
}

.jogine-btn--primary:hover:not( :disabled ) {
	background: #3d6849;
}

.jogine-btn--primary:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.jogine-btn--secondary {
	background: transparent;
	color: #4a7c59;
	border: 1.5px solid #4a7c59;
}

.jogine-btn--secondary:hover {
	background: #f0f7f2;
}

/* ── Mobile overrides ────────────────────────────────────────────────────── */

@media ( max-width: 600px ) {
	.jogine-schedule {
		padding: 0 12px 32px;
	}

	.jogine-day__heading {
		padding: 14px 16px 8px;
	}

	.jogine-day__empty {
		padding: 4px 16px 14px;
	}

	.jogine-class-row {
		padding: 12px 16px;
		flex-wrap: wrap;
		gap: 10px;
	}

	/* On small screens, push the button to its own row */
	.jogine-class-row__action {
		width: 100%;
		margin-left: 0;
		order: 4;
	}

	.jogine-book-btn {
		width: 100%;
		min-height: 52px;
		font-size: 16px;
	}

	.jogine-auth-modal__dialog,
	.jogine-modal__dialog {
		padding: 24px 20px;
		border-radius: 12px;
	}

	.jogine-schedule__nav {
		justify-content: center;
	}
}

/* ==========================================================================
   My Account tab — Mano užsiėmimai
   ========================================================================== */

.jogine-account {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.jogine-account-section {
	background: #fff;
	border-radius: 8px;
	padding: 24px;
}

.jogine-account-section__heading {
	font-size: 16px;
	font-weight: 700;
	color: #222;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f0;
}

/* ── Pass card ───────────────────────────────────────────────────────────── */

.jogine-pass-card {
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 12px;
	background: #fafafa;
}

.jogine-pass-card:last-child {
	margin-bottom: 0;
}

.jogine-pass-card__name {
	font-size: 16px;
	font-weight: 600;
	color: #222;
	margin-bottom: 4px;
}

.jogine-pass-card__restriction {
	display: inline-block;
	font-size: 12px;
	background: #e8f0ec;
	color: #3d6849;
	border-radius: 10px;
	padding: 2px 8px;
	margin-bottom: 12px;
}

.jogine-pass-card__progress-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.jogine-progress-bar {
	flex: 1;
	height: 8px;
	background: #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}

.jogine-progress-bar__fill {
	height: 100%;
	background: #4a7c59;
	border-radius: 4px;
	transition: width 0.3s;
}

.jogine-pass-card__visits {
	font-size: 13px;
	color: #555;
	white-space: nowrap;
	flex-shrink: 0;
}

.jogine-pass-card__expiry {
	font-size: 14px;
	color: #666;
}

.jogine-account-no-pass,
.jogine-account-empty {
	font-size: 15px;
	color: #666;
	margin: 0;
}

.jogine-account-no-pass a,
.jogine-account-empty a {
	color: #4a7c59;
	text-decoration: underline;
}

/* ── Upcoming / history list ─────────────────────────────────────────────── */

.jogine-account-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jogine-account-list__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #f5f5f5;
}

.jogine-account-list__item:last-child {
	border-bottom: none;
}

.jogine-account-list__info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
	flex-wrap: wrap;
}

.jogine-account-list__date {
	font-size: 14px;
	color: #555;
	white-space: nowrap;
}

.jogine-account-list__time {
	font-size: 14px;
	color: #888;
	white-space: nowrap;
}

.jogine-account-list__class {
	font-size: 15px;
	font-weight: 500;
	color: #222;
}

/* Cancel button — WC `.button` provides base styles; we add sizing */
.jogine-cancel-booking-btn.button {
	min-height: 48px;
	padding: 0 16px;
	border-radius: 6px;
	font-size: 14px;
	white-space: nowrap;
	flex-shrink: 0;
	margin-left: auto;
}

/* History status indicators */
.jogine-status--confirmed {
	font-size: 14px;
	color: #4a7c59;
	font-weight: 600;
	white-space: nowrap;
	margin-left: auto;
	flex-shrink: 0;
}

.jogine-status--cancelled {
	font-size: 14px;
	color: #888;
	white-space: nowrap;
	margin-left: auto;
	flex-shrink: 0;
}

@media ( max-width: 600px ) {
	.jogine-account-section {
		padding: 16px;
	}

	.jogine-account-list__item {
		flex-wrap: wrap;
	}

	.jogine-cancel-booking-btn.button {
		width: 100%;
		margin-left: 0;
		margin-top: 8px;
		text-align: center;
		justify-content: center;
	}
}
