@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,600;1,600&family=Quicksand:wght@500;600;700&display=swap');

/* ==========================================================================
   Yoga for Heart — Attendance theme
   Re-skins the student attendance app to match the public site's "Gentle
   Healing" look: soft rose & blush, Quicksand headings + Nunito body,
   rounded and friendly.

   Strategy: this file re-defines the same CSS variable names the attend
   pages already use (--bg, --card, --ink, --muted, --blue, --green, --red,
   --accent, ...) but mapped to the rose palette, so existing markup adopts
   the new look automatically. It is linked AFTER each page's inline <style>,
   so it wins the cascade. Dark mode follows the operating system via
   prefers-color-scheme: no manual toggle.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens — light (default)
   -------------------------------------------------------------------------- */
:root {
	/* Surfaces */
	--bg:          #FDFBF9;   /* ivory */
	--card:        #ffffff;
	--card2:       #FDFBF9;
	--card-border: #E7D6D2;   /* line */
	--border:      #E7D6D2;
	--ink:         #3A2F32;   /* text */
	--text:        #3A2F32;
	--muted:       #6B5A5E;
	--header-bg:   rgba(253, 251, 249, 0.92);
	--btn-hover-bg:#F6E7E4;   /* blush */
	--input-bg:    #ffffff;
	--disabled:    #E7D6D2;

	/* Accents — the app's "blue" and "accent" become the site rose so
	   primary actions, active tabs and pills all read as on-brand. */
	--blue:         #A94E5E;  /* rose-deep */
	--blue-ink:     #ffffff;
	--blue-strong:  #8C3D4C;  /* rose-dark */
	--accent:       #A94E5E;  /* rose-deep */
	--green:        #CFE8D4;
	--green-ink:    #2E6B3A;
	--red:          #F1C7C7;
	--red-ink:      #9E2A2A;

	/* Site tokens (used by the reskinned chrome) */
	--ivory:     #FDFBF9;
	--blush:     #F6E7E4;
	--blush-deep:#EFD6D2;
	--rose:      #D69A9A;
	--rose-deep: #A94E5E;
	--rose-dark: #8C3D4C;
	--plum:      #4A343B;
	--heart-red: #C0392B;
	--line:      #E7D6D2;

	/* Type + shape */
	--font-head: 'Quicksand', system-ui, sans-serif;
	--font-body: 'Nunito', system-ui, -apple-system, sans-serif;
	--radius:    18px;
	--radius-sm: 12px;
	--shadow:    0 10px 30px rgba(74, 52, 59, 0.10);
	--shadow-sm: 0 4px 14px rgba(74, 52, 59, 0.08);
}

/* --------------------------------------------------------------------------
   Design tokens — dark
   Follows the operating system's appearance automatically (like the public
   site): light during the day, dark in the evening when the OS is set to
   Auto. No manual toggle — the OS is the single source of truth.
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
	:root {
		--bg:          #1a1416;
		--card:        #241a1d;
		--card2:       #2c2024;
		--card-border: #3a2c30;
		--border:      #3a2c30;
		--ink:         #ece0e2;
		--text:        #ece0e2;
		--muted:       #c3aeb2;
		--header-bg:   rgba(26, 20, 22, 0.92);
		--btn-hover-bg:#2c2024;
		--input-bg:    #2c2024;
		--disabled:    #3a2c30;

		--blue:         #e79aa6;
		--blue-ink:     #3a1f25;
		--blue-strong:  #f2b6c0;
		--accent:       #e79aa6;
		--green:        #23331f;
		--green-ink:    #9fd6a8;
		--red:          #4a2226;
		--red-ink:      #f0a8a8;

		--blush:     #2c2024;
		--blush-deep:#33282c;
		--rose:      #d99ea0;
		--rose-deep: #e79aa6;
		--rose-dark: #f2b6c0;
		--plum:      #f4e6e8;
		--line:      #3a2c30;
	}
}

/* --------------------------------------------------------------------------
   Base typography — match the public site
   -------------------------------------------------------------------------- */
