/* ==========================================================================
   Math Rescue — Premium Client Portal Skin
   Restyles the LatePoint customer cabinet in place (no engine changes).
   Scope: everything lives under .latepoint-w / .latepoint-lightbox-w.
   Brand: navy #0a2342 · gold #ffd100 · cream paper · Marcellus + Inter
   ========================================================================== */

:root {
	--mr-navy: #0a2342;
	--mr-navy-soft: #24405f;
	--mr-gold: #ffd100;
	--mr-gold-deep: #e6b800;
	--mr-paper: #fdfbf7;
	--mr-paper-edge: #eee8da;
	--mr-ink: #22303f;
	--mr-ink-soft: #5c6b7c;
	--mr-serif: 'Marcellus', Georgia, serif;
	--mr-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- The panel: a warm paper card on the dark site canvas ----------
   IMPORTANT: LatePoint's modal wrapper is `.latepoint-lightbox-w.latepoint-w`
   (one element, both classes) positioned fixed as an overlay. The :not()
   below keeps the panel treatment OFF the lightbox — without it the overlay
   collapses into the page flow and modals render below the footer. */

body .latepoint-w:not(.latepoint-lightbox-w) {
	position: relative;
	max-width: 1160px;
	margin: 48px auto 72px;
	padding: 44px 48px 56px;
	background: linear-gradient(168deg, #ffffff 0%, var(--mr-paper) 55%, #f7f1e3 100%);
	border-radius: 30px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 2px 0 rgba(255, 255, 255, .06) inset;
	font-family: var(--mr-sans);
	color: var(--mr-ink);
}

/* A .latepoint-w nested INSIDE the cabinet (e.g. the booking form rendered in
   the New Appointment tab) must not get the panel treatment either. */
body .latepoint-w .latepoint-w {
	position: static;
	max-width: none;
	margin: 0;
	padding: 0;
	background: none;
	border-radius: 0;
	box-shadow: none;
}
body .latepoint-w .latepoint-w > h4::before { content: none; }
body .latepoint-w .latepoint-w > a:first-child { position: static; border: none; background: none; padding: 0; }

/* ---------- Header: kicker + serif welcome, tucked-away logout ---------- */

body .latepoint-w:not(.latepoint-lightbox-w) > a:first-child {
	position: absolute;
	top: 30px;
	right: 34px;
	font: 600 11px/1 var(--mr-sans);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--mr-ink-soft);
	text-decoration: none;
	padding: 9px 16px;
	border: 1px solid var(--mr-paper-edge);
	border-radius: 999px;
	background: #fff;
	transition: all .18s ease;
}
body .latepoint-w:not(.latepoint-lightbox-w) > a:first-child:hover {
	color: var(--mr-navy);
	border-color: var(--mr-navy);
}

body .latepoint-w:not(.latepoint-lightbox-w) > h4 {
	margin: 0 0 30px;
	font: 400 clamp(30px, 4vw, 42px)/1.08 var(--mr-serif);
	color: var(--mr-navy);
	letter-spacing: .01em;
}
body .latepoint-w:not(.latepoint-lightbox-w) > h4::before {
	content: 'Client Portal';
	display: block;
	margin-bottom: 12px;
	font: 700 11px/1 var(--mr-sans);
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--mr-gold-deep);
}

/* ---------- Tabs: segmented pill control ---------- */

body .latepoint-w .latepoint-tab-triggers.customer-dashboard-tabs {
	display: flex;
	gap: 4px;
	padding: 6px 10px; /* symmetric air on both ends of the pill bar */
	margin: 0 0 34px;
	background: #f0ebdf;
	border-radius: 999px;
	width: max-content;
	max-width: 100%;
	overflow-x: auto;
	border: none;
	scrollbar-width: none;
}
body .latepoint-w .latepoint-tab-triggers.customer-dashboard-tabs::-webkit-scrollbar { display: none; }

body .latepoint-w .customer-dashboard-tabs .latepoint-tab-trigger {
	margin: 0 !important; /* kill front.css trigger margins that skewed the bar's balance */
	font: 600 12.5px/1 var(--mr-sans);
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--mr-ink-soft);
	text-decoration: none;
	padding: 11px 20px;
	border-radius: 999px;
	border: none;
	white-space: nowrap;
	transition: all .18s ease;
}
body .latepoint-w .customer-dashboard-tabs .latepoint-tab-trigger:hover {
	color: var(--mr-navy);
	background: rgba(255, 255, 255, .7);
}
body .latepoint-w .customer-dashboard-tabs .latepoint-tab-trigger.active {
	color: #fff;
	background: var(--mr-navy);
	box-shadow: 0 4px 12px rgba(10, 35, 66, .35);
}

