/* Laxmiloka Appointments Listing */

.lal {
	--lal-accent: #2271b1;
	--lal-border: #e2e5e9;
	--lal-text: #1d2327;
	--lal-muted: #646970;
	--lal-success: #1a7f37;
	--lal-danger: #b32d2e;
	--laxmi-edit: #2563eb;
	--lal-radius: 8px;

	color: var(--lal-text);
	font-family: "Figtree", sans-serif;
	font-size: 14px;
	line-height: 1.45;
}

.lal,
.lal *:not([class*="eicon-"]) {
	font-family: var(--lal-font, "Figtree", sans-serif);
}

.lal [hidden] {
	display: none !important;
}

/* The .is-ready gate and its skeleton were dropped in the merge: hiding the
   whole listing until JS hydrated turned every transient hydration hiccup into
   a blank panel. The markup is server-rendered, so it is visible from the
   start. */

/* ---- Toolbar / filter ---- */

.lal-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 14px;
}

.lal-filter {
	display: inline-flex;
	padding: 3px;
	background: #f1f3f5;
	border-radius: 999px;
}

/*
 * A div, not a button — so none of Elementor's global button rules apply and
 * every !important that used to be needed here is gone.
 */
.lal-filter__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	border: 1px solid var(--e-global-color-4bd6cdc);
	border-radius: 20px;
	background: none;
	color: var(--e-global-color-primary);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.15s ease, color 0.15s ease;
	margin-right: 10px;
}

.lal-filter__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.lal-filter__btn.is-active {
	background-color: var(--e-global-color-4bd6cdc);
	color: var(--e-global-color-primary);
}

.lal-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;
}

.lal-filter__btn.is-active .lal-filter__count {
	background: var(--lal-accent);
	color: #fff;
}

/* ---- Table ---- */

.lal-table-wrap {
	overflow-x: auto;
	border-radius: var(--lal-radius);
}

.lal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.lal-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(--lal-muted);
	white-space: nowrap;
	border: none !important;
}

.lal-row td {
	padding: 11px 12px;
	vertical-align: middle;
	transition: background-color 0.2s ease;
	border: none !important;
}

.lal-row.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.lal-cell-service {
	font-weight: 600;
	min-width: 140px;
}

.lal-cell-customer {
	min-width: 170px;
}

.lal-customer__name {
	display: block;
	font-weight: 600;
}

.lal-customer__email {
	display: block;
	font-size: 12.5px;
	color: var(--lal-muted);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.lal-customer__email:hover {
	color: var(--lal-accent);
	text-decoration: underline;
}

.lal-cell-week {
	text-align: center;
}

.lal-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;
}

.lal-order {
	color: var(--lal-accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.lal-order:hover {
	text-decoration: underline;
}

.lal-muted {
	color: var(--lal-muted);
}

/* ---- Status pill ---- */

.lal-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	color: var(--lal-muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.lal-status[data-status="confirmed"] {
	background: #e6f4ea;
	color: var(--lal-success);
}

.lal-status[data-status="processing"] {
	background: #fde7d6;
	color: #99551f;
}

.lal-status[data-status="cancelled"],
.lal-status[data-status="canceled"] {
	background: #fdeef0;
	color: var(--lal-danger);
}

/* ---- Action icons ---- */

.lal-col-actions {
	text-align: right;
	white-space: nowrap;
}

.lal-actions {
	display: inline-flex;
	gap: 4px;
	justify-content: flex-end;
}

.lal-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.
 */
.lal-icon:hover:not([aria-disabled="true"]) {
	background: none;
	opacity: 0.7;
}

.lal-icon--confirm {
	color: var(--lal-success);
}

.lal-icon--cancel {
	color: var(--lal-danger);
}

.lal-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.
 */
.lal-icon[aria-disabled="true"] {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.lal-icon:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.lal-icon--edit {
	color: var(--laxmi-edit);
}

.lal-icon--save {
	color: var(--lal-success);
}

.lal-icon [class*="eicon-"] {
	font-size: 16px;
}

/* ---- Notes row (2nd row under each appointment) ---- */

.lal-notes-row td {
	padding: 0 12px 11px;
	border: none !important;
	border-bottom: 1px solid var(--lal-border) !important;
	vertical-align: top;
}

.lal-notes-row.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.lal-notes {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
}

.lal-notes__label {
	flex: 0 0 auto;
	margin-top: 5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 11px;
	color: var(--lal-muted);
}

.lal-notes__view {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1 1 auto;
	min-height: 32px;
}

.lal-notes__text {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.lal-notes__placeholder {
	color: var(--lal-muted);
	font-style: italic;
}

.lal-notes__edit {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	flex: 1 1 auto;
}

.lal-notes__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 6px 9px;
	border: 1px solid var(--lal-border);
	border-radius: 6px;
	font: inherit;
	font-size: 13px;
	line-height: 1.45;
	resize: vertical;
	background: #fff;
}

.lal-notes__input:focus {
	outline: none;
	border-color: var(--lal-accent);
	box-shadow: 0 0 0 1px var(--lal-accent);
}

.lal-notes__actions {
	display: inline-flex;
	gap: 4px;
	flex: 0 0 auto;
}

/* ---- Messages ---- */

.lal-error {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 6px;
	border: 1px solid var(--lal-danger);
	background: #fcf0f1;
	color: var(--lal-danger);
}

.lal-empty {
	padding: 28px;
	text-align: center;
	color: var(--lal-muted);
	background: #f6f7f8;
	border: 1px dashed var(--lal-border);
	border-radius: var(--lal-radius);
}

@media (max-width: 720px) {
	.lal-table {
		font-size: 13px;
	}

	.lal-table thead th,
	.lal-row td {
		padding: 9px 10px;
	}
}