/**
 * Portal styles, in the site's own design language.
 *
 * Same tokens as the checkout: petrol #005468 + gold #E5B603 on cream
 * #FAF7F0, Georgia display, Jost everything else, 30px pill buttons, 5px
 * panels. The page renders standalone with the theme stack dequeued, so the
 * kit variables carry exact fallbacks and element defaults are declared here
 * inside :where() so they never outrank a component class.
 */

.edgr-portal-body {
	--edgr-ink: var(--e-global-color-4033fe7, #005468);
	--edgr-gold: var(--e-global-color-521a2d3, #E5B603);
	--edgr-cream: var(--e-global-color-0ba02ec, #FAF7F0);
	--edgr-hairline: var(--e-global-color-2c6c15e, rgba(147, 209, 206, .49));
	--edgr-teal-deep: #175F70;
	--edgr-body-ink: #2A4A52;
	--edgr-ink-faint: #8AA3AA;
	--edgr-danger: #9C3B2E;
	--edgr-ok: #1c7a43;

	--edgr-serif: Georgia, "Times New Roman", serif;
	--edgr-sans: Jost, "Helvetica Neue", Arial, sans-serif;

	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--edgr-cream);
	color: var(--edgr-body-ink);
	font-family: var(--edgr-sans);
	font-size: 15px;
	letter-spacing: .3px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.edgr-portal-body * { box-sizing: border-box; }

:where(.edgr-portal-body) a { color: var(--edgr-ink); }
:where(.edgr-portal-body) img { max-width: 100%; height: auto; }
:where(.edgr-portal-body) button,
:where(.edgr-portal-body) input,
:where(.edgr-portal-body) select,
:where(.edgr-portal-body) textarea { font: inherit; letter-spacing: inherit; margin: 0; color: inherit; }
:where(.edgr-portal-body) table { border-collapse: collapse; width: 100%; }
:where(.edgr-portal-body) summary { cursor: pointer; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- top bar ---------- */

.edgr-topbar {
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 14px 24px;
	background: #FFFFFF;
	border-bottom: 1px solid var(--edgr-hairline);
}

.edgr-brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.edgr-brand-name { font-family: var(--edgr-serif); font-size: 20px; color: var(--edgr-ink); }
.edgr-brand-sub { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--edgr-ink); opacity: .7; }

.edgr-topnav { display: flex; gap: 18px; margin-left: 8px; }
.edgr-topnav a {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--edgr-body-ink);
	padding: 6px 0;
	border-bottom: 2px solid transparent;
}
.edgr-topnav a:hover,
.edgr-topnav a[aria-current="page"] { color: var(--edgr-ink); border-bottom-color: var(--edgr-gold); }

.edgr-whoami { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.edgr-whoami-name { font-weight: 500; color: var(--edgr-ink); }
.edgr-logout { font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; color: var(--edgr-body-ink); }
.edgr-logout:hover { color: var(--edgr-ink); }

@media (max-width: 680px) {
	.edgr-topbar { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
	.edgr-whoami { margin-left: 0; flex: 1 1 100%; justify-content: space-between; }
	.edgr-whoami-name { display: none; }
}

/* ---------- layout ---------- */

.edgr-main {
	flex: 1;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 36px 24px 72px;
}

@media (max-width: 680px) {
	.edgr-main { padding: 22px 16px 56px; }
}

.edgr-h1 {
	margin: 0 0 8px;
	font-family: var(--edgr-serif);
	font-weight: 400;
	font-size: clamp(26px, 3.4vw, 36px);
	line-height: 1.15;
	color: var(--edgr-ink);
}

.edgr-h2 {
	margin: 0;
	font-family: var(--edgr-serif);
	font-weight: 400;
	font-size: 21px;
	line-height: 1.25;
	color: var(--edgr-ink);
}

.edgr-eyebrow {
	margin: 0 0 6px;
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--edgr-ink);
	opacity: .8;
}

.edgr-lead { margin: 0; font-size: 15px; }
.edgr-muted { color: var(--edgr-ink-faint); }
.edgr-small { font-size: 12.5px; }
.edgr-nowrap { white-space: nowrap; }
.edgr-count { font-size: 12px; font-weight: 600; color: var(--edgr-ink-faint); margin-left: 4px; font-family: var(--edgr-sans); }

.edgr-pagehead {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
}

.edgr-pagehead-actions { flex: none; padding-bottom: 6px; }

.edgr-crumb { margin: 0 0 14px; font-size: 13px; }
.edgr-crumb a { text-decoration: none; }
.edgr-crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 680px) {
	.edgr-pagehead { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- cards ---------- */

.edgr-card {
	background: #FFFFFF;
	border: 1px solid var(--edgr-hairline);
	border-radius: 5px;
}

.edgr-card-pad { padding: 26px 28px; }

.edgr-empty p { margin: 0 0 8px; }
.edgr-empty p:last-child { margin-bottom: 0; }

/* ---------- alerts ---------- */

.edgr-alert {
	background: #FFFFFF;
	border: 1px solid var(--edgr-hairline);
	border-left: 3px solid var(--edgr-danger);
	border-radius: 5px;
	padding: 14px 18px;
	margin: 0 0 22px;
	font-size: 14px;
}

.edgr-alert p { margin: 0 0 6px; }
.edgr-alert p:last-child { margin-bottom: 0; }
.edgr-alert-ok { border-left-color: var(--edgr-ok); }

/* ---------- forms ---------- */

.edgr-auth { max-width: 460px; margin: 24px auto 0; }
.edgr-auth .edgr-h1 { margin-bottom: 10px; }
.edgr-auth .edgr-lead { margin-bottom: 22px; }
.edgr-auth .edgr-form { padding: 26px 28px; }
.edgr-auth-foot { text-align: center; font-size: 13px; margin: 20px 0 0; }

.edgr-field { margin-bottom: 18px; }

.edgr-field label,
.edgr-field > span {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--edgr-ink);
	margin-bottom: 6px;
}

.edgr-field input[type="text"],
.edgr-field input[type="password"],
.edgr-field input[type="email"],
.edgr-field input[type="search"],
.edgr-field textarea {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--edgr-hairline);
	border-radius: 5px;
	background: #FFFFFF;
	color: var(--edgr-ink);
	font-size: 15px;
}

.edgr-field input:focus-visible,
.edgr-toolbar input:focus-visible,
.edgr-toolbar select:focus-visible,
.edgr-cancel-form textarea:focus-visible {
	outline: 2px solid var(--edgr-ink);
	outline-offset: -1px;
	border-color: var(--edgr-ink);
}

.edgr-field input[readonly] { background: var(--edgr-cream); }

.edgr-help { margin: 6px 0 0; font-size: 12.5px; color: var(--edgr-ink-faint); }

.edgr-remember { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.edgr-remember input { accent-color: var(--edgr-ink); }

.edgr-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 18px;
	padding-top: 16px;
}

.edgr-btn {
	display: inline-block;
	background: var(--edgr-ink);
	color: var(--edgr-cream);
	border: 0;
	border-radius: 30px;
	padding: 13px 32px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	text-decoration: none;
	-webkit-appearance: none;
	appearance: none;
	transition: background .18s ease, color .18s ease;
}

.edgr-btn:hover,
.edgr-btn:focus-visible { background: var(--edgr-gold); color: var(--edgr-ink); }
.edgr-btn:focus-visible { outline: 2px solid var(--edgr-ink); outline-offset: 2px; }

.edgr-btn-sm { padding: 10px 20px; font-size: 11px; }
.edgr-btn-danger { background: var(--edgr-danger); }
.edgr-btn-danger:hover,
.edgr-btn-danger:focus-visible { background: #7c2e23; color: var(--edgr-cream); }

.edgr-back {
	font-size: 13px;
	color: var(--edgr-body-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.edgr-back:hover { color: var(--edgr-ink); }

/* ---------- toolbar ---------- */

.edgr-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 12px 14px;
	margin: 0 0 16px;
}

.edgr-search { flex: 1 1 240px; }
.edgr-search input,
.edgr-toolbar select {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--edgr-hairline);
	border-radius: 5px;
	background: #FFFFFF;
	color: var(--edgr-ink);
	font-size: 14px;
}
.edgr-toolbar .edgr-select { flex: 0 1 160px; }
.edgr-rowcount { margin-left: auto; }

@media (max-width: 680px) {
	.edgr-rowcount { margin-left: 0; flex: 1 1 100%; }
}

/* ---------- retreat list ---------- */

.edgr-rlist { display: grid; gap: 12px; margin: 14px 0 28px; }

.edgr-rrow {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto 24px;
	align-items: center;
	gap: 18px;
	padding: 18px 22px;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s ease, transform .15s ease;
}

.edgr-rrow:hover { border-color: var(--edgr-ink); }
.edgr-rrow:focus-visible { outline: 2px solid var(--edgr-ink); outline-offset: 2px; }

.edgr-rrow-dates { margin: 0 0 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--edgr-ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.edgr-rrow-title { margin: 0; font-family: var(--edgr-serif); font-weight: 400; font-size: 20px; line-height: 1.25; color: var(--edgr-ink); }
.edgr-rrow-host { margin: 4px 0 0; font-size: 13.5px; }
.edgr-rrow-go { color: var(--edgr-ink); font-size: 20px; text-align: right; }

.edgr-rrow-stats { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 18px; font-size: 13px; }
.edgr-stat strong { font-size: 18px; font-weight: 500; color: var(--edgr-ink); }
.edgr-stat small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--edgr-ink-faint); }
.edgr-stat-held strong { color: #8a6116; }
.edgr-stat-left strong { color: var(--edgr-ok); }

@media (max-width: 680px) {
	.edgr-rrow { grid-template-columns: minmax(0, 1fr) 20px; padding: 16px 18px; }
	.edgr-rrow-stats { grid-column: 1 / -1; justify-content: flex-start; }
}

.edgr-past { margin-top: 10px; }
.edgr-past > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; }
.edgr-past > summary::-webkit-details-marker { display: none; }
.edgr-past > summary::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-45deg);
	margin-right: 4px;
	transition: transform .15s ease;
}
.edgr-past[open] > summary::before { transform: rotate(45deg); }

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

