/* Laxmiloka Bookings — the JetAppointments dashboard.

   Deliberately the appointments panel's vocabulary under a different prefix: the
   two listings show the same rows at different scopes, and looking different
   would be a lie about that. The additions are the search field, the All tab and
   the Provider column. */

.lbk {
	--lbk-accent: #2271b1;
	--lbk-border: #e2e5e9;
	--lbk-text: #1d2327;
	--lbk-muted: #646970;
	--lbk-success: #1a7f37;
	--lbk-danger: #b32d2e;
	--lbk-edit: #2563eb;
	--lbk-radius: 8px;

	color: var(--lbk-text);
	font-family: "Figtree", sans-serif;
	font-size: 14px;
	line-height: 1.45;
}

.lbk,
.lbk *:not([class*="eicon-"]) {
	font-family: var(--lbk-font, "Figtree", sans-serif);
}

.lbk [hidden] {
	display: none !important;
}

/* ---- Toolbar ---- */

.lbk-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.lbk-search {
	position: relative;
	flex: 1 1 280px;
	min-width: 0;
}

.lbk-search__input {
	width: 100%;
	padding: 9px 34px 9px 12px;
	border: 1px solid var(--lbk-border);
	border-radius: var(--lbk-radius);
	background: #fff;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
}

.lbk-search__input:focus {
	outline: none;
	border-color: var(--lbk-accent);
	box-shadow: 0 0 0 1px var(--lbk-accent);
}

/* Ours is bound to the store, the browser's is not — two clear glyphs side by
   side would be one too many. */
.lbk-search__input::-webkit-search-cancel-button {
	display: none;
}

/* A div, not a button: Elementor styles bare <button> globally and this is a
   bare glyph. role="button" and Enter/Space come back via actions.onKey. */
.lbk-search__clear {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	color: var(--lbk-muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	user-select: none;
}

.lbk-search__clear:hover {
	color: var(--lbk-text);
}

.lbk-search__clear:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

/* ---- Period filter ---- */

.lbk-filter {
	display: inline-flex;
	flex: 0 0 auto;
	padding: 3px;
	border-radius: 999px;
}

.lbk-filter__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	border: 1px solid var(--e-global-color-4bd6cdc, var(--lbk-border));
	border-radius: 20px;
	background: none;
	color: var(--e-global-color-primary, var(--lbk-text));
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.15s ease, color 0.15s ease;
	margin-right: 8px;
}

.lbk-filter__btn:last-child {
	margin-right: 0;
}

.lbk-filter__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.lbk-filter__btn.is-active {
	background-color: var(--e-global-color-4bd6cdc, #e8e8e2);
	color: var(--e-global-color-primary, var(--lbk-text));
}

.lbk-filter__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	font-size: 12px;
	font-weight: 700;
}

.lbk-filter__btn.is-active .lbk-filter__count {
	background: var(--lbk-accent);
	color: #fff;
}

/* ---- Table ---- */

.lbk-table-wrap {
	overflow-x: auto;
	border-radius: var(--lbk-radius);
	transition: opacity 0.12s ease;
}

/*
 * A search in flight over rows that are already showing. Dimmed rather than
 * emptied: the rows on screen are still a true answer to the previous keystroke,
 * and blanking the table between them is the one thing that makes a search feel
 * broken.
 */
.lbk-table-wrap.is-busy {
	opacity: 0.55;
}

.lbk-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.lbk-table thead th {
	position: sticky;
	top: 0;
	text-align: left;
	padding: 11px 12px;
	background: #f6f7f8;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--lbk-muted);
	white-space: nowrap;
	border: none !important;
}

.lbk-row td {
	padding: 11px 12px;
	vertical-align: middle;
	transition: background-color 0.2s ease;
	border: none !important;
}

.lbk-row.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

/* ---- Provider cell ---- */

.lbk-cell-provider {
	min-width: 160px;
}

/* Doubled to outrank theme rules like `.entry-content a`, the same trick the
   navigator's own menu links need. */
