/**
 * ClassMarker Certifications table (My Account)
 * Styled to align with WooCommerce My Orders table patterns.
 */

.classmarker-certifications {
	--cm-accent: #e66a6a;
	--cm-accent-hover: #d45a5a;
	--cm-accent-soft: #f4eee8;
	--cm-text: #1a1a1a;
	--cm-text-muted: #6b6b6b;
	--cm-border: #eeeeee;
	--cm-card-bg: #ffffff;
	--cm-empty: #999999;
	margin: 0 0 2rem;
}

.classmarker-certifications__title {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--cm-text);
	position: relative;
	padding-bottom: 0.75rem;
}

.classmarker-certifications__title::after {
	content: "";
	display: block;
	width: 3rem;
	height: 3px;
	background: var(--cm-accent);
	margin-top: 0.5rem;
}

.classmarker-certifications__count {
	margin: 0 0 1.25rem;
	color: var(--cm-text-muted);
	font-size: 0.95rem;
}

/* Table inherits woocommerce-orders-table; scoped tweaks only */
.classmarker-certifications .woocommerce-orders-table {
	margin: 0;
	border: none;
}

.classmarker-certifications .woocommerce-orders-table thead th {
	border-bottom: 1px solid var(--cm-border);
	padding: 0.75rem 1rem 0.75rem 0;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cm-text);
}

.classmarker-certifications .woocommerce-orders-table tbody td {
	border-top: 1px solid var(--cm-border);
	padding: 1rem 1rem 1rem 0;
	vertical-align: middle;
}

.classmarker-certifications .woocommerce-orders-table tbody tr:first-child td {
	border-top: none;
}

/* Exam / Actions columns — horizontal padding (overrides Elementor padding-inline-start: 0) */
.classmarker-certifications .woocommerce-orders-table__header-order-number,
.classmarker-certifications .woocommerce-orders-table__cell-order-number {
	padding-inline-start: 1.5rem;
	padding-left: 1.5rem;
}

.classmarker-certifications .woocommerce-orders-table__header-order-actions,
.classmarker-certifications .woocommerce-orders-table__cell-order-actions {
	padding-inline-end: 1.5rem;
	padding-right: 1.5rem;
}

.elementor-widget-woocommerce-my-account .e-my-account-tab .classmarker-certifications .woocommerce-orders-table thead th.woocommerce-orders-table__header-order-number,
.elementor-widget-woocommerce-my-account .e-my-account-tab .classmarker-certifications .woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-number {
	padding-inline-start: 1.5rem !important;
	padding-left: 1.5rem !important;
}

.elementor-widget-woocommerce-my-account .e-my-account-tab .classmarker-certifications .woocommerce-orders-table thead th.woocommerce-orders-table__header-order-actions,
.elementor-widget-woocommerce-my-account .e-my-account-tab .classmarker-certifications .woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-actions {
	padding-inline-end: 1.5rem !important;
	padding-right: 1.5rem !important;
}

/* Exam column — title only (matches order # link color) */
.classmarker-certifications .classmarker-exam-title {
	font-weight: 600;
	color: var(--cm-accent);
	display: block;
}

/* Status pills */
.classmarker-certifications .classmarker-status-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.2;
	background: var(--cm-accent-soft);
	color: var(--cm-text);
}

.classmarker-certifications .classmarker-status-badge--certified {
	background: var(--cm-accent-soft);
}

.classmarker-certifications .classmarker-status-badge--available {
	background: var(--cm-accent-soft);
}

/* Days remaining */
.classmarker-certifications .classmarker-days-remaining {
	display: block;
	font-weight: 600;
}

.classmarker-certifications .classmarker-days-remaining--ok {
	color: var(--cm-text);
}

.classmarker-certifications .classmarker-days-remaining--warning {
	color: #c45c26;
}

.classmarker-certifications .classmarker-days-remaining--urgent,
.classmarker-certifications .classmarker-days-remaining--expired {
	color: #b32d2e;
}

.classmarker-certifications .classmarker-days-expiration {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.85rem;
	font-weight: 400;
	color: var(--cm-text-muted);
}

.classmarker-certifications .classmarker-empty {
	color: var(--cm-empty);
}

/* Action buttons */
.classmarker-certifications .classmarker-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.classmarker-certifications .classmarker-btn {
	display: inline-block;
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	border-radius: 4px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.classmarker-certifications .classmarker-btn--primary {
	background-color: var(--cm-accent);
	border-color: var(--cm-accent);
	color: #fff;
}

.classmarker-certifications .classmarker-btn--primary:hover,
.classmarker-certifications .classmarker-btn--primary:focus,
.classmarker-certifications .classmarker-btn--primary:visited {
	background-color: var(--cm-accent-hover);
	border-color: var(--cm-accent-hover);
	color: #fff;
}

/* Actions buttons — white text (beats Elementor .woocommerce a:hover link color) */
.classmarker-certifications a.classmarker-btn--primary,
.classmarker-certifications a.classmarker-btn--primary:hover,
.classmarker-certifications a.classmarker-btn--primary:focus,
.classmarker-certifications a.classmarker-btn--primary:visited,
.classmarker-certifications .woocommerce-orders-table__cell-order-actions a.classmarker-btn--primary,
.classmarker-certifications .woocommerce-orders-table__cell-order-actions a.classmarker-btn--primary:hover,
.classmarker-certifications .woocommerce-orders-table__cell-order-actions a.classmarker-btn--primary:focus,
.classmarker-certifications .woocommerce-orders-table__cell-order-actions a.classmarker-btn--primary:visited {
	color: #fff !important;
}

.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .classmarker-certifications a.classmarker-btn--primary,
.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .classmarker-certifications a.classmarker-btn--primary:hover,
.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .classmarker-certifications a.classmarker-btn--primary:focus,
.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .classmarker-certifications a.classmarker-btn--primary:visited {
	color: #fff !important;
	background-color: var(--cm-accent) !important;
	border-color: var(--cm-accent) !important;
}

.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .classmarker-certifications a.classmarker-btn--primary:hover,
.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .classmarker-certifications a.classmarker-btn--primary:focus {
	background-color: var(--cm-accent-hover) !important;
	border-color: var(--cm-accent-hover) !important;
}

.classmarker-certifications .classmarker-btn--outline {
	background-color: transparent;
	border-color: var(--cm-accent);
	color: var(--cm-accent);
}

.classmarker-certifications .classmarker-btn--outline:hover,
.classmarker-certifications .classmarker-btn--outline:focus {
	background-color: var(--cm-accent-soft);
	color: var(--cm-accent-hover);
}

.classmarker-certifications .classmarker-btn--small {
	padding: 0.4rem 0.75rem;
	font-size: 0.8125rem;
}

.classmarker-certifications .classmarker-actions-note {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.8rem;
	color: var(--cm-text-muted);
}

.classmarker-certifications .classmarker-actions-unavailable {
	font-size: 0.875rem;
	color: var(--cm-text-muted);
}

/* Ensure action links stay visible (theme overrides) */
.classmarker-certifications .woocommerce-orders-table__cell-order-actions,
.classmarker-certifications .woocommerce-orders-table__cell-order-actions * {
	visibility: visible;
	opacity: 1;
}

.classmarker-certifications .woocommerce-orders-table__cell-order-actions .classmarker-btn {
	position: relative;
	z-index: 1;
}

/* Responsive: stack labels from WooCommerce */
@media (max-width: 768px) {
	.classmarker-certifications .woocommerce-orders-table tbody td {
		padding: 0.5rem 0;
	}

	.classmarker-certifications .classmarker-actions {
		margin-top: 0.25rem;
	}
}