.edgr-tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin: 0 0 8px;
}

.edgr-tile {
	background: #FFFFFF;
	border: 1px solid var(--edgr-hairline);
	border-top: 3px solid var(--edgr-ink);
	border-radius: 5px;
	padding: 18px 20px 16px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.edgr-tile.is-held { border-top-color: var(--edgr-gold); }
.edgr-tile.is-soldout { border-top-color: var(--edgr-danger); }

.edgr-tile-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--edgr-ink); opacity: .8; }
.edgr-tile-num { font-family: var(--edgr-serif); font-weight: 400; font-size: 34px; line-height: 1.1; color: var(--edgr-ink); }
.edgr-tile.is-soldout .edgr-tile-num { font-size: 22px; color: var(--edgr-danger); padding-top: 6px; }
.edgr-tile-note { font-size: 12px; color: var(--edgr-ink-faint); }

.edgr-asof { margin: 0 0 20px; font-size: 12.5px; color: var(--edgr-ink-faint); }
.edgr-asof a { margin-left: 6px; }

@media (max-width: 820px) {
	.edgr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- tables ---------- */

.edgr-table-wrap { overflow-x: auto; margin: 0 0 24px; -webkit-overflow-scrolling: touch; }

.edgr-table { font-size: 13.5px; min-width: 560px; }

.edgr-table th,
.edgr-table td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--edgr-hairline);
}

