/*
 * Same self-contained approach as the Lesson Planner plugin's front-end CSS:
 * an explicit palette plus an appearance reset, so this looks the same and
 * stays readable regardless of the host theme's own global styles.
 */

.ee-ch-app {
	--ee-ch-bg: #ffffff;
	--ee-ch-surface: #f1f5f9;
	--ee-ch-text: #1e293b;
	--ee-ch-muted: #52606d;
	--ee-ch-border: #cbd5e1;
	--ee-ch-accent: #1d4ed8;
	--ee-ch-accent-hover: #1e40af;
	--ee-ch-accent-text: #ffffff;
	--ee-ch-positive: #15803d;
	--ee-ch-negative: #b91c1c;

	max-width: 900px;
	margin: 0 auto 48px;
	padding: 24px;
	background: var(--ee-ch-bg);
	border: 1px solid var(--ee-ch-border);
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	color: var(--ee-ch-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ee-ch-app * {
	box-sizing: border-box;
}

.ee-ch-app button,
.ee-ch-app input,
.ee-ch-app select,
.ee-ch-app textarea {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-shadow: none;
	background-image: none;
	text-shadow: none;
	font-family: inherit;
	line-height: normal;
}

.ee-ch-app h3 {
	color: var(--ee-ch-text) !important;
	margin: 0 0 12px;
}

.ee-ch-balance-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	background: var(--ee-ch-surface);
	border-radius: 8px;
	padding: 18px 22px;
	margin-bottom: 24px;
}

.ee-ch-balance-label {
	font-size: 0.85em;
	color: var(--ee-ch-muted) !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ee-ch-balance-number {
	font-size: 2.2em;
	font-weight: 700;
	color: var(--ee-ch-accent) !important;
}

.ee-ch-section {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--ee-ch-surface);
}

.ee-ch-muted {
	color: var(--ee-ch-muted) !important;
}

.ee-ch-packs {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.ee-ch-pack {
	flex: 1 1 220px;
	background: var(--ee-ch-surface);
	border-radius: 8px;
	padding: 16px 18px;
}

.ee-ch-pack-title {
	margin: 0 0 4px;
	font-size: 1em;
	color: var(--ee-ch-text) !important;
}

.ee-ch-pack-credits {
	margin: 0 0 12px;
	color: var(--ee-ch-muted) !important;
	font-size: 0.9em;
}

.ee-ch-pack-buy .edd_download_purchase_form,
.ee-ch-pack-buy .edd-add-to-cart {
	width: 100%;
}

.ee-ch-history-table,
.ee-ch-archive-list {
	width: 100%;
}

.ee-ch-history-table {
	border-collapse: collapse;
}

.ee-ch-history-table th,
.ee-ch-history-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid var(--ee-ch-surface);
	color: var(--ee-ch-text) !important;
	font-size: 0.92em;
}

.ee-ch-history-table th {
	color: var(--ee-ch-muted) !important;
	font-weight: 600;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.ee-ch-amount-positive {
	color: var(--ee-ch-positive) !important;
	font-weight: 600;
}

.ee-ch-amount-negative {
	color: var(--ee-ch-negative) !important;
	font-weight: 600;
}

.ee-ch-archive-group {
	border: 1px solid var(--ee-ch-border);
	border-radius: 6px;
	background: var(--ee-ch-bg);
	margin-bottom: 8px;
}

.ee-ch-archive-group-summary {
	cursor: pointer;
	padding: 10px 14px;
	font-weight: 600;
	list-style: none;
	user-select: none;
	color: var(--ee-ch-text) !important;
}

.ee-ch-archive-group-summary::-webkit-details-marker {
	display: none;
}

.ee-ch-archive-group-summary::before {
	content: "\25B8";
	display: inline-block;
	margin-right: 8px;
	transition: transform 0.1s ease;
}

.ee-ch-archive-group[open] > .ee-ch-archive-group-summary::before {
	transform: rotate( 90deg );
}

.ee-ch-archive-group .ee-ch-archive-list {
	border-top: 1px solid var(--ee-ch-surface);
	padding: 0 14px;
}

.ee-ch-archive-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ee-ch-archive-list li {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--ee-ch-surface);
	color: var(--ee-ch-text) !important;
}

.ee-ch-archive-list li:last-child {
	border-bottom: none;
}

.ee-ch-archive-list a {
	color: var(--ee-ch-accent) !important;
}

.ee-ch-archive-date {
	margin-left: auto;
	color: var(--ee-ch-muted) !important;
	font-size: 0.85em;
}

.ee-ch-badge {
	display: inline-block;
	font-size: 0.7em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: var(--ee-ch-surface);
	color: var(--ee-ch-muted) !important;
	border-radius: 999px;
	padding: 2px 10px;
}

.ee-ch-login-notice {
	padding: 16px;
	background: #f1f5f9;
	border-radius: 6px;
	color: #1e293b;
}
