/* =========================================================================
   Luxe Core — My Account (front-end bookings dashboard)
   Self-contained tokens so it renders correctly with or without the theme.
   ========================================================================= */

.luxe-acc {
	--la-bg: oklch(0.13 0.02 260);
	--la-card: oklch(0.17 0.025 260);
	--la-card-2: oklch(0.2 0.025 260);
	--la-fg: oklch(0.98 0.005 250);
	--la-muted: oklch(0.75 0.02 255);
	--la-primary: oklch(0.62 0.24 263);
	--la-primary-fg: oklch(0.99 0 0);
	--la-border: oklch(0.32 0.03 260 / 70%);
	--la-input: oklch(0.25 0.03 260);
	--la-radius: 0.85rem;
	--la-ok: oklch(0.7 0.17 150);
	--la-warn: oklch(0.78 0.15 80);
	--la-danger: oklch(0.65 0.22 25);

	color: var(--la-fg);
	font-family: "Inter", system-ui, sans-serif;
	width: 100%;
}

/* ---------- Spinner ---------- */
.luxe-acc-spinner,
.luxe-acc__spinner {
	display: inline-block;
	width: 1.05rem;
	height: 1.05rem;
	border: 2px solid oklch(1 0 0 / 25%);
	border-top-color: var(--la-primary);
	border-radius: 50%;
	animation: luxe-acc-spin 0.7s linear infinite;
	vertical-align: -0.2em;
	margin-right: 0.5rem;
	flex-shrink: 0;
}
@keyframes luxe-acc-spin { to { transform: rotate(360deg); } }

.luxe-acc__boot {
	display: flex; align-items: center; justify-content: center;
	color: var(--la-muted); padding: 4rem 1rem;
}

/* ---------- Buttons ---------- */
.luxe-acc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
	border-radius: 9999px; padding: 0.6rem 1.15rem;
	font-size: 0.85rem; font-weight: 600; font-family: inherit;
	cursor: pointer; border: 1px solid transparent; text-decoration: none;
	transition: opacity 0.15s, background-color 0.15s, border-color 0.15s;
	line-height: 1;
}
.luxe-acc-btn--primary { background: var(--la-primary); color: var(--la-primary-fg); }
.luxe-acc-btn--primary:hover { opacity: 0.9; }
.luxe-acc-btn--ghost { background: transparent; border-color: var(--la-border); color: var(--la-fg); }
.luxe-acc-btn--ghost:hover { border-color: var(--la-primary); }
.luxe-acc-btn--danger { background: transparent; border-color: oklch(0.65 0.22 25 / 55%); color: oklch(0.8 0.15 25); }
.luxe-acc-btn--danger:hover { background: oklch(0.65 0.22 25 / 12%); }
.luxe-acc-btn--sm { padding: 0.42rem 0.85rem; font-size: 0.78rem; }
.luxe-acc-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.luxe-acc :focus-visible { outline: 2px solid var(--la-primary); outline-offset: 2px; border-radius: 4px; }

/* ---------- Login ---------- */
.luxe-acc--login {
	display: flex; justify-content: center; align-items: center;
	min-height: calc(100vh - 7rem); padding: 1rem 0 2rem;
}
.luxe-acc-login {
	width: 100%; max-width: 24rem;
	background: var(--la-card); border: 1px solid var(--la-border);
	border-radius: 1.1rem; padding: 2rem;
	text-align: center;
}
.luxe-acc-login #loginform,
.luxe-acc-login .luxe-acc-alert { text-align: left; }

/* Logo above the form (this page has no site header).
   Capped on BOTH axes so any logo shape (wide wordmark or square) fits. */
.luxe-acc-login__logo { display: block; margin: 0 auto 2.5rem; text-decoration: none; }
.luxe-acc-login__logo img {
	display: block; margin: 0 auto;
	width: auto; height: auto;
	max-height: 55px; max-width: 198px;
}
.luxe-acc-login__wordmark {
	font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 700;
	font-size: 1.25rem; letter-spacing: 0.06em; color: var(--la-fg);
}