.edgr-table thead th {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--edgr-ink);
	background: var(--edgr-cream);
	white-space: nowrap;
}

.edgr-table tbody tr:last-child td { border-bottom: 0; }
.edgr-table .edgr-num { text-align: right; font-variant-numeric: tabular-nums; }

.edgr-sub { display: block; font-size: 12px; color: var(--edgr-ink-faint); margin-top: 2px; }
.edgr-flag { color: var(--edgr-danger); }
.edgr-row-review td:first-child { box-shadow: inset 3px 0 0 var(--edgr-gold); }
.edgr-row-inactive td { opacity: .7; }
.edgr-soldout { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--edgr-danger); }
.edgr-attendees td:first-child strong { color: var(--edgr-ink); font-weight: 500; }

/* ---------- pills ---------- */

.edgr-pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 30px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1.6;
	white-space: nowrap;
	vertical-align: middle;
	background: #f0f0f1;
	color: #4a5a60;
}

.edgr-pill-paid { background: #e7f5ec; color: var(--edgr-ok); }
.edgr-pill-plan { background: #e3f1f3; color: var(--edgr-ink); }
.edgr-pill-pending { background: #fcf3e3; color: #8a6116; }
.edgr-pill-refunded,
.edgr-pill-failed { background: #fcf0f1; color: #b32d2e; }
.edgr-pill-expired,
.edgr-pill-cancelled { background: #f0f0f1; color: #787c82; }
.edgr-pill-quiet { background: var(--edgr-cream); color: var(--edgr-body-ink); border: 1px solid var(--edgr-hairline); font-weight: 500; }
.edgr-pill-soldout { background: var(--edgr-danger); color: #fff; }
.edgr-pill-role { background: var(--edgr-gold); color: var(--edgr-ink); }

/* ---------- sections ---------- */

.edgr-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin: 8px 0 14px;
}

.edgr-scopes { display: flex; flex-wrap: wrap; gap: 6px; }

.edgr-scope {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border: 1px solid var(--edgr-hairline);
	border-radius: 30px;
	background: #FFFFFF;
	font-size: 13px;
	text-decoration: none;
	color: var(--edgr-ink);
}

.edgr-scope:hover { border-color: var(--edgr-ink); }
.edgr-scope.is-on { background: var(--edgr-ink); border-color: var(--edgr-ink); color: var(--edgr-cream); }
.edgr-scope.is-on .edgr-count { color: var(--edgr-cream); opacity: .8; }

/* ---------- export ---------- */

.edgr-export {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 22px 26px;
	margin: 0 0 32px;
	border-left: 3px solid var(--edgr-gold);
}

.edgr-export-text .edgr-h2 { margin-bottom: 4px; }
.edgr-export-text p { margin: 0 0 12px; font-size: 13.5px; }
.edgr-radios { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.edgr-radios input { accent-color: var(--edgr-ink); margin-right: 6px; }
.edgr-export-action { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }

@media (max-width: 680px) {
	.edgr-export { flex-direction: column; align-items: stretch; }
	.edgr-export-action .edgr-btn { width: 100%; }
}

/* ---------- cancel ---------- */

.edgr-actions-col { width: 1%; white-space: nowrap; }

.edgr-cancel > summary {
	list-style: none;
	font-size: 12.5px;
	color: var(--edgr-danger);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.edgr-cancel > summary::-webkit-details-marker { display: none; }

.edgr-cancel[open] { position: relative; }

.edgr-cancel-form {
	position: absolute;
	right: 0;
	z-index: 5;
	width: 320px;
	max-width: 80vw;
	margin-top: 8px;
	padding: 16px 18px;
	background: #FFFFFF;
	border: 1px solid var(--edgr-danger);
	border-radius: 5px;
	box-shadow: 0 10px 30px rgba(0, 26, 32, .12);
	white-space: normal;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.edgr-cancel-form p { margin: 0; color: var(--edgr-body-ink); }
.edgr-cancel-form textarea {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 8px 10px;
	border: 1px solid var(--edgr-hairline);
	border-radius: 5px;
	font-size: 13px;
	resize: vertical;
}
.edgr-checkline { display: flex; align-items: center; gap: 8px; }
.edgr-checkline input { accent-color: var(--edgr-danger); }

/* ---------- footer ---------- */

.edgr-footer {
	text-align: center;
	padding: 22px;
	font-size: 12px;
	color: var(--edgr-ink-faint);
	display: flex;
	justify-content: center;
	gap: 10px;
}

.edgr-footer a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
	.edgr-btn, .edgr-rrow, .edgr-past > summary::before { transition: none; }
}

@media print {
	.edgr-topbar, .edgr-footer, .edgr-toolbar, .edgr-export, .edgr-scopes, .edgr-actions-col, .edgr-crumb, .edgr-pagehead-actions { display: none !important; }
	.edgr-portal-body { background: #fff; }
	.edgr-table { min-width: 0; }
}

.edgr-pill-reserved { background: #fcf3e3; color: #8a6116; }