.lbk .lbk-provider__name,
.lbk .lbk-provider__name:visited {
	display: block;
	color: var(--lbk-text);
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.lbk .lbk-provider__name:hover {
	color: var(--lbk-accent);
	text-decoration: underline;
}

.lbk .lbk-provider__email,
.lbk .lbk-provider__email:visited {
	display: block;
	color: var(--lbk-muted);
	font-size: 12.5px;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.lbk .lbk-provider__email:hover {
	color: var(--lbk-accent);
	text-decoration: underline;
}

/* ---- Other cells ---- */

.lbk-cell-service {
	font-weight: 600;
	min-width: 140px;
}

.lbk-cell-customer {
	min-width: 170px;
}

.lbk-customer__name {
	display: block;
	font-weight: 600;
}

.lbk-customer__email {
	display: block;
	font-size: 12.5px;
	color: var(--lbk-muted);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.lbk-customer__email:hover {
	color: var(--lbk-accent);
	text-decoration: underline;
}

.lbk-cell-week {
	text-align: center;
}

.lbk-week {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 24px;
	padding: 0 6px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.05);
	font-weight: 700;
	font-size: 12.5px;
}

.lbk-order {
	color: var(--lbk-accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.lbk-order:hover {
	text-decoration: underline;
}

.lbk-muted {
	color: var(--lbk-muted);
}

/* ---- Status pill ---- */

.lbk-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	color: var(--lbk-muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.lbk-status[data-status="confirmed"] {
	background: #e6f4ea;
	color: var(--lbk-success);
}

.lbk-status[data-status="processing"] {
	background: #fde7d6;
	color: #99551f;
}

.lbk-status[data-status="cancelled"],
.lbk-status[data-status="canceled"] {
	background: #fdeef0;
	color: var(--lbk-danger);
}

/* ---- Action icons ---- */

.lbk-col-actions {
	text-align: right;
	white-space: nowrap;
}

.lbk-actions {
	display: inline-flex;
	gap: 4px;
	justify-content: flex-end;
}

.lbk-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: none;
	cursor: pointer;
	user-select: none;
	line-height: 0;
	transition: opacity 0.15s ease, transform 0.1s ease;
}

/*
 * Colour is the whole vocabulary — no ring, no fill, and hover fades the glyph
 * rather than painting a chip behind it. One rule covers every icon.
 */
.lbk-icon:hover:not([aria-disabled="true"]) {
	background: none;
	opacity: 0.7;
}

.lbk-icon--confirm {
	color: var(--lbk-success);
}

.lbk-icon--cancel {
	color: var(--lbk-danger);
}

.lbk-icon--edit {
	color: var(--lbk-edit);
}

.lbk-icon--save {
	color: var(--lbk-success);
}

.lbk-icon:active:not([aria-disabled="true"]) {
	transform: scale(0.9);
}

/*
 * These controls are divs, so `:disabled` never matches — aria-disabled carries
 * the state instead. pointer-events is what actually stops the click; the store
 * also refuses to act, so this is defence in depth rather than the only guard.
 */
.lbk-icon[aria-disabled="true"] {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.lbk-icon:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.lbk-icon [class*="eicon-"] {
	font-size: 16px;
}

/* ---- Notes row (2nd row under each booking) ---- */

.lbk-notes-row td {
	padding: 0 12px 11px;
	border: none !important;
	border-bottom: 1px solid var(--lbk-border) !important;
	vertical-align: top;
}

.lbk-notes-row.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.lbk-notes {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
}

.lbk-notes__label {
	flex: 0 0 auto;
	margin-top: 5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 11px;
	color: var(--lbk-muted);
}

.lbk-notes__view {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1 1 auto;
	min-height: 32px;
}

.lbk-notes__text {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.lbk-notes__placeholder {
	color: var(--lbk-muted);
	font-style: italic;
}

.lbk-notes__edit {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	flex: 1 1 auto;
}

.lbk-notes__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 6px 9px;
	border: 1px solid var(--lbk-border);
	border-radius: 6px;
	font: inherit;
	font-size: 13px;
	line-height: 1.45;
	resize: vertical;
	background: #fff;
}

.lbk-notes__input:focus {
	outline: none;
	border-color: var(--lbk-accent);
	box-shadow: 0 0 0 1px var(--lbk-accent);
}

.lbk-notes__actions {
	display: inline-flex;
	gap: 4px;
	flex: 0 0 auto;
}

/* ---- Messages ---- */

.lbk-error {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 6px;
	border: 1px solid var(--lbk-danger);
	background: #fcf0f1;
	color: var(--lbk-danger);
}

.lbk-empty {
	padding: 28px;
	text-align: center;
	color: var(--lbk-muted);
	background: #f6f7f8;
	border: 1px dashed var(--lbk-border);
	border-radius: var(--lbk-radius);
}

@media (max-width: 720px) {
	.lbk-table {
		font-size: 13px;
	}

	.lbk-table thead th,
	.lbk-row td {
		padding: 9px 10px;
	}
}
