/**
 * Comgrap DigitalHub - front de WooCommerce (Mi cuenta, Mis cursos, Mi
 * suscripcion, avisos de acceso y post-venta).
 *
 * "Mi cuenta" lleva la maqueta del perfil de LearnPress del theme (Eduma):
 * cabecera con avatar, menu lateral de pastillas, cifras y lista de cursos.
 * Las medidas son las de ese perfil (pastillas #F1F2F8 de radio 8px, cifras
 * con icono en circulo, pestanas con subrayado) y los colores, los globales
 * de Elementor (Sitio > Colores globales): cambiarlos alli cambia esto.
 */

/* ---------------------------------------------------------------------
 * Paleta
 * ------------------------------------------------------------------ */

body.cgdh-account-layout,
.cgdh-mc,
.cgdh-profile {
	--cgdh-primary: var(--e-global-color-primary, #009de0);
	--cgdh-primary-dark: var(--e-global-color-secondary, #0a46c7);
	--cgdh-ink: var(--e-global-color-accent, #1c1c1b);
	--cgdh-body: var(--e-global-color-text, #555);
	--cgdh-muted: #8d8d8d;
	--cgdh-soft-bg: #f1f2f8;
	--cgdh-line: #e2e0db;
	--cgdh-orange: #fa7500;
	--cgdh-green: #2e7d0a;
}

.cgdh-icon {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
}

/* ---------------------------------------------------------------------
 * Mi cuenta: rejilla de perfil (cabecera arriba, menu a la izquierda)
 * ------------------------------------------------------------------ */

body.cgdh-account-layout .woocommerce:has(> .woocommerce-MyAccount-navigation) {
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	align-items: start;
	column-gap: 40px;
	row-gap: 36px;
}

/* Los "clearfix" del theme serian celdas de la rejilla. */
body.cgdh-account-layout .woocommerce:has(> .woocommerce-MyAccount-navigation)::before,
body.cgdh-account-layout .woocommerce:has(> .woocommerce-MyAccount-navigation)::after {
	display: none;
}

body.cgdh-account-layout .woocommerce > .cgdh-profile {
	grid-column: 1 / -1;
}

body.cgdh-account-layout .woocommerce > .woocommerce-MyAccount-navigation {
	grid-column: 1;
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
}

body.cgdh-account-layout .woocommerce > .woocommerce-MyAccount-content {
	grid-column: 2;
	float: none;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
}

/* Menu: pastillas como las del perfil de LearnPress. */
body.cgdh-account-layout .woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li {
	display: block;
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li::before,
body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li::after,
body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li a::after {
	display: none;
	content: none;
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--cgdh-soft-bg);
	box-shadow: none;
	color: var(--cgdh-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li a::before {
	content: "";
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: var(--cgdh-nav-icon) center / contain no-repeat;
	mask: var(--cgdh-nav-icon) center / contain no-repeat;
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li a:hover,
body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li a:focus-visible {
	background: #e6e9f4;
	color: var(--cgdh-primary);
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li.is-active a {
	background: var(--cgdh-primary);
	color: #fff;
}

/*
 * Iconos del menu (lienzo 24x24, trazo). El de serie (un punto) se pone en la
 * lista y cada enlace lo hereda salvo que su endpoint tenga uno propio.
 */
body.cgdh-account-layout .woocommerce-MyAccount-navigation ul {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--mis-cursos {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--mi-suscripcion {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 1l4 4-4 4'/%3E%3Cpath d='M3 11V9a4 4 0 0 1 4-4h14'/%3E%3Cpath d='M7 23l-4-4 4-4'/%3E%3Cpath d='M21 13v2a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--orders {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--edit-account {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--edit-address {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--downloads {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--payment-methods {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--dashboard {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

body.cgdh-account-layout .woocommerce-MyAccount-navigation-link--customer-logout {
	--cgdh-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
}

/* Cabecera de perfil. */
.cgdh-profile {
	display: flex;
	align-items: center;
	gap: 24px;
}

.cgdh-profile__avatar {
	flex: 0 0 auto;
}

.cgdh-profile__avatar img {
	display: block;
	width: 112px;
	height: 112px;
	border-radius: 50%;
	object-fit: cover;
}

.cgdh-profile__info {
	min-width: 0;
}

.cgdh-profile__name {
	margin: 0 0 6px;
	color: var(--cgdh-ink);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.cgdh-profile__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 0;
	color: var(--cgdh-muted);
	font-size: 15px;
	line-height: 1.5;
}

.cgdh-profile__meta span {
	overflow-wrap: anywhere;
}

.cgdh-profile__plan {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(0, 157, 224, 0.12);
	background: color-mix(in srgb, var(--cgdh-primary) 12%, #fff);
	color: var(--cgdh-primary);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
}

.cgdh-profile__plan:hover,
.cgdh-profile__plan:focus-visible {
	background: var(--cgdh-primary);
	color: #fff;
}

.cgdh-profile__plan .cgdh-icon {
	width: 16px;
	height: 16px;
}

.cgdh-profile__plan-status {
	padding-left: 8px;
	border-left: 1px solid currentColor;
	font-weight: 500;
}

@media (max-width: 991px) {
	body.cgdh-account-layout .woocommerce:has(> .woocommerce-MyAccount-navigation) {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 24px;
	}

	body.cgdh-account-layout .woocommerce > .woocommerce-MyAccount-navigation,
	body.cgdh-account-layout .woocommerce > .woocommerce-MyAccount-content {
		grid-column: 1;
	}

	body.cgdh-account-layout .woocommerce-MyAccount-navigation ul {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px;
	}

	body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li a {
		padding: 10px 16px;
		font-size: 15px;
		white-space: nowrap;
	}
}

@media (max-width: 575px) {
	.cgdh-profile {
		gap: 16px;
	}

	.cgdh-profile__avatar img {
		width: 72px;
		height: 72px;
	}

	.cgdh-profile__name {
		font-size: 24px;
	}

	.cgdh-profile__meta {
		font-size: 14px;
	}
}

/* ---------------------------------------------------------------------
 * Mis cursos (vista de perfil): cifras, plan, pestanas y lista
 * ------------------------------------------------------------------ */

.cgdh-mc__stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 0 0 24px;
}

.cgdh-stat {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 16px;
	border-radius: 8px;
	background: var(--cgdh-soft-bg);
}

.cgdh-stat--total { --cgdh-stat-color: #00a19a; }
.cgdh-stat--en-curso { --cgdh-stat-color: var(--cgdh-primary); }
.cgdh-stat--por-empezar { --cgdh-stat-color: #9b3fcf; }
.cgdh-stat--comprados { --cgdh-stat-color: var(--cgdh-orange); }

.cgdh-stat__icon {
	display: grid;
	flex: 0 0 48px;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	background: color-mix(in srgb, var(--cgdh-stat-color) 14%, #fff);
	color: var(--cgdh-stat-color);
}

.cgdh-stat__icon .cgdh-icon {
	width: 22px;
	height: 22px;
}

.cgdh-stat__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cgdh-stat__label {
	overflow: hidden;
	color: var(--cgdh-body);
	font-size: 15px;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cgdh-stat__number {
	color: var(--cgdh-ink);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
}

/* Tarjeta del plan (o invitacion a uno). */
.cgdh-mc__plan {
	display: flex;
	align-items: center;
	gap: 16px 20px;
	margin: 0 0 32px;
	padding: 18px 20px;
	border: 1px solid var(--cgdh-line);
	border-radius: 8px;
	background: #fff;
}

.cgdh-mc__plan-icon {
	display: grid;
	flex: 0 0 44px;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(0, 157, 224, 0.12);
	background: color-mix(in srgb, var(--cgdh-primary) 12%, #fff);
	color: var(--cgdh-primary);
}

.cgdh-mc__plan-icon .cgdh-icon {
	width: 20px;
	height: 20px;
}

.cgdh-mc__plan-info {
	flex: 1 1 auto;
	min-width: 0;
}

.cgdh-mc__plan-name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0;
	color: var(--cgdh-ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.cgdh-mc__plan-note {
	margin: 2px 0 0;
	color: var(--cgdh-body);
	font-size: 15px;
	line-height: 1.5;
}

.cgdh-mc__plan-link {
	flex: 0 0 auto;
}

.cgdh-mc__intro {
	margin: 0 0 20px;
	color: var(--cgdh-body);
}

.comgrap-dh-notice.comgrap-dh-notice--warning {
	border-left-color: var(--cgdh-orange, #fa7500);
	background: #fff6ea;
}

/* Pestanas de filtro. */
.cgdh-mc__tabs {
	display: flex;
	gap: 0 32px;
	margin: 0 0 20px;
	padding: 0;
	overflow-x: auto;
	border-bottom: 1px solid var(--cgdh-line);
	scrollbar-width: none;
}

.cgdh-mc__tabs[hidden] {
	display: none;
}

.cgdh-mc .cgdh-mc__tab {
	flex: 0 0 auto;
	min-height: 0;
	margin: 0 0 -1px;
	padding: 0 0 14px;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--cgdh-ink);
	cursor: pointer;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.4;
	text-transform: none;
	white-space: nowrap;
}

.cgdh-mc .cgdh-mc__tab:hover {
	background: none;
	color: var(--cgdh-primary);
}

.cgdh-mc .cgdh-mc__tab[aria-selected="true"] {
	border-bottom-color: var(--cgdh-primary);
	color: var(--cgdh-primary);
}

.cgdh-mc .cgdh-mc__tab:focus-visible {
	outline: 2px solid var(--cgdh-primary);
	outline-offset: 2px;
}

.cgdh-mc__tab-count {
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--cgdh-soft-bg);
	color: var(--cgdh-muted);
	font-size: 13px;
	font-weight: 600;
}

.cgdh-mc__tab[aria-selected="true"] .cgdh-mc__tab-count {
	background: rgba(0, 157, 224, 0.12);
	background: color-mix(in srgb, var(--cgdh-primary) 12%, #fff);
	color: var(--cgdh-primary);
}

/* Lista de cursos. */
.cgdh-mc__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cgdh-course {
	display: grid;
	grid-template-columns: 168px minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px 24px;
	margin: 0;
	padding: 14px;
	border: 1px solid var(--cgdh-line);
	border-radius: 12px;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cgdh-course[hidden] {
	display: none;
}

.cgdh-course:hover {
	border-color: transparent;
	box-shadow: 0 10px 30px rgba(28, 28, 27, 0.08);
}

.cgdh-course__thumb {
	display: grid;
	place-items: center;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-radius: 8px;
	background: var(--cgdh-soft-bg);
	color: var(--cgdh-muted);
}

.cgdh-course__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.cgdh-course:hover .cgdh-course__thumb img {
	transform: scale(1.04);
}

.cgdh-course__placeholder {
	width: 32px;
	height: 32px;
}

.cgdh-course__body {
	min-width: 0;
}

.cgdh-course__cat {
	margin: 0 0 4px;
	color: var(--cgdh-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.cgdh-course__title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
}

.cgdh-course__title a {
	color: var(--cgdh-ink);
	text-decoration: none;
}

.cgdh-course__title a:hover,
.cgdh-course__title a:focus-visible {
	color: var(--cgdh-primary);
}

.cgdh-course__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 0;
	color: var(--cgdh-body);
	font-size: 14px;
	line-height: 1.4;
}

.cgdh-course__access {
	color: var(--cgdh-muted);
}

.cgdh-course__actions {
	display: flex;
	justify-content: flex-end;
}

/* Mismo ancho para los tres estados: la columna de botones queda alineada. */
.cgdh-course__actions .cgdh-btn {
	min-width: 200px;
}

.cgdh-course__note {
	max-width: 220px;
	color: var(--cgdh-muted);
	font-size: 14px;
}

.cgdh-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}

.cgdh-badge--listo,
.cgdh-badge--plan {
	background: #e8f6e1;
	color: var(--cgdh-green);
}

.cgdh-badge--por_activar {
	background: rgba(0, 157, 224, 0.12);
	background: color-mix(in srgb, var(--cgdh-primary) 12%, #fff);
	color: #0b6f9e;
}

.cgdh-badge--error {
	background: #fff1e3;
	color: #b35300;
}

/* Botones. */
.cgdh-btn,
.cgdh-mc .cgdh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 22px;
	border: 1px solid var(--cgdh-primary);
	border-radius: 8px;
	background: var(--cgdh-primary);
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cgdh-btn:hover,
.cgdh-btn:focus-visible,
.cgdh-mc .cgdh-btn:hover,
.cgdh-mc .cgdh-btn:focus-visible {
	border-color: var(--cgdh-primary-dark);
	background: var(--cgdh-primary-dark);
	color: #fff;
}

.cgdh-btn .cgdh-icon {
	width: 18px;
	height: 18px;
	transition: transform 0.2s ease;
}

.cgdh-btn:hover .cgdh-icon {
	transform: translateX(3px);
}

.cgdh-mc .cgdh-btn--error {
	border-color: var(--cgdh-orange);
	background: var(--cgdh-orange);
}

.cgdh-mc .cgdh-btn--error:hover,
.cgdh-mc .cgdh-btn--error:focus-visible {
	border-color: #d96400;
	background: #d96400;
}

.cgdh-btn--ghost,
.cgdh-mc .cgdh-btn--ghost {
	background: #fff;
	color: var(--cgdh-primary);
}

.cgdh-btn--ghost:hover,
.cgdh-btn--ghost:focus-visible,
.cgdh-mc .cgdh-btn--ghost:hover,
.cgdh-mc .cgdh-btn--ghost:focus-visible {
	border-color: var(--cgdh-primary);
	background: var(--cgdh-primary);
	color: #fff;
}

.cgdh-btn[hidden],
.cgdh-mc .cgdh-btn[hidden] {
	display: none;
}

.cgdh-mc__more {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}

.cgdh-mc__filter-empty {
	margin: 16px 0 0;
	padding: 24px;
	border: 1px dashed var(--cgdh-line);
	border-radius: 8px;
	color: var(--cgdh-muted);
	text-align: center;
}

.cgdh-mc__filter-empty[hidden] {
	display: none;
}

/* Sin cursos (o sin sesion). */
.cgdh-mc__empty {
	padding: 48px 24px;
	border: 1px dashed var(--cgdh-line);
	border-radius: 12px;
	background: #fff;
	text-align: center;
}

.cgdh-mc__empty-icon {
	display: inline-grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: rgba(0, 157, 224, 0.12);
	background: color-mix(in srgb, var(--cgdh-primary) 12%, #fff);
	color: var(--cgdh-primary);
}

.cgdh-mc__empty-icon .cgdh-icon {
	width: 32px;
	height: 32px;
}

.cgdh-mc__empty-title {
	margin: 0 0 8px;
	color: var(--cgdh-ink);
	font-size: 22px;
}

.cgdh-mc__empty-text {
	max-width: 480px;
	margin: 0 auto 20px;
	color: var(--cgdh-body);
}

.cgdh-mc__empty-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 0;
}

@media (max-width: 1199px) {
	.cgdh-mc__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.cgdh-mc__plan {
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr);
		gap: 14px;
		padding: 16px;
	}

	.cgdh-mc__plan-link {
		grid-column: 1 / -1;
		width: 100%;
	}

	.cgdh-course {
		grid-template-columns: 112px minmax(0, 1fr);
		gap: 14px;
		padding: 12px;
	}

	.cgdh-course__title {
		margin-bottom: 8px;
		font-size: 16px;
	}

	.cgdh-course__actions {
		grid-column: 1 / -1;
	}

	.cgdh-course__actions .cgdh-btn {
		width: 100%;
	}

	.cgdh-mc .cgdh-mc__tab {
		font-size: 16px;
	}

	.cgdh-mc__tabs {
		gap: 0 24px;
	}
}

@media (max-width: 575px) {
	.cgdh-mc__stats {
		gap: 12px;
	}

	.cgdh-stat {
		gap: 10px;
		padding: 12px;
	}

	.cgdh-stat__icon {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}

	.cgdh-stat__icon .cgdh-icon {
		width: 18px;
		height: 18px;
	}

	/* En dos columnas estrechas vale mas partir la linea que cortar la palabra. */
	.cgdh-stat__label {
		font-size: 14px;
		white-space: normal;
	}

	body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li a {
		gap: 8px;
		padding: 9px 14px;
		font-size: 14px;
	}

	body.cgdh-account-layout .woocommerce-MyAccount-navigation ul li a::before {
		flex-basis: 16px;
		width: 16px;
		height: 16px;
	}

	.cgdh-stat__number {
		font-size: 20px;
	}
}

@media (max-width: 400px) {
	.cgdh-course {
		grid-template-columns: 88px minmax(0, 1fr);
	}
}

.comgrap-dh-account,
.comgrap-dh-thankyou,
.comgrap-dh-product-notice {
	--cgdh-blue: #009de0;
	--cgdh-blue-dark: #007fb5;
	--cgdh-text: #333;
	--cgdh-muted: #6b6b6b;
	--cgdh-border: #e0e0e0;
	--cgdh-radius: 8px;
	--cgdh-soft: #f5fbfe;
	--cgdh-warn: #b25e00;
	--cgdh-warn-bg: #fff6ea;
	--cgdh-error: #c62828;
	--cgdh-error-bg: #fdecec;
	color: var(--cgdh-text);
}

/* ---------------------------------------------------------------------
 * Avisos
 * ------------------------------------------------------------------ */

.comgrap-dh-notice {
	margin: 0 0 20px;
	padding: 12px 16px;
	border: 1px solid var(--cgdh-border, #e0e0e0);
	border-left: 4px solid var(--cgdh-blue, #009de0);
	border-radius: var(--cgdh-radius, 8px);
	background: var(--cgdh-soft, #f5fbfe);
	color: var(--cgdh-text, #333);
	line-height: 1.5;
}

.comgrap-dh-notice--error {
	border-left-color: var(--cgdh-error, #c62828);
	background: var(--cgdh-error-bg, #fdecec);
}

.comgrap-dh-notice--success {
	border-left-color: #2e7d32;
	background: #eef7ee;
}

/* ---------------------------------------------------------------------
 * Mis cursos: bloques y rejilla (plantilla Loop Item)
 * ------------------------------------------------------------------ */

.comgrap-dh-mc__block {
	margin: 0 0 40px;
}

.comgrap-dh-mc__heading {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 1.3;
}

.comgrap-dh-mc__count {
	color: var(--cgdh-muted);
	font-weight: 400;
}

.comgrap-dh-mc__intro {
	margin: 0 0 20px;
	color: var(--cgdh-muted);
}

.comgrap-dh-mc__intro--warning {
	padding: 10px 14px;
	border-radius: var(--cgdh-radius);
	background: var(--cgdh-warn-bg);
	color: var(--cgdh-warn);
}

/*
 * El marcado es el de /cursos/ (thim-ekits-archive-product), cuyo CSS lee
 * --archiver-product-grid-template-columns. Aqui se da el numero de columnas
 * y una rejilla de respaldo por si el CSS del kit no estuviera cargado.
 */
.comgrap-dh-mc__grid {
	--archiver-product-grid-template-columns: 3;
	--archiver-product-grid-column-gap: 30px;
	--archiver-product-grid-row-gap: 30px;
}

.comgrap-dh-mc__grid--cols-1 { --archiver-product-grid-template-columns: 1; }
.comgrap-dh-mc__grid--cols-2 { --archiver-product-grid-template-columns: 2; }
.comgrap-dh-mc__grid--cols-4 { --archiver-product-grid-template-columns: 4; }
.comgrap-dh-mc__grid--cols-5 { --archiver-product-grid-template-columns: 5; }
.comgrap-dh-mc__grid--cols-6 { --archiver-product-grid-template-columns: 6; }

.comgrap-dh-account .comgrap-dh-mc__grid .thim-ekits-product ul.products {
	display: grid;
	grid-template-columns: repeat(var(--archiver-product-grid-template-columns, 3), minmax(0, 1fr));
	column-gap: var(--archiver-product-grid-column-gap, 30px);
	row-gap: var(--archiver-product-grid-row-gap, 30px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.comgrap-dh-account .comgrap-dh-mc__grid .thim-ekits-product ul.products::before,
.comgrap-dh-account .comgrap-dh-mc__grid .thim-ekits-product ul.products::after {
	content: none !important;
}

.comgrap-dh-account .comgrap-dh-mc__grid .thim-ekits-product ul.products > li.product {
	float: none;
	width: auto !important;
	margin: 0;
	padding: 0;
}

/* Dentro de "Mi cuenta" el contenido comparte ancho con el menu lateral. */
@media (max-width: 1199px) {
	.woocommerce-MyAccount-content .comgrap-dh-mc__grid {
		--archiver-product-grid-template-columns: 2;
	}
}

@media (max-width: 1024px) {
	.comgrap-dh-mc__grid {
		--archiver-product-grid-template-columns: 2;
	}
}

@media (max-width: 767px) {
	.comgrap-dh-mc__grid,
	.woocommerce-MyAccount-content .comgrap-dh-mc__grid {
		--archiver-product-grid-template-columns: 1;
	}
}

.comgrap-dh-mc__pagination {
	margin-top: 24px;
}

.comgrap-dh-mc__upsell {
	margin: 0;
}

/* ---------------------------------------------------------------------
 * Tarjeta PHP de respaldo
 * ------------------------------------------------------------------ */

.comgrap-dh-account__title {
	margin: 0 0 16px;
}

.comgrap-dh-account__list {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.comgrap-dh-account__row {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comgrap-dh-account__item {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 100%;
	padding: 16px;
	border: 1px solid var(--cgdh-border);
	border-radius: var(--cgdh-radius);
	background: #fff;
}

.comgrap-dh-mc__grid .comgrap-dh-account__item {
	flex-direction: column;
	align-items: stretch;
}

.comgrap-dh-account__media {
	flex: 0 0 160px;
}

.comgrap-dh-mc__grid .comgrap-dh-account__media {
	flex: none;
}

.comgrap-dh-account__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 666 / 450;
	object-fit: cover;
	border-radius: var(--cgdh-radius);
}

.comgrap-dh-account__body {
	flex: 1 1 auto;
	min-width: 0;
}

.comgrap-dh-account__name {
	margin: 0 0 6px;
	font-size: 18px;
	line-height: 1.3;
}

.comgrap-dh-account__meta {
	margin: 0;
	font-size: 14px;
}

.comgrap-dh-account__state {
	color: var(--cgdh-blue);
	font-weight: 600;
}

.comgrap-dh-account__state--error {
	color: var(--cgdh-warn);
}

.comgrap-dh-account__badge {
	display: inline-block;
	margin: 0 6px 4px 0;
	padding: 2px 8px;
	border-radius: var(--cgdh-radius);
	background: var(--cgdh-soft);
	color: var(--cgdh-blue);
	font-size: 13px;
}

.comgrap-dh-account__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

.comgrap-dh-account .comgrap-dh-account__cta,
.comgrap-dh-thankyou .comgrap-dh-account__cta,
.comgrap-dh-thankyou__cta,
.comgrap-dh-product-notice .comgrap-dh-product__cta {
	display: inline-block;
	padding: 10px 20px;
	border: 0;
	border-radius: var(--cgdh-radius);
	background: var(--cgdh-blue);
	color: #fff;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
}

.comgrap-dh-account .comgrap-dh-account__cta:hover,
.comgrap-dh-account .comgrap-dh-account__cta:focus,
.comgrap-dh-thankyou .comgrap-dh-account__cta:hover,
.comgrap-dh-thankyou__cta:hover,
.comgrap-dh-thankyou__cta:focus,
.comgrap-dh-product-notice .comgrap-dh-product__cta:hover,
.comgrap-dh-product-notice .comgrap-dh-product__cta:focus {
	background: var(--cgdh-blue-dark);
	color: #fff;
}

.comgrap-dh-account .comgrap-dh-account__cta--error {
	background: var(--cgdh-warn);
}

.comgrap-dh-account__link,
.comgrap-dh-product-notice__link {
	color: var(--cgdh-blue);
	text-decoration: underline;
}

.comgrap-dh-account__note,
.comgrap-dh-account__empty {
	color: var(--cgdh-muted);
}

@media (max-width: 767px) {
	.comgrap-dh-account__item {
		flex-direction: column;
		align-items: stretch;
	}

	.comgrap-dh-account__media {
		flex: none;
	}
}

/* ---------------------------------------------------------------------
 * Mi suscripcion
 * ------------------------------------------------------------------ */

.comgrap-dh-subscription__card {
	margin: 0 0 24px;
	padding: 20px;
	border: 1px solid var(--cgdh-border);
	border-radius: var(--cgdh-radius);
	background: #fff;
}

.comgrap-dh-subscription__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 16px;
}

.comgrap-dh-subscription__plan {
	margin: 0;
	font-size: 20px;
}

.comgrap-dh-subscription__status {
	padding: 2px 10px;
	border-radius: var(--cgdh-radius);
	background: var(--cgdh-soft);
	color: var(--cgdh-blue);
	font-size: 13px;
	font-weight: 600;
}

.comgrap-dh-subscription__status--suspended,
.comgrap-dh-subscription__status--ending {
	background: var(--cgdh-warn-bg);
	color: var(--cgdh-warn);
}

.comgrap-dh-subscription__details {
	margin: 0 0 16px;
}

.comgrap-dh-subscription__row {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	padding: 8px 0;
	border-bottom: 1px solid var(--cgdh-border);
}

.comgrap-dh-subscription__row dt {
	flex: 0 0 160px;
	margin: 0;
	color: var(--cgdh-muted);
	font-weight: 400;
}

.comgrap-dh-subscription__row dd {
	margin: 0;
	font-weight: 600;
}

.comgrap-dh-subscription__interval {
	margin-left: 4px;
	color: var(--cgdh-muted);
	font-weight: 400;
}

.comgrap-dh-subscription__actions {
	margin: 0;
}

.comgrap-dh-subscription__cancel {
	padding: 16px 20px;
	border: 1px dashed var(--cgdh-border);
	border-radius: var(--cgdh-radius);
}

.comgrap-dh-subscription__cancel-note {
	margin: 0 0 12px;
	color: var(--cgdh-muted);
	font-size: 14px;
}

.comgrap-dh-account .comgrap-dh-subscription__cancel-button {
	border: 1px solid var(--cgdh-error);
	border-radius: var(--cgdh-radius);
	background: #fff;
	color: var(--cgdh-error);
}

.comgrap-dh-account .comgrap-dh-subscription__cancel-button:hover,
.comgrap-dh-account .comgrap-dh-subscription__cancel-button:focus {
	background: var(--cgdh-error);
	color: #fff;
}

.comgrap-dh-subscription__cancel[aria-busy="true"] {
	opacity: 0.6;
}

/* ---------------------------------------------------------------------
 * Ficha del curso
 * ------------------------------------------------------------------ */

.comgrap-dh-product-notice {
	margin: 0 0 16px;
	padding: 16px;
	border: 1px solid var(--cgdh-border);
	border-radius: var(--cgdh-radius);
	background: var(--cgdh-soft);
}

.comgrap-dh-product-notice__title {
	margin: 0 0 4px;
	font-weight: 700;
}

.comgrap-dh-product-notice__text {
	margin: 0 0 12px;
}

.comgrap-dh-product-notice__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 0;
}

/* ---------------------------------------------------------------------
 * Pedido recibido
 * ------------------------------------------------------------------ */

.comgrap-dh-thankyou {
	margin: 0 0 32px;
	padding: 24px;
	border: 1px solid var(--cgdh-border);
	border-radius: var(--cgdh-radius);
	background: #fff;
}

.comgrap-dh-thankyou__title {
	margin: 0 0 8px;
	color: var(--cgdh-blue);
}

.comgrap-dh-thankyou__lead {
	margin: 0 0 16px;
}

.comgrap-dh-thankyou__courses {
	display: grid;
	gap: 12px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.comgrap-dh-thankyou__course {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin: 0;
	padding: 12px;
	border: 1px solid var(--cgdh-border);
	border-radius: var(--cgdh-radius);
}

.comgrap-dh-thankyou__image {
	width: 96px;
	height: auto;
	border-radius: var(--cgdh-radius);
}

.comgrap-dh-thankyou__name {
	flex: 1 1 200px;
	font-weight: 600;
}

.comgrap-dh-thankyou__note {
	color: var(--cgdh-muted);
}

.comgrap-dh-thankyou__actions {
	margin: 0;
}
