/* DGTLMS Connect — front-end styles. Colors follow the theme where possible;
   the accent comes from the settings (--dgtlms-accent, --dgtlms-accent-text). */

.dgtlms-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 18px;
	box-sizing: border-box;
	border: 2px solid var(--dgtlms-accent, #4453e0);
	border-radius: 8px;
	background: var(--dgtlms-accent, #4453e0);
	color: var(--dgtlms-accent-text, #fff) !important;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
}
.dgtlms-button:hover { filter: brightness(0.92); }
.dgtlms-button:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.dgtlms-button__icon { flex: 0 0 auto; }
.dgtlms-button--ghost {
	background: transparent;
	color: inherit !important;
	border-color: currentColor;
}
.dgtlms-button--ghost:hover { filter: none; background: rgba(127, 127, 127, 0.12); }
.dgtlms-menu-item { display: flex; align-items: center; }
.dgtlms-button--menu { min-height: 40px; padding: 8px 14px; }

.dgtlms-trainings { margin: 0 0 2em; }
.dgtlms-trainings__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}
.dgtlms-trainings__title { margin: 0; }
.dgtlms-trainings__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dgtlms-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 18px 20px;
	border: 1px solid rgba(127, 127, 127, 0.3);
	border-radius: 12px;
}
.dgtlms-card__body { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dgtlms-card__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dgtlms-card__title { margin: 0; font-size: 1.1em; }
.dgtlms-card__meta { margin: 0; font-size: 0.9em; opacity: 0.85; }
.dgtlms-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Badges: dark text on a light tint, at least 7:1 on their own background. */
.dgtlms-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8em; font-weight: 700; }
.dgtlms-badge--not_started { background: #fdf3e3; color: #6b4100; }
.dgtlms-badge--in_progress { background: #eef0fd; color: #2a359f; }
.dgtlms-badge--completed { background: #e7f5ee; color: #0a5530; }

.dgtlms-progress { display: flex; align-items: center; gap: 12px; }
.dgtlms-progress__track { flex: 1 1 auto; max-width: 320px; height: 8px; border-radius: 999px; background: rgba(127, 127, 127, 0.25); overflow: hidden; }
.dgtlms-progress__bar { height: 100%; background: var(--dgtlms-accent, #4453e0); }
.dgtlms-progress__value { font-size: 0.85em; font-weight: 700; }

.dgtlms-notice { padding: 12px 16px; border-radius: 8px; background: rgba(127, 127, 127, 0.12); }

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

/* Product page: « Who are you buying for? » */
.dgtlms-for-whom { margin: 0 0 1.2em; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dgtlms-for-whom legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.dgtlms-for-whom__choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid rgba(127, 127, 127, 0.4); border-radius: 10px; cursor: pointer; }
.dgtlms-for-whom__choice.is-selected { border: 2px solid var(--dgtlms-accent, #4453e0); padding: 11px 13px; }
.dgtlms-for-whom__choice input { margin-top: 4px; }
.dgtlms-for-whom__team { grid-column: 1 / -1; margin: 0; }
@media (max-width: 480px) { .dgtlms-for-whom { grid-template-columns: 1fr; } }
/* Session labels (name + dates) are long: the variation picker must not widen the page. */
.dgtlms-product table.variations { table-layout: fixed; width: 100%; contain: inline-size; }
.dgtlms-product table.variations select { width: 100%; max-width: 100%; }
/* A fieldset is as wide as its content by default, and WooCommerce's add-to-cart form is a grid. */
/* contain: its text must not size the columns of WooCommerce's grid (wide page on a phone). */
.dgtlms-for-whom { min-width: 0; min-inline-size: 0; contain: inline-size; width: 100%; grid-column: 1 / -1; }
.dgtlms-product form.cart > * { min-width: 0; }

/* My account › Purchased seats */
.dgtlms-seats__group { margin: 0 0 2.5em; }
.dgtlms-seats__title { margin: 0 0 4px; }
.dgtlms-seats__stats { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dgtlms-seats__stats li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid rgba(127, 127, 127, 0.3); border-radius: 10px; }
.dgtlms-seats__stats strong { font-size: 1.6em; line-height: 1.1; }
.dgtlms-seats__stat--todo { border: 2px solid var(--dgtlms-accent, #4453e0) !important; }
.dgtlms-seats__assign { padding: 16px 18px; border: 1px solid rgba(127, 127, 127, 0.3); border-radius: 12px; margin: 0 0 10px; }
.dgtlms-seats__assign h3, .dgtlms-seats__head h3 { margin: 0 0 10px; font-size: 1.05em; }
.dgtlms-seats__fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.dgtlms-seats__fields label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; font-size: 0.9em; font-weight: 600; }
.dgtlms-seats__fields .dgtlms-seats__email { flex: 2 1 220px; }
.dgtlms-seats__fields input { min-height: 44px; box-sizing: border-box; }
.dgtlms-seats__import { margin: 0 0 18px; }
.dgtlms-seats__import summary { cursor: pointer; }
.dgtlms-seats__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 18px; }
/* position: relative keeps the screen-reader texts (absolute) inside the scroll box. */
.dgtlms-seats__table-wrap { overflow-x: auto; position: relative; }
.dgtlms-seats__table { width: 100%; min-width: 560px; border-collapse: collapse; }
.dgtlms-seats__table th, .dgtlms-seats__table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(127, 127, 127, 0.25); vertical-align: middle; }
.dgtlms-seats__actions { text-align: right; }
.dgtlms-seats__actions form { display: block; margin: 0; }
.dgtlms-seats__table .dgtlms-progress__track { min-width: 60px; }
.dgtlms-seats__table .dgtlms-badge { white-space: nowrap; }
.dgtlms-link { background: none; border: 0; padding: 4px; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.9em; }
.dgtlms-badge--active { background: #e7f5ee; color: #0a5530; }
.dgtlms-badge--invited { background: #fdf3e3; color: #6b4100; }
.dgtlms-badge--pending { background: #fdecec; color: #8a1c1c; }
.dgtlms-thankyou { margin: 1.5em 0; padding: 16px 18px; border: 1px solid rgba(127, 127, 127, 0.3); border-radius: 12px; }
.dgtlms-seats .screen-reader-text, .dgtlms-for-whom .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
