/*
 * OM Store Credit: My Account > Store Credits (#om-sc-account) and the home page block (.om-sc-widget).
 *
 * Every rule is scoped to #om-sc-account or .om-sc.om-sc-widget so theme, Elementor and BuddyBoss table and
 * heading styles can't override it, and nothing here can change the rest of the site.
 *
 * Colours are custom properties; map them to the theme if needed, e.g.
 *   #om-sc-account, .om-sc.om-sc-widget { --om-sc-accent: var(--e-global-color-primary); }
 * Every text/background pair is at least 4.5:1.
 */

#om-sc-account,
.om-sc.om-sc-widget {
	--om-sc-ink: #1F2937;
	--om-sc-muted: #4B5563;
	--om-sc-line: #E5E7EB;
	--om-sc-surface: #FFFFFF;
	--om-sc-subtle: #F9FAFB;
	--om-sc-accent: #1D4ED8;
	--om-sc-accent-ink: #FFFFFF;
	--om-sc-next-bg: #EFF6FF;
	--om-sc-next-fg: #1E40AF;
	--om-sc-next-line: #BFDBFE;
	--om-sc-plus: #166534;
	--om-sc-active-bg: #DCFCE7;
	--om-sc-active-fg: #166534;
	--om-sc-soon-bg: #FEF3C7;
	--om-sc-soon-fg: #92400E;
	--om-sc-soon-line: #FCD34D;
	--om-sc-urgent-bg: #FEE2E2;
	--om-sc-urgent-fg: #991B1B;
	--om-sc-urgent-line: #FCA5A5;
	--om-sc-used-bg: #F3F4F6;
	--om-sc-used-fg: #374151;
	--om-sc-radius: 10px;

	box-sizing: border-box;
	color: var(--om-sc-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.55;
	letter-spacing: normal;
	text-transform: none;
	font-variant-numeric: tabular-nums;
}

#om-sc-account *,
#om-sc-account *::before,
#om-sc-account *::after,
.om-sc.om-sc-widget *,
.om-sc.om-sc-widget *::before,
.om-sc.om-sc-widget *::after {
	box-sizing: border-box;
	letter-spacing: normal;
	text-transform: none;
}

#om-sc-account p,
.om-sc.om-sc-widget p {
	margin: 0;
	padding: 0;
}

#om-sc-account a,
.om-sc.om-sc-widget a {
	color: var(--om-sc-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

#om-sc-account a:focus-visible,
#om-sc-account summary:focus-visible,
.om-sc.om-sc-widget a:focus-visible {
	outline: 3px solid var(--om-sc-accent);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------
   Buttons
------------------------------------------------------------------- */
#om-sc-account .om-sc-button,
.om-sc.om-sc-widget .om-sc-button {
	display: inline-block;
	margin: 0;
	padding: 11px 18px;
	border: 1px solid var(--om-sc-accent);
	border-radius: 8px;
	background: var(--om-sc-accent);
	color: var(--om-sc-accent-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
}

#om-sc-account .om-sc-button:hover,
.om-sc.om-sc-widget .om-sc-button:hover {
	filter: brightness(0.9);
	color: var(--om-sc-accent-ink);
}

#om-sc-account .om-sc-button--secondary {
	background: var(--om-sc-surface);
	color: var(--om-sc-ink);
	border-color: #D1D5DB;
}

#om-sc-account .om-sc-button--secondary:hover {
	color: var(--om-sc-ink);
	background: var(--om-sc-subtle);
}

/* ------------------------------------------------------------------
   My Account page
------------------------------------------------------------------- */
#om-sc-account {
	margin: 24px 0 0;
	padding: 0;
}

#om-sc-account .om-sc-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
	margin: 0 0 14px;
}

#om-sc-account .om-sc-card {
	padding: 16px 18px;
	border: 1px solid var(--om-sc-line);
	border-radius: var(--om-sc-radius);
	background: var(--om-sc-surface);
}