/* ---------- Timezone selector: quiet, right-aligned ---------- */

body .latepoint-w .latepoint-customer-timezone-selector-w {
	display: flex;
	justify-content: flex-end;
	margin: -6px 0 18px;
}
body .latepoint-w .latepoint-customer-timezone-selector-w .os-form-group {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}
body .latepoint-w .latepoint-customer-timezone-selector-w label {
	position: static;
	font: 600 11px/1 var(--mr-sans);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mr-ink-soft);
}
body .latepoint-w .latepoint-customer-timezone-selector-w select.os-form-control {
	width: auto;
	padding: 9px 34px 9px 14px !important;
	border-radius: 999px !important;
	border: 1px solid var(--mr-paper-edge) !important;
	background-color: #fff !important;
	font: 500 13px/1.2 var(--mr-sans) !important;
	color: var(--mr-ink) !important;
	height: auto;
}

/* ---------- Section headings: serif + gold rule ---------- */

body .latepoint-w .latepoint-section-heading-w {
	border-bottom: none;
	margin: 34px 0 18px;
	padding: 0 0 12px;
	position: relative;
	align-items: baseline;
}
body .latepoint-w .latepoint-section-heading-w::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: linear-gradient(90deg, var(--mr-gold) 0 46px, var(--mr-paper-edge) 46px 100%);
}
body .latepoint-w .latepoint-section-heading {
	font: 400 22px/1.2 var(--mr-serif);
	color: var(--mr-navy);
	letter-spacing: .02em;
}
body .latepoint-w .latepoint-section-heading-w .heading-extra {
	font: 600 11px/1 var(--mr-sans);
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mr-ink-soft);
}

/* ---------- Booking tiles ---------- */

body .latepoint-w .customer-bookings-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 22px;
}

body .latepoint-w .customer-booking {
	position: relative;
	background: #fff;
	border: 1px solid var(--mr-paper-edge);
	border-radius: 20px;
	padding: 26px 26px 20px;
	box-shadow: 0 6px 22px rgba(34, 48, 63, .07);
	transition: transform .18s ease, box-shadow .18s ease;
	overflow: hidden;
}
body .latepoint-w .customer-booking:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(34, 48, 63, .13);
}