body {
	font-family: var(--font-body) !important;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	line-height: 1.6;
}

h1, h2, h3, h4 {
	font-family: var(--font-head);
	color: var(--plum);
}

a { color: var(--rose-deep); }
a:hover { color: var(--rose-dark); }

:focus-visible {
	outline: 3px solid var(--rose-deep);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Header / nav — matches yoga4heart.com exactly (logo left, nav right,
   hamburger on mobile). Markup: partials/header.php
   -------------------------------------------------------------------------- */
.site-header {
	display: block;
	padding: 0;
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--header-bg);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header .container {
	width: min(100% - 2.5rem, var(--container, 1120px));
	margin-inline: auto;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.6rem 0;
	min-height: 3.6rem;
	box-sizing: border-box;
}
.site-header .brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--plum);
}
.site-header .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.site-header .brand-name { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 1.9rem; color: var(--plum); }
.site-header .brand-name em { color: var(--rose-deep); font-style: italic; font-weight: inherit; }

.primary-nav ul {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.primary-nav a {
	display: block;
	padding: 0.6rem 0.9rem;
	border-radius: 999px;
	color: var(--ink, var(--text, #3A2F32));
	text-decoration: none;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 1rem;
}
.primary-nav a:hover { background: var(--blush); color: var(--plum); }
.primary-nav a[aria-current="page"] { color: var(--rose-deep); background: var(--blush); }
.nav-cta a {
	background: var(--btn-bg, #D69A9A);
	color: var(--btn-fg, #4A343B);
	margin-left: 0.35rem;
}
.nav-cta a:hover { background: var(--btn-hover-bg, #C98A8A); color: var(--btn-fg, #4A343B); }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 48px;
	height: 48px;
	background: transparent;
	border: 2px solid var(--line);
	border-radius: 12px;
	cursor: pointer;
}
.nav-toggle-bar {
	display: block;
	width: 22px;
	height: 2px;
	margin-inline: auto;
	background: var(--plum);
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
	.nav-toggle { display: flex; }
	.primary-nav {
		position: absolute;
		left: 0; right: 0; top: 100%;
		background: var(--surface, var(--bg, #ffffff));
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow, 0 10px 30px rgba(74, 52, 59, 0.10));
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.28s ease;
	}
	.primary-nav.open { max-height: 32rem; }
	.primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem; }
	.primary-nav a { padding: 0.9rem 1rem; border-radius: var(--radius-sm, 12px); font-size: 1.1rem; }
	.nav-cta a { margin: 0.35rem 0 0; text-align: center; }
}

/* --------------------------------------------------------------------------
   Cards, sections, separators
   -------------------------------------------------------------------------- */
.card,
.account-card {
	background: var(--card) !important;
	border: 1px solid var(--card-border) !important;
	border-radius: var(--radius) !important;
	box-shadow: var(--shadow-sm);
}
.section-head,
.page-title,
.date {
	font-family: var(--font-head);
	color: var(--plum);
}
.section-head { color: var(--muted); }
.sep { background: var(--card-border); border-color: var(--card-border); }

/* --------------------------------------------------------------------------
   Buttons — rounded, rose-forward. Keep in-person / zoom / cancel distinct.
   -------------------------------------------------------------------------- */
.btn { font-family: var(--font-head); }

/* Attend in person — soft sage */
.btn-green {
	background: rgba(46, 107, 58, 0.12) !important;
	color: var(--green-ink) !important;
	border: 1px solid rgba(46, 107, 58, 0.3) !important;
}
.btn-green:hover { background: rgba(46, 107, 58, 0.18) !important; }

/* Attend via Zoom — rose-filled primary */
.btn-blue {
	background: var(--rose-deep) !important;
	color: #fff !important;
	border: 1px solid var(--rose-deep) !important;
}
.btn-blue:hover {
	background: var(--rose-dark) !important;
	border-color: var(--rose-dark) !important;
}

/* Cancel — soft red */
.btn-red {
	background: rgba(192, 57, 43, 0.12) !important;
	color: var(--heart-red) !important;
	border: 1px solid rgba(192, 57, 43, 0.3) !important;
	font-weight: 700;
}
.btn-red:hover { background: rgba(192, 57, 43, 0.18) !important; }

@media (prefers-color-scheme: dark) {
	.btn-green {
		background: rgba(159, 214, 168, 0.14) !important;
		color: #9fd6a8 !important;
		border-color: rgba(159, 214, 168, 0.3) !important;
	}
	.btn-blue {
		background: var(--rose-deep) !important;
		color: #3a1f25 !important;
		border-color: var(--rose-deep) !important;
	}
	.btn-red {
		background: rgba(240, 168, 168, 0.16) !important;
		color: #f0a8a8 !important;
		border-color: rgba(240, 168, 168, 0.35) !important;
	}
}

/* Disabled buttons follow the palette (not hard white) */
.btn:disabled {
	background: var(--card) !important;
	color: var(--muted) !important;
	border-color: var(--disabled) !important;
}

/* Settings "Change PIN" pill */
.btn.blue {
	background: var(--rose-deep) !important;
	color: #fff !important;
	border-color: var(--rose-deep) !important;
	border-radius: 999px;
}
.btn.blue:hover { background: var(--rose-dark) !important; }

/* --------------------------------------------------------------------------
   Spots-remaining pill / attend box (classes page)
   -------------------------------------------------------------------------- */
.spots-remaining {
	background: var(--blush) !important;
	color: var(--rose-deep) !important;
}
.attend-box {
	background: var(--blush) !important;
	border: 1px solid var(--blush-deep) !important;
}
.badge {
	border: 1px solid var(--line);
	background: var(--card2);
	color: var(--muted);
}

/* --------------------------------------------------------------------------
   Inputs
   -------------------------------------------------------------------------- */
.input,
input[type="text"], input[type="password"], input[type="number"], input[type="tel"],
select, textarea {
	border-radius: var(--radius-sm);
	border: 1px solid var(--card-border);
	background: var(--input-bg);
	color: var(--ink);
	font-family: var(--font-body);
}
.input:focus,
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--rose);
	box-shadow: 0 0 0 3px rgba(169, 78, 94, 0.15);
}

/* Login PIN boxes */
.pin input {
	background: var(--input-bg);
	color: var(--ink);
	border: 1px solid var(--card-border);
	border-radius: var(--radius-sm);
}
.pin input:focus { border-color: var(--rose); }

/* --------------------------------------------------------------------------
   Status pills / flash banners
   -------------------------------------------------------------------------- */
.status.active {
	background: rgba(46, 107, 58, 0.12) !important;
	color: #2E6B3A !important;
	border-color: rgba(46, 107, 58, 0.28) !important;
}
.status.inactive {
	background: rgba(107, 90, 94, 0.12) !important;
	color: var(--muted) !important;
	border-color: rgba(107, 90, 94, 0.28) !important;
}
.flash.success {
	border: 1px solid #CDE6D2 !important;
	background: #E4F1E6 !important;
	color: #2E6B3A !important;
	border-radius: var(--radius-sm);
}
.flash.error {
	border: 1px solid #F1C7C7 !important;
	background: #FBE4E4 !important;
	color: #9E2A2A !important;
	border-radius: var(--radius-sm);
}
.err { color: #9E2A2A; }

/* --------------------------------------------------------------------------
   Login screen submit button + subhead
   -------------------------------------------------------------------------- */
button[form="login-form"],
.card button[type="submit"] {
	background: var(--rose-deep) !important;
	color: #fff !important;
	border-radius: 999px !important;
	font-family: var(--font-head);
	font-weight: 700;
}
button[form="login-form"]:hover,
.card button[type="submit"]:hover { background: var(--rose-dark) !important; }
.subhead { color: var(--muted); font-family: var(--font-head); }

/* --------------------------------------------------------------------------
   Footer (partials/footer.php)
   -------------------------------------------------------------------------- */
footer {
	color: var(--muted);
	border-top: 1px solid var(--line);
}
footer a { color: var(--rose-deep); }