#om-sc-account .om-sc-card--soon   { background: var(--om-sc-soon-bg);   border-color: var(--om-sc-soon-line); }
#om-sc-account .om-sc-card--urgent { background: var(--om-sc-urgent-bg); border-color: var(--om-sc-urgent-line); }

#om-sc-account .om-sc-card__label { font-size: 15px; font-weight: 600; color: var(--om-sc-muted); }
#om-sc-account .om-sc-card--soon .om-sc-card__label,
#om-sc-account .om-sc-card--soon .om-sc-card__sub   { color: var(--om-sc-soon-fg); }
#om-sc-account .om-sc-card--urgent .om-sc-card__label,
#om-sc-account .om-sc-card--urgent .om-sc-card__sub { color: var(--om-sc-urgent-fg); }

#om-sc-account .om-sc-card__value {
	margin-top: 4px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--om-sc-ink);
}

#om-sc-account .om-sc-card__value--small { font-size: 21px; }
#om-sc-account .om-sc-card--soon .om-sc-card__value   { color: var(--om-sc-soon-fg); }
#om-sc-account .om-sc-card--urgent .om-sc-card__value { color: var(--om-sc-urgent-fg); }
#om-sc-account .om-sc-card__sub { margin-top: 2px; font-size: 15px; color: var(--om-sc-muted); }

#om-sc-account .om-sc-note {
	margin: 0 0 16px;
	font-size: 15px;
	color: var(--om-sc-muted);
}

#om-sc-account .om-sc-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 32px;
}

#om-sc-account .om-sc-h {
	margin: 0 0 4px;
	padding: 0;
	font-family: inherit;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--om-sc-ink);
	border: 0;
}

#om-sc-account .om-sc-intro {
	margin: 0 0 12px;
	font-size: 15px;
	color: var(--om-sc-muted);
}

#om-sc-account .om-sc-empty {
	margin: 0 0 32px;
	padding: 16px;
	border: 1px dashed var(--om-sc-line);
	border-radius: var(--om-sc-radius);
	color: var(--om-sc-muted);
}

#om-sc-account .om-sc-scroll {
	overflow-x: auto;
	margin: 0 0 12px;
	border: 1px solid var(--om-sc-line);
	border-radius: var(--om-sc-radius);
	background: var(--om-sc-surface);
}

/* Tables: reset everything a theme might set. */
#om-sc-account table.om-sc-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	background: transparent;
	font-size: 16px;
	line-height: 1.5;
	table-layout: auto;
}

#om-sc-account table.om-sc-table th,
#om-sc-account table.om-sc-table td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid var(--om-sc-line);
	background: transparent;
	color: var(--om-sc-ink);
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	text-align: left;
	vertical-align: top;
}

#om-sc-account table.om-sc-table thead th {
	padding-top: 11px;
	padding-bottom: 11px;
	background: var(--om-sc-subtle);
	color: var(--om-sc-muted);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

#om-sc-account table.om-sc-table tbody tr:last-child td { border-bottom: 0; }
#om-sc-account table.om-sc-table tbody tr:hover td { background: transparent; }
#om-sc-account table.om-sc-table .num { text-align: right; white-space: nowrap; }

/* The credit used next. */
#om-sc-account table.om-sc-table tr.om-sc-row--next td { background: var(--om-sc-next-bg); }
#om-sc-account table.om-sc-table tr.om-sc-row--next td:first-child { box-shadow: inset 4px 0 0 var(--om-sc-accent); }

#om-sc-account .om-sc-credit-name { font-weight: 600; }
#om-sc-account .om-sc-sub {
	display: block;
	margin-top: 2px;
	font-size: 14px;
	font-weight: 400;
	color: var(--om-sc-muted);
	white-space: normal;
}
#om-sc-account .om-sc-used-on { margin-top: 6px; }
#om-sc-account table.om-sc-table td.om-sc-left { font-weight: 700; }
#om-sc-account table.om-sc-table td.om-sc-plus { color: var(--om-sc-plus); font-weight: 600; }
#om-sc-account table.om-sc-table td.om-sc-minus { color: var(--om-sc-ink); }
#om-sc-account .om-sc-muted,
#om-sc-account table.om-sc-table td.om-sc-muted { color: var(--om-sc-muted); }