.luxe-acc-login__title { font-family: "Space Grotesk", "Inter", sans-serif; font-size: 1.5rem; font-weight: 700; margin: 0 0 0.4rem; }
.luxe-acc-login__lead { color: var(--la-muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.luxe-acc-login #loginform p { margin: 0 0 1rem; }
.luxe-acc-login #loginform label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; }
.luxe-acc-login #loginform input[type="text"],
.luxe-acc-login #loginform input[type="password"] {
	width: 100%; background: var(--la-input); border: 1px solid var(--la-border);
	border-radius: 0.6rem; color: var(--la-fg); padding: 0.7rem 0.85rem;
	font-size: 0.92rem; font-family: inherit;
}
.luxe-acc-login #loginform .login-remember label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; color: var(--la-muted); }
.luxe-acc-login #loginform .login-remember input { width: auto; }
.luxe-acc-login #loginform input[type="submit"] {
	width: 100%; background: var(--la-primary); color: var(--la-primary-fg);
	border: none; border-radius: 9999px; padding: 0.75rem 1rem;
	font-weight: 600; font-size: 0.9rem; cursor: pointer; font-family: inherit;
}
.luxe-acc-login__lost { display: block; margin-top: 1rem; text-align: center; color: var(--la-muted); font-size: 0.8rem; }
.luxe-acc-login__lost:hover { color: var(--la-fg); }
.luxe-acc-alert { padding: 0.7rem 0.9rem; border-radius: 0.6rem; font-size: 0.85rem; margin-bottom: 1rem; }
.luxe-acc-alert--error { background: oklch(0.65 0.22 25 / 12%); border: 1px solid oklch(0.65 0.22 25 / 40%); color: oklch(0.85 0.14 25); }

/* ---------- Top bar ---------- */
.luxe-acc-top {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 1rem; margin-bottom: 1.5rem;
}
.luxe-acc-top__brand { display: flex; align-items: center; gap: 1rem; }
.luxe-acc-top__logo { display: block; flex-shrink: 0; }
.luxe-acc-top__logo img { display: block; width: auto; height: auto; max-height: 44px; max-width: 160px; }
.luxe-acc-top__title { font-family: "Space Grotesk", "Inter", sans-serif; font-size: 1.6rem; font-weight: 700; margin: 0; }
.luxe-acc-top__user { color: var(--la-muted); font-size: 0.85rem; }
.luxe-acc-top__actions { display: flex; align-items: center; gap: 0.5rem; }

/* ---------- Section nav (Bookings / Services / Staff) ---------- */
.luxe-acc-nav {
	display: flex; gap: 0.25rem; margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--la-border); flex-wrap: wrap;
}
.luxe-acc-nav__item {
	background: none; border: none; border-bottom: 2px solid transparent;
	color: var(--la-muted); font-family: inherit; font-size: 0.92rem; font-weight: 600;
	padding: 0.7rem 1.1rem; cursor: pointer; margin-bottom: -1px;
}
.luxe-acc-nav__item:hover { color: var(--la-fg); }
.luxe-acc-nav__item.is-active { color: var(--la-fg); border-bottom-color: var(--la-primary); }

/* ---------- Section bar (hint + add button) ---------- */
.luxe-acc-sectionbar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 0.75rem; margin-bottom: 1.25rem;
}
.luxe-acc-hint { color: var(--la-muted); font-size: 0.82rem; margin: 0; }

/* ---------- Generic item row (services + staff) ---------- */
.luxe-acc-item {
	background: var(--la-card); border: 1px solid var(--la-border);
	border-radius: var(--la-radius); margin-bottom: 0.6rem; overflow: hidden;
	transition: border-color 0.15s;
}
.luxe-acc-item:hover { border-color: oklch(0.62 0.24 263 / 45%); }
.luxe-acc-item.is-editing { border-color: var(--la-primary); }

/* Inline "new item" draft form, pinned to the top of the list. */
.luxe-acc-item--new { border-color: var(--la-primary); border-style: dashed; }
.luxe-acc-item--new .luxe-acc-item__order,
.luxe-acc-item--new .luxe-acc-avatar { color: var(--la-primary); font-size: 1.1rem; }

