/* Entryvent Connect — neutral front-end defaults. Override in the theme, or disable
   with `add_filter( 'evc_enqueue_frontend_css', '__return_false' )`. */

.evc-login {
	--evc-accent: var(--evc-accent-override, #1a5fa8);
	--evc-error: #c0392b;
	--evc-radius: 6px;
	max-width: 420px;
	margin: 0 auto;
	text-align: left;
}

.evc-login__logo {
	display: block;
	max-width: 280px;
	max-height: 160px;
	width: auto;
	height: auto;
	margin: 0 auto 1.5em;
}

.evc-login__title {
	text-align: center;
	margin: 0 0 1em;
}

.evc-login__field {
	margin: 0 0 1em;
}

.evc-login__field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.evc-login__field input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.7em 0.9em;
	font: inherit;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: var(--evc-radius);
	background: #fff;
}

.evc-login__field input:focus {
	outline: 2px solid var(--evc-accent);
	outline-offset: 1px;
	border-color: var(--evc-accent);
}

.evc-login__error {
	margin: 0 0 1em;
	padding: 0.75em 0.9em;
	border-radius: var(--evc-radius);
	border: 1px solid var(--evc-error);
	color: var(--evc-error);
	background: rgba(192, 57, 43, 0.06);
}

.evc-login__notice {
	margin: 0 0 1em;
	padding: 0.75em 0.9em;
	border-radius: var(--evc-radius);
	border: 1px solid rgba(0, 0, 0, 0.2);
	background: rgba(0, 0, 0, 0.04);
}

.evc-login__actions {
	display: flex;
	gap: 12px;
	margin: 1.25em 0 0;
}

.evc-login__actions .evc-button {
	flex: 1 1 0;
	min-width: 0;
	text-align: center;
}

.evc-button.evc-button--secondary {
	background: transparent;
	color: var(--evc-accent);
	box-shadow: inset 0 0 0 2px var(--evc-accent);
}

.evc-button.evc-button--secondary:hover,
.evc-button.evc-button--secondary:focus {
	color: var(--evc-accent);
	background: rgba(0, 0, 0, 0.04);
	filter: none;
}

.evc-button {
	display: inline-block;
	min-width: 140px;
	padding: 0.75em 1.5em;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--evc-accent);
	border: 0;
	border-radius: var(--evc-radius);
	cursor: pointer;
	text-decoration: none;
}

.evc-button:hover,
.evc-button:focus {
	filter: brightness(1.1);
	color: #fff;
}

.evc-login--logged-in {
	text-align: center;
}

.evc-login--logged-in .evc-link {
	margin-left: 1em;
}

/* QR badge */
.evc-qr {
	display: block;
	max-width: 300px;
	width: 100%;
	height: auto;
	margin: 0 auto;
}

.evc-unavailable {
	text-align: center;
	opacity: 0.8;
}

/* CME table */
.evc-cme {
	--evc-scanned: #2e9e5b;
	--evc-missed: #c0392b;
	--evc-upcoming: #8a8f98;
}

.evc-cme__total {
	text-align: center;
	font-weight: 600;
	margin: 0 0 1em;
}

.evc-cme__day {
	font-size: 1em;
	font-weight: 700;
	margin: 1.25em 0 0.5em;
	padding-bottom: 0.25em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.evc-cme__table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.evc-cme__table td {
	padding: 0.6em 0.4em;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	vertical-align: middle;
}

.evc-cme__icon {
	width: 36px;
}

.evc-cme__badge {
	display: inline-block;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--evc-upcoming);
	position: relative;
}

.evc-cme__badge::after {
	content: "";
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 14px 14px;
}

.is-scanned .evc-cme__badge {
	background: var(--evc-scanned);
}

.is-scanned .evc-cme__badge::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

.is-missed .evc-cme__badge {
	background: var(--evc-missed);
}

.is-missed .evc-cme__badge::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}

.is-upcoming .evc-cme__badge::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.evc-cme__name {
	display: block;
	font-weight: 600;
}

.evc-cme__time {
	display: block;
	font-size: 0.9em;
	opacity: 0.75;
}

.evc-cme__points {
	text-align: right;
	white-space: nowrap;
	font-weight: 600;
}

.is-missed .evc-cme__points {
	opacity: 0.6;
}

/* App navigation (footer) */
.evc-footer {
	display: flex;
	justify-content: space-around;
	align-items: stretch;
	width: 100%;
	text-align: center;
}

.evc-footer__item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 8px 4px;
	text-decoration: none;
}

.evc-footer__icon {
	width: 30px;
	height: 30px;
	margin-bottom: 4px;
}

.evc-footer__label {
	font-size: 12px;
	font-weight: 700;
}

/* Welcome / consent overlay */
.evc-consent {
	--evc-accent: var(--evc-accent-override, #1a5fa8);
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: #fff;
	overflow: auto;
}

.evc-consent-open {
	overflow: hidden;
}

.evc-consent__card {
	max-width: 480px;
	width: 100%;
	text-align: center;
}

.evc-consent__logo {
	display: block;
	max-width: 220px;
	max-height: 120px;
	width: auto;
	height: auto;
	margin: 0 auto 1.5em;
}

.evc-consent__title {
	margin: 0 0 0.75em;
}

.evc-consent__text {
	margin: 0 0 1.25em;
}

.evc-consent__actions {
	margin: 0 0 1.25em;
}

.evc-consent__actions .evc-button {
	border-radius: var(--evc-radius, 6px);
}

.evc-consent__footnote {
	font-size: 0.9em;
	opacity: 0.85;
}

/* Home grid — same look as the DiaEdu app home page; the theme may override. */
.evc-grid {
	--evc-grid-bg: var(--main-color1, #1a3a63);
	--evc-grid-color: #fff;
	--evc-grid-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--evc-grid-cols), 1fr);
	grid-auto-rows: 1fr;
	gap: 20px;
	padding: 10px;
	max-width: 600px;
	margin: auto;
}

.evc-grid__item {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 5px;
}

.evc-grid__item::before {
	content: "";
	display: block;
	padding-top: 100%;
}

.evc-grid__item a {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	background-color: var(--evc-grid-bg);
	color: var(--evc-grid-color);
	border-radius: 5px;
	text-decoration: none;
}

.evc-grid__item img {
	max-width: 50%;
	height: auto;
	margin-bottom: 8px;
}

.evc-grid__label {
	font-size: 16px;
	text-align: center;
}