#om-sc-account .om-sc-date { font-weight: 600; }
#om-sc-account .om-sc-date--soon   { color: var(--om-sc-soon-fg); }
#om-sc-account .om-sc-date--urgent { color: var(--om-sc-urgent-fg); }

/* Pills */
#om-sc-account .om-sc-pill {
	display: inline-block;
	margin: 5px 0 0;
	padding: 2px 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
}

#om-sc-account .om-sc-pill--next    { background: var(--om-sc-accent); color: var(--om-sc-accent-ink); }
#om-sc-account .om-sc-pill--soon    { background: var(--om-sc-soon-bg); color: var(--om-sc-soon-fg); border-color: var(--om-sc-soon-line); }
#om-sc-account .om-sc-pill--urgent  { background: var(--om-sc-urgent-bg); color: var(--om-sc-urgent-fg); border-color: var(--om-sc-urgent-line); }
#om-sc-account .om-sc-pill--expired { background: var(--om-sc-urgent-bg); color: var(--om-sc-urgent-fg); }
#om-sc-account .om-sc-pill--used    { background: var(--om-sc-used-bg); color: var(--om-sc-used-fg); }

#om-sc-account details.om-sc-details { margin: 4px 0 32px; }
#om-sc-account details.om-sc-details summary {
	margin: 0 0 10px;
	color: var(--om-sc-accent);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}

#om-sc-account .om-sc-pagination { margin-top: 18px; }

/* Advanced Coupons' own store credit app is replaced by this page. */
#acfwf_store_credits_app { display: none !important; }