/* Brief highlight so a just-created item is easy to spot. */
.luxe-acc-item.is-flash { animation: luxe-acc-flash 1.6s ease-out; }
@keyframes luxe-acc-flash {
	0%, 30% { border-color: var(--la-primary); background: oklch(0.62 0.24 263 / 12%); }
	100% { border-color: var(--la-border); background: var(--la-card); }
}
.luxe-acc-item__main { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1.1rem; }
.luxe-acc-item__order {
	display: inline-flex; align-items: center; justify-content: center;
	width: 1.85rem; height: 1.85rem; flex-shrink: 0;
	border-radius: 9999px; background: var(--la-card-2);
	font-size: 0.78rem; font-weight: 700; color: var(--la-muted);
}
.luxe-acc-item__body { flex: 1; min-width: 0; }
.luxe-acc-item__title { font-weight: 600; font-size: 0.95rem; }
.luxe-acc-item__sub { color: var(--la-muted); font-size: 0.78rem; margin-top: 0.15rem; }
.luxe-acc-item__actions { display: flex; align-items: center; gap: 0.35rem; flex-shrink: 0; }
.luxe-acc-iconbtn {
	width: 1.9rem; height: 1.9rem; border-radius: 0.45rem;
	border: 1px solid var(--la-border); background: transparent; color: var(--la-fg);
	cursor: pointer; font-size: 0.6rem; line-height: 1; font-family: inherit;
}
.luxe-acc-iconbtn:hover:not([disabled]) { border-color: var(--la-primary); }
.luxe-acc-iconbtn[disabled] { opacity: 0.3; cursor: not-allowed; }
.luxe-acc-avatar {
	display: inline-flex; align-items: center; justify-content: center;
	width: 2.2rem; height: 2.2rem; flex-shrink: 0;
	border-radius: 9999px; background: oklch(0.62 0.24 263 / 15%);
	color: var(--la-primary); font-weight: 700; font-size: 0.8rem;
	border: 1px solid oklch(0.62 0.24 263 / 35%);
}

/* ---------- Tabs + search ---------- */
.luxe-acc-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.luxe-acc-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.luxe-acc-tab {
	background: var(--la-card); border: 1px solid var(--la-border); color: var(--la-muted);
	border-radius: 9999px; padding: 0.45rem 0.95rem; font-size: 0.82rem; font-weight: 600;
	cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 0.4rem;
}
.luxe-acc-tab:hover { border-color: var(--la-primary); color: var(--la-fg); }
.luxe-acc-tab.is-active { background: var(--la-primary); border-color: var(--la-primary); color: var(--la-primary-fg); }
.luxe-acc-tab__count {
	background: oklch(1 0 0 / 15%); border-radius: 9999px;
	padding: 0.05rem 0.4rem; font-size: 0.72rem;
}
.luxe-acc-search {
	background: var(--la-card); border: 1px solid var(--la-border); border-radius: 9999px;
	color: var(--la-fg); padding: 0.55rem 1rem; font-size: 0.85rem; min-width: 15rem;
	font-family: inherit; outline: none; flex: 1; max-width: 22rem;
}
.luxe-acc-search:focus { border-color: var(--la-primary); }

/* ---------- Day groups ---------- */
.luxe-acc-day { margin-bottom: 2rem; }
.luxe-acc-day__head {
	display: flex; align-items: baseline; gap: 0.75rem;
	padding-bottom: 0.6rem; margin-bottom: 0.85rem;
	border-bottom: 1px solid var(--la-border);
}
.luxe-acc-day__title { font-family: "Space Grotesk", "Inter", sans-serif; font-size: 1.15rem; font-weight: 700; margin: 0; }
.luxe-acc-day__title.is-today { color: var(--la-primary); }
.luxe-acc-day__count { color: var(--la-muted); font-size: 0.78rem; }

/* ---------- Booking row ---------- */
.luxe-acc-row {
	background: var(--la-card); border: 1px solid var(--la-border);
	border-radius: var(--la-radius); margin-bottom: 0.7rem; overflow: hidden;
	transition: border-color 0.15s;
}
.luxe-acc-row:hover { border-color: oklch(0.62 0.24 263 / 45%); }
.luxe-acc-row.is-editing { border-color: var(--la-primary); }
.luxe-acc-row.is-cancelled { opacity: 0.55; }

.luxe-acc-row__main {
	display: grid; align-items: center; gap: 0.75rem;
	grid-template-columns: 6.5rem 1.4fr 1fr 1.6fr auto auto;
	padding: 0.9rem 1.1rem;
}
.luxe-acc-row__time { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 0.95rem; }
.luxe-acc-row__time small { display: block; color: var(--la-muted); font-size: 0.7rem; font-weight: 400; font-family: "Inter", sans-serif; }
.luxe-acc-row__service { font-weight: 600; font-size: 0.9rem; }
.luxe-acc-row__service small { display: block; color: var(--la-muted); font-size: 0.75rem; font-weight: 400; }
.luxe-acc-row__staff, .luxe-acc-row__addr { color: var(--la-muted); font-size: 0.85rem; }
.luxe-acc-row__addr { overflow: hidden; text-overflow: ellipsis; }
.luxe-acc-row__actions { display: flex; gap: 0.4rem; }