/* the service color strip becomes a refined top accent */
body .latepoint-w .customer-booking .customer-booking-service-color {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	width: auto;
	border-radius: 0;
	background: linear-gradient(90deg, var(--mr-gold), #ffe469);
}
body .latepoint-w .customer-booking.status-cancelled .customer-booking-service-color { background: #d9d4c8; }
body .latepoint-w .customer-booking.status-completed .customer-booking-service-color { background: var(--mr-navy-soft); }

body .latepoint-w .customer-booking-service-name {
	font: 400 21px/1.25 var(--mr-serif);
	color: var(--mr-navy);
	margin: 4px 0 6px;
}
body .latepoint-w .customer-booking-datetime {
	font: 500 14px/1.4 var(--mr-sans);
	color: var(--mr-ink-soft);
	margin-bottom: 16px;
}
body .latepoint-w .customer-booking-datetime .tz-name { opacity: .65; font-size: 12.5px; }

body .latepoint-w .customer-booking-info {
	border-top: 1px solid #f1ecdf;
	padding-top: 14px;
	margin-top: 2px;
	display: grid;
	gap: 9px;
}
body .latepoint-w .customer-booking-info-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
body .latepoint-w .booking-info-label {
	font: 600 10.5px/1 var(--mr-sans);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #9aa5b1;
}
body .latepoint-w .booking-info-value {
	font: 600 13.5px/1.2 var(--mr-sans);
	color: var(--mr-ink);
}

/* status chips */
body .latepoint-w .booking-info-value[class*="status-"] {
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
}
body .latepoint-w .booking-info-value.status-approved { background: #e7f6ec !important; color: #187a3b !important; }
body .latepoint-w .booking-info-value.status-completed { background: #eaf0f7 !important; color: var(--mr-navy) !important; }
body .latepoint-w .booking-info-value.status-cancelled { background: #f6ecea !important; color: #a5473a !important; }
body .latepoint-w .booking-info-value.status-pending_approval,
body .latepoint-w .booking-info-value.status-pending { background: #fff7dc !important; color: #8a6d00 !important; }

/* zoom join row — real markup is .os-zoom-info-link > img + a (latepoint-zoom).
   Style the BOX only; the inner link stays plain so there's no pill-in-a-box. */
body .latepoint-w .os-zoom-info-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 11px 14px;
	background: #eef4fd;
	border: 1px solid #d8e6fb;
	border-radius: 12px;
	transition: background .18s ease;
}
body .latepoint-w .os-zoom-info-link:hover { background: #e2edfc; }
body .latepoint-w .os-zoom-info-link img { width: 20px; height: auto; flex: 0 0 auto; }
body .latepoint-w .os-zoom-info-link a {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	font: 600 13px/1 var(--mr-sans);
	color: #1d5dbf;
	text-decoration: none;
}

/* tile buttons */
body .latepoint-w .customer-booking-buttons {
	display: flex;
	gap: 10px;
	margin: 0 0 16px;
}

body .latepoint-w .latepoint-btn {
	font: 700 12px/1 var(--mr-sans) !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	border-radius: 999px !important;
	padding: 13px 22px !important;
	background: var(--mr-gold) !important;
	color: var(--mr-navy) !important;
	border: none !important;
	box-shadow: 0 3px 10px rgba(230, 184, 0, .3);
	text-decoration: none;
	transition: all .18s ease;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
}
body .latepoint-w .latepoint-btn:hover {
	background: #ffdb33 !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(230, 184, 0, .4);
}

/* outline + quiet variants inside tiles */
body .latepoint-w .customer-booking .latepoint-btn,
body .latepoint-w .customer-booking .latepoint-btn.latepoint-btn-outline {
	background: #fff !important;
	color: var(--mr-navy) !important;
	border: 1.5px solid #dfe5ec !important;
	box-shadow: none;
	padding: 10px 16px !important;
	font-size: 11px !important;
}
body .latepoint-w .customer-booking .latepoint-btn:hover {
	border-color: var(--mr-navy) !important;
	background: #fff !important;
	transform: none;
	box-shadow: 0 3px 8px rgba(34, 48, 63, .08);
}
body .latepoint-w .customer-booking .latepoint-btn.latepoint-btn-danger {
	color: #a5473a !important;
	border-color: #eadfdd !important;
}
body .latepoint-w .customer-booking .latepoint-btn.latepoint-btn-danger:hover {
	border-color: #a5473a !important;
}

body .latepoint-w .customer-booking-bottom-actions {
	display: flex;
	gap: 10px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #f1ecdf;
}

/* the "new appointment" tile: inviting, dashed gold */
body .latepoint-w .new-booking-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 220px;
	border: 2px dashed #e3cf74;
	border-radius: 20px;
	background: rgba(255, 209, 0, .05);
	color: var(--mr-navy);
	font: 600 14px/1 var(--mr-sans);
	text-decoration: none;
	transition: all .18s ease;
}
body .latepoint-w .new-booking-tile:hover {
	background: rgba(255, 209, 0, .12);
	border-color: var(--mr-gold-deep);
	transform: translateY(-2px);
}
body .latepoint-w .new-booking-tile .latepoint-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 999px;
	background: var(--mr-gold);
	color: var(--mr-navy);
	font-size: 20px;
	font-style: normal;
}
body .latepoint-w .new-booking-tile .latepoint-icon::before { content: '+'; font-weight: 700; font-family: var(--mr-sans); }

/* empty state */
body .latepoint-w .latepoint-message {
	background: #fff;
	border: 1px solid var(--mr-paper-edge);
	border-radius: 16px;
	padding: 28px;
	color: var(--mr-ink-soft);
	font: 500 14px/1.5 var(--mr-sans);
}

/* ---------- Forms (Profile tab + anywhere in the cabinet) ---------- */

body .latepoint-w .os-form-group.os-form-textfield-group input.os-form-control,
body .latepoint-w .os-form-group.os-form-textfield-group textarea.os-form-control,
body .latepoint-w .os-form-group.os-form-select-group select.os-form-control,
body .latepoint-w .os-form-group .os-form-control,
body .latepoint-w .os-form-control {
	border: 1.5px solid #e2dccb !important;
	border-radius: 14px !important;
	background: #fff !important;
	color: var(--mr-ink) !important;
	font-family: var(--mr-sans) !important;
	transition: border-color .18s ease, box-shadow .18s ease;
}
body .latepoint-w .os-form-group.os-form-textfield-group input.os-form-control:focus,
body .latepoint-w .os-form-group.os-form-textfield-group textarea.os-form-control:focus,
body .latepoint-w .os-form-group .os-form-control:focus,
body .latepoint-w .os-form-control:focus {
	border-color: var(--mr-gold-deep) !important;
	box-shadow: 0 0 0 4px rgba(255, 209, 0, .18) !important;
	outline: none !important;
	color: var(--mr-ink) !important;
}
body .latepoint-w .os-form-group label {
	color: var(--mr-ink-soft);
	font-family: var(--mr-sans);
	letter-spacing: .02em;
}

body .latepoint-w .customer-password-form-w {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid var(--mr-paper-edge);
}
body .latepoint-w .customer-password-form-w h5 {
	font: 400 20px/1.2 var(--mr-serif);
	color: var(--mr-navy);
	margin: 0 0 18px;
}

/* ---------- Messages tab: contact notice (injected by mathrescue-fixes.php) ---------- */

body .latepoint-w .mr-messages-notice {
	margin: 0 0 16px;
	padding: 13px 18px;
	background: rgba(255, 209, 0, .10);
	border: 1px solid #ecdca4;
	border-radius: 12px;
	font: 500 13.5px/1.55 var(--mr-sans);
	color: var(--mr-ink);
}
body .latepoint-w .mr-messages-notice a {
	color: var(--mr-navy);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1.5px solid var(--mr-gold-deep);
	white-space: nowrap;
}
body .latepoint-w .mr-messages-notice a:hover { color: var(--mr-gold-deep); }

/* ---------- Messages composer + bare-input safety net ----------
   Some LatePoint inputs (e.g. the Messages "Type your message" box) have no
   .os-form-control class, so Astra dark-mode paints them dark. Force a light
   ground on every text-like input inside LatePoint containers. */

body.astra-dark-mode-enable .latepoint-w input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]),
body.astra-dark-mode-enable .latepoint-w textarea,
body.astra-dark-mode-enable .latepoint-lightbox-w input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]),
body.astra-dark-mode-enable .latepoint-lightbox-w textarea {
	background-color: #fff !important;
	color: var(--mr-ink) !important;
}
body .latepoint-w input::placeholder,
body .latepoint-lightbox-w input::placeholder {
	color: #9aa5b1 !important;
	opacity: 1;
}