/* ------------------------------------------------------------------
   Home page block: a compact dropdown (native <details>), styled like
   BuddyBoss blocks ("Your Courses"). Colours, borders and radius come from
   BuddyBoss's CSS variables, with fallbacks matching the current site.
   Closed: total balance, plus a tag when credit expires within 30 days.
   Open: next expiry row (amber within 30 days, red within 7), links.
------------------------------------------------------------------- */
.om-sc.om-sc-widget {
	--om-sc-w-primary: var(--bb-primary-color, #00A2E8);
	--om-sc-w-heading: var(--bb-headings-color, #122B46);
	--om-sc-w-text: var(--bb-body-text-color, #4D5C6D);
	--om-sc-w-border: var(--bb-content-border-color, #E7E9EC);
	--om-sc-w-bg: var(--bb-content-background-color, #FFFFFF);
	--om-sc-w-radius: var(--bb-block-radius, 4px);
	--om-sc-w-button-radius: var(--bb-button-radius, 4px);
	--om-sc-w-button: #00A2E8; /* Same blue as the "Expand All" button. Shortcode: color="#..." */

	display: block;
	width: 100%;
	max-width: 400px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--om-sc-w-border);
	border-radius: var(--om-sc-w-radius);
	background: var(--om-sc-w-bg);
	box-shadow: none;
	color: var(--om-sc-w-text);
}

.om-sc.om-sc-widget .om-sc-widget__summary {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 12px 16px;
	list-style: none;
	cursor: pointer;
	user-select: none;
}

.om-sc.om-sc-widget .om-sc-widget__summary::-webkit-details-marker { display: none; }
.om-sc.om-sc-widget .om-sc-widget__summary::marker { content: ""; }
.om-sc.om-sc-widget .om-sc-widget__summary:hover { background: #F7F8F9; }
.om-sc.om-sc-widget .om-sc-widget__summary:focus-visible { outline: 3px solid var(--om-sc-w-primary); outline-offset: -3px; }

.om-sc.om-sc-widget .om-sc-widget__icon { display: flex; flex: none; color: var(--om-sc-w-text); }
.om-sc.om-sc-widget .om-sc-widget__icon svg { width: 20px; height: 20px; }

.om-sc.om-sc-widget .om-sc-widget__total { display: flex; flex-direction: column; min-width: 0; }

.om-sc.om-sc-widget .om-sc-widget__title {
	font-size: 14px;
	line-height: 1.3;
	color: var(--om-sc-w-text);
}

.om-sc.om-sc-widget .om-sc-widget__amount {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--om-sc-w-heading);
}

.om-sc.om-sc-widget .om-sc-widget__tag {
	margin-left: auto;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}

.om-sc.om-sc-widget--soon .om-sc-widget__tag   { background: #FEF3C7; color: #92400E; }
.om-sc.om-sc-widget--urgent .om-sc-widget__tag { background: #FEE2E2; color: #991B1B; }

.om-sc.om-sc-widget .om-sc-widget__chevron {
	flex: none;
	width: 20px;
	height: 20px;
	margin-left: auto;
	color: var(--om-sc-w-text);
	transition: transform 0.2s ease;
}

.om-sc.om-sc-widget .om-sc-widget__tag + .om-sc-widget__chevron { margin-left: 4px; }
.om-sc.om-sc-widget[open] .om-sc-widget__chevron { transform: rotate(180deg); }

.om-sc.om-sc-widget .om-sc-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.om-sc.om-sc-widget .om-sc-widget__more { border-top: 1px solid var(--om-sc-w-border); }

.om-sc.om-sc-widget .om-sc-widget__next {
	padding: 10px 16px;
	font-size: 14px;
	color: var(--om-sc-w-text);
}

.om-sc.om-sc-widget .om-sc-widget__next-line {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.om-sc.om-sc-widget .om-sc-widget__next-amount { font-weight: 700; color: var(--om-sc-w-heading); }
.om-sc.om-sc-widget .om-sc-widget__next-when { margin-top: 1px; font-size: 13px; }

.om-sc.om-sc-widget .om-sc-widget__next--soon { background: #FEF3C7; color: #92400E; }
.om-sc.om-sc-widget .om-sc-widget__next--soon .om-sc-widget__next-amount { color: #78350F; }
.om-sc.om-sc-widget .om-sc-widget__next--urgent { background: #FEE2E2; color: #991B1B; }
.om-sc.om-sc-widget .om-sc-widget__next--urgent .om-sc-widget__next-amount { color: #7F1D1D; }
.om-sc.om-sc-widget .om-sc-widget__next--soon .om-sc-widget__next-label,
.om-sc.om-sc-widget .om-sc-widget__next--urgent .om-sc-widget__next-label { font-weight: 600; }

.om-sc.om-sc-widget .om-sc-widget__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 16px;
	border-top: 1px solid var(--om-sc-w-border);
}

.om-sc.om-sc-widget .om-sc-widget__link {
	font-size: 14px;
	color: var(--om-sc-w-text);
	text-decoration: none;
}

.om-sc.om-sc-widget .om-sc-widget__link:hover { color: var(--om-sc-w-heading); text-decoration: underline; }

.om-sc.om-sc-widget .om-sc-widget__button {
	flex: none;
	padding: 6px 12px;
	border: 1px solid var(--om-sc-w-button);
	border-radius: var(--om-sc-w-button-radius);
	background: var(--om-sc-w-button);
	color: #FFFFFF;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}

.om-sc.om-sc-widget .om-sc-widget__button:hover,
.om-sc.om-sc-widget .om-sc-widget__button:focus {
	filter: brightness(0.92);
	color: #FFFFFF;
}

/* ------------------------------------------------------------------
   Activity: note on unused-seats rows (icon opens the details below).
------------------------------------------------------------------- */
#om-sc-account .om-sc-note-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0 0 0 6px;
	padding: 0;
	border: 1px solid #D1D5DB;
	border-radius: 50%;
	background: transparent;
	color: var(--om-sc-muted);
	vertical-align: -6px;
	cursor: pointer;
	box-shadow: none;
}

#om-sc-account .om-sc-note-btn:hover,
#om-sc-account .om-sc-note-btn[aria-expanded="true"] {
	background: var(--om-sc-next-bg);
	border-color: var(--om-sc-next-line);
	color: var(--om-sc-next-fg);
}

#om-sc-account .om-sc-note-btn:focus-visible { outline: 3px solid var(--om-sc-accent); outline-offset: 2px; }

#om-sc-account table.om-sc-table tr.om-sc-has-note:not(:last-child) td { border-bottom-color: transparent; }
#om-sc-account table.om-sc-table tr.om-sc-note-row[hidden] { display: none; }
#om-sc-account table.om-sc-table td.om-sc-note-cell { padding-top: 0; }

#om-sc-account .om-sc-note {
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--om-sc-subtle);
	font-size: 14px;
	line-height: 1.6;
	color: var(--om-sc-muted);
}

#om-sc-account .om-sc-note__group { margin-bottom: 4px; }
#om-sc-account .om-sc-note__title { font-weight: 600; color: var(--om-sc-ink); }
#om-sc-account .om-sc-note__line { display: flex; justify-content: space-between; gap: 12px; }
#om-sc-account .om-sc-note__amount { color: var(--om-sc-ink); white-space: nowrap; }

/* ------------------------------------------------------------------
   Small screens: each table row becomes a card.
------------------------------------------------------------------- */
@media (max-width: 680px) {
	#om-sc-account .om-sc-scroll { border: 0; background: transparent; overflow: visible; }

	#om-sc-account table.om-sc-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	#om-sc-account table.om-sc-table,
	#om-sc-account table.om-sc-table tbody,
	#om-sc-account table.om-sc-table tr,
	#om-sc-account table.om-sc-table td {
		display: block;
		width: 100%;
	}

	#om-sc-account table.om-sc-table tr {
		margin: 0 0 12px;
		padding: 10px 14px;
		border: 1px solid var(--om-sc-line);
		border-radius: var(--om-sc-radius);
		background: var(--om-sc-surface);
	}

	#om-sc-account table.om-sc-table tr.om-sc-row--next { border-color: var(--om-sc-next-line); background: var(--om-sc-next-bg); box-shadow: inset 4px 0 0 var(--om-sc-accent); }
	#om-sc-account table.om-sc-table tr.om-sc-row--next td { background: transparent; }
	#om-sc-account table.om-sc-table tr.om-sc-row--next td:first-child { box-shadow: none; }

	#om-sc-account table.om-sc-table td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 6px 0;
		border: 0;
		text-align: right;
	}

	#om-sc-account table.om-sc-table td::before {
		content: attr(data-label);
		color: var(--om-sc-muted);
		font-size: 14px;
		font-weight: 600;
		text-align: left;
	}

	#om-sc-account table.om-sc-table tr.om-sc-note-row { margin-top: -10px; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
	#om-sc-account table.om-sc-table td.om-sc-note-cell { display: block; text-align: left; }
	#om-sc-account table.om-sc-table td.om-sc-note-cell::before { content: none; }
	#om-sc-account table.om-sc-table td.first { display: block; text-align: left; }
	#om-sc-account table.om-sc-table td.first::before { content: none; }
	#om-sc-account table.om-sc-table .num { white-space: normal; }
}

/* Print statement: period choice and button */
#om-sc-account .om-sc-statement-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
}

#om-sc-account .om-sc-statement-form .om-sc-select {
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: 10px 36px 10px 12px;
	border: 1px solid #D1D5DB;
	border-radius: 8px;
	background-color: var(--om-sc-surface);
	color: var(--om-sc-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.3;
	width: auto;
	max-width: 100%;
}

#om-sc-account .om-sc-statement-form .om-sc-button { cursor: pointer; min-height: 44px; }

#om-sc-account .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