.luxe-acc-badge {
	display: inline-block; padding: 0.2rem 0.6rem; border-radius: 9999px;
	font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
	white-space: nowrap;
}
.luxe-acc-badge--pending { background: oklch(0.78 0.15 80 / 18%); color: oklch(0.85 0.14 80); }
.luxe-acc-badge--confirmed { background: oklch(0.7 0.17 150 / 18%); color: oklch(0.82 0.15 150); }
.luxe-acc-badge--completed { background: oklch(0.62 0.24 263 / 18%); color: oklch(0.8 0.14 263); }
.luxe-acc-badge--cancelled { background: oklch(0.65 0.22 25 / 18%); color: oklch(0.82 0.14 25); }

.luxe-acc-row__meta {
	display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
	padding: 0 1.1rem 0.9rem; color: var(--la-muted); font-size: 0.78rem;
}
.luxe-acc-row__meta strong { color: var(--la-fg); font-weight: 600; }

/* ---------- Inline edit form ---------- */
.luxe-acc-edit {
	border-top: 1px solid var(--la-border);
	background: oklch(0.15 0.022 260);
	padding: 1.1rem;
}
.luxe-acc-edit__grid { display: grid; gap: 0.85rem; grid-template-columns: 1fr; }
.luxe-acc-field { display: flex; flex-direction: column; gap: 0.3rem; }
.luxe-acc-field label { font-size: 0.75rem; font-weight: 600; color: var(--la-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.luxe-acc-field input,
.luxe-acc-field select,
.luxe-acc-field textarea {
	background: var(--la-input); border: 1px solid var(--la-border); border-radius: 0.55rem;
	color: var(--la-fg); padding: 0.55rem 0.75rem; font-size: 0.88rem; font-family: inherit; width: 100%;
}
.luxe-acc-field input:focus,
.luxe-acc-field select:focus,
.luxe-acc-field textarea:focus { border-color: var(--la-primary); outline: none; }
.luxe-acc-field textarea { resize: vertical; min-height: 3.5rem; }
.luxe-acc-field--wide { grid-column: 1 / -1; }

.luxe-acc-edit__foot {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 0.75rem; margin-top: 1.1rem;
}
.luxe-acc-edit__left { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.luxe-acc-notify { display: flex; align-items: center; gap: 0.45rem; color: var(--la-muted); font-size: 0.78rem; cursor: pointer; }
.luxe-acc-edit__err { color: oklch(0.82 0.14 25); font-size: 0.8rem; }

/* ---------- Empty + toast ---------- */
.luxe-acc-empty {
	text-align: center; color: var(--la-muted); padding: 3rem 1rem;
	border: 1px dashed var(--la-border); border-radius: var(--la-radius);
}
.luxe-acc-toast {
	position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(1rem);
	background: var(--la-card-2); border: 1px solid var(--la-border);
	color: var(--la-fg); padding: 0.7rem 1.2rem; border-radius: 9999px;
	font-size: 0.85rem; font-weight: 600; z-index: 9999;
	box-shadow: 0 12px 40px -12px oklch(0 0 0 / 70%);
	opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.luxe-acc-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Colour-coded by action: created = green, edited = blue, deleted = red. */
.luxe-acc-toast--success {
	background: oklch(0.55 0.17 150);
	border-color: oklch(0.65 0.18 150);
	color: oklch(0.99 0 0);
}
.luxe-acc-toast--info {
	background: oklch(0.55 0.22 263);
	border-color: oklch(0.65 0.22 263);
	color: oklch(0.99 0 0);
}
.luxe-acc-toast--danger {
	background: oklch(0.53 0.21 25);
	border-color: oklch(0.63 0.22 25);
	color: oklch(0.99 0 0);
}

/* ---------- Responsive ---------- */
@media (min-width: 700px) {
	.luxe-acc-edit__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
	.luxe-acc-row__main {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"time status"
			"service actions"
			"staff staff"
			"addr addr";
		gap: 0.4rem 0.75rem;
	}
	.luxe-acc-row__time { grid-area: time; }
	.luxe-acc-row__service { grid-area: service; }
	.luxe-acc-row__staff { grid-area: staff; }
	.luxe-acc-row__addr { grid-area: addr; white-space: normal; }
	.luxe-acc-row__status { grid-area: status; justify-self: end; }
	.luxe-acc-row__actions { grid-area: actions; justify-self: end; }
	.luxe-acc-search { max-width: none; }
}