/* the composer itself: white pill, matching the form language */
body .latepoint-w input.os-booking-messages-input {
	border: 1.5px solid #e2dccb !important;
	border-radius: 999px !important;
	padding: 12px 18px !important;
	font-family: var(--mr-sans) !important;
}
body .latepoint-w input.os-booking-messages-input:focus {
	border-color: var(--mr-gold-deep) !important;
	box-shadow: 0 0 0 4px rgba(255, 209, 0, .18) !important;
	outline: none !important;
}

/* ==========================================================================
   Article typography — single blog posts only.
   Matches the hand-styled look of the early posts (.mr-wrap, 820px column):
   narrow centered reading measure, sane image sizes, lede, blue links.
   Future articles inherit this automatically — no per-post style blocks.
   ========================================================================== */

body.single-post .entry-content > *:not(.alignfull):not(.alignwide) {
	max-width: 820px;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* The title + byline align with the reading column, not the container edge */
body.single-post .entry-header {
	max-width: 820px;
	margin-left: auto;
	margin-right: auto;
}

/* Lede: the opening paragraph slightly larger, like .mr-lede */
body.single-post .entry-content > p:first-child {
	font-size: 1.12em;
	line-height: 1.7;
}

/* Images: they now sit in the 820px column; round them like the house style */
body.single-post .entry-content figure.wp-block-image img {
	border-radius: 10px;
	height: auto;
}

/* Links: bright blue + underline like .mr-wrap a — but never buttons */
body.single-post .entry-content a:not(.latepoint-btn):not(.wp-block-button__link):not(.latepoint-book-button):not(.open-calendar-types) {
	color: #3b82f6;
	text-decoration: underline;
	font-weight: 500;
}
body.single-post .entry-content a:not(.latepoint-btn):not(.wp-block-button__link):not(.latepoint-book-button):not(.open-calendar-types):hover {
	color: #60a5fa;
}
body.single-post .entry-content a:not(.latepoint-btn):not(.wp-block-button__link):not(.latepoint-book-button):visited {
	color: #3b82f6;
}

/* Resources page Article Library: make directory links read as links on the
   dark canvas (lighter blue for contrast; page isn't single-post so the
   article rules above don't reach it) */
body.page-id-1159 .entry-content .wp-block-list a,
body.page-id-1159 .entry-content p a {
	color: #60a5fa;
	text-decoration: underline;
}
body.page-id-1159 .entry-content .wp-block-list a:hover,
body.page-id-1159 .entry-content p a:hover {
	color: #93c5fd;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
	body .latepoint-w:not(.latepoint-lightbox-w) {
		margin: 16px 10px 40px;
		padding: 26px 20px 36px;
		border-radius: 22px;
	}
	body .latepoint-w:not(.latepoint-lightbox-w) > a:first-child { top: 20px; right: 18px; }
	body .latepoint-w:not(.latepoint-lightbox-w) > h4 { margin-top: 26px; }
	body .latepoint-w .latepoint-tab-triggers.customer-dashboard-tabs { width: 100%; }
	body .latepoint-w .customer-bookings-tiles { grid-template-columns: 1fr; }
	body .latepoint-w .latepoint-customer-timezone-selector-w { justify-content: flex-start; }
}
