/**
 * yourCompany Adgang — front-end styles.
 *
 * Based on yourcompany.dk: Open Sans, petrol #173D50, light blue-grey #D9E4EB,
 * yellow #FFCC00, sharp corners, card titles 24px/600, and "Læs mere" style
 * links with a thin yellow line underneath. Colours and fonts come from the
 * site's Elementor globals (with the yourCompany values as fallback), so the
 * blocks follow along if YC changes them.
 *
 * Everything is scoped under .yca so the rest of the site is never affected.
 * Selectors are prefixed with .yca on purpose: themes such as Hello Elementor
 * style button/[type=submit]/input with the same specificity as a single class.
 */

.yca {
	--yca-primary: var(--e-global-color-primary, #173D50);
	--yca-secondary: var(--e-global-color-secondary, #D9E4EB);
	--yca-accent: var(--e-global-color-accent, #FFCC00);
	--yca-accent-hover: #E6B800;
	--yca-white: #FFFFFF;
	--yca-error: #B3261E;
	--yca-error-bg: #FBEDEC;
	--yca-font: var(--e-global-typography-text-font-family, "Open Sans"), Arial, Helvetica, sans-serif;
	--yca-heading-font: var(--e-global-typography-primary-font-family, "Open Sans"), Arial, Helvetica, sans-serif;

	box-sizing: border-box;
	font-family: var(--yca-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
}

.yca *,
.yca *::before,
.yca *::after {
	box-sizing: inherit;
}

.yca [hidden] {
	display: none !important;
}

/* Login, "light": white card on a light blue-grey surface (spec 10) ------------ */

.yca.yca-login {
	background: var(--yca-secondary);
	color: var(--yca-primary);
	padding: 64px 16px;
}


.yca .yca-card {
	background: var(--yca-white);
	color: var(--yca-primary);
	margin: 0 auto;
	max-width: 480px;
	padding: 40px;
}

.yca .yca-title {
	color: var(--yca-primary);
	font-family: var(--yca-heading-font);
	font-size: 24px;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.2;
	margin: 0 0 12px;
	text-transform: none;
}

.yca .yca-lead {
	color: var(--yca-primary);
	margin: 0 0 24px;
}

/* On the page (default): no card — the form sits directly on the page and
 * inherits its colours, like the rest of yourcompany.dk (white text on the dark
 * petrol sections). Uses currentColor so it also works on a light section. */

.yca.yca-login--plain {
	background: transparent;
	color: inherit;
	padding: 0;
}

.yca.yca-login--plain .yca-card {
	background: transparent;
	color: inherit;
	margin: 0;
	padding: 0;
}

.yca.yca-login--plain .yca-title,
.yca.yca-login--plain .yca-lead,
.yca.yca-login--plain .yca-field label {
	color: inherit;
}

.yca.yca-login--plain .yca-field input,
.yca.yca-login--plain .yca-field input:focus {
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
}

.yca.yca-login--plain .yca-notice {
	background: rgba(217, 228, 235, 0.12);
	border-left-color: var(--yca-accent);
	color: inherit;
}

.yca.yca-login--plain .yca-notice--error {
	background: rgba(179, 38, 30, 0.2);
	border-left-color: #F28B82;
}

/* The yellow ring alone is clearly visible on dark backgrounds. */
.yca.yca-login--plain a:focus-visible,
.yca.yca-login--plain button:focus-visible,
.yca.yca-login--plain .yca-field input:focus {
	box-shadow: none;
	outline: 2px solid var(--yca-accent);
	outline-offset: 2px;
}

/* Fields ---------------------------------------------------------------------- */

.yca .yca-field {
	margin: 0 0 24px;
}

.yca .yca-field label {
	color: var(--yca-primary);
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 8px;
}

.yca .yca-field input,
.yca .yca-field input:focus {
	background: var(--yca-secondary);
	border: 1px solid var(--yca-primary);
	border-radius: 0;
	box-shadow: none;
	color: var(--yca-primary);
	font-family: var(--yca-font);
	font-size: 16px;
	height: auto;
	line-height: 1.5;
	margin: 0;
	padding: 12px 14px;
	width: 100%;
}

.yca .yca-field input[name="yca_code"] {
	font-size: 24px;
	font-weight: 600;
	letter-spacing: 8px;
	padding-left: 16px;
}

/* Main button: yellow with dark text, sharp corners ---------------------------- */

.yca .yca-button,
.yca .yca-button:focus,
.yca .yca-button:visited {
	background: var(--yca-accent);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: var(--yca-primary);
	cursor: pointer;
	display: inline-block;
	font-family: var(--yca-font);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.5;
	padding: 12px 32px;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	transition: background-color 0.3s;
}

.yca .yca-button:hover {
	background: var(--yca-accent-hover);
	color: var(--yca-primary);
}

.yca .yca-button--small,
.yca .yca-button--small:focus {
	font-size: 14px;
	padding: 8px 20px;
}

.yca .yca-button[disabled] {
	cursor: progress;
	opacity: 0.7;
}

/* Secondary links: like yourcompany.dk's "Læs mere" — thin yellow line below ----- */

.yca .yca-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 32px;
	margin: 24px 0 0;
}

.yca .yca-link,
.yca .yca-link:focus {
	background: none;
	border: 0;
	border-bottom: 1px solid var(--yca-accent);
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	font-family: var(--yca-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	padding: 0 0 6px;
	text-decoration: none;
	text-transform: none;
	transition: border-color 0.3s;
}

.yca .yca-link:hover {
	background: none;
	border-bottom-color: currentColor;
	color: inherit;
}

.yca .yca-notice a,
.yca .yca-lead a {
	border-bottom: 1px solid var(--yca-accent);
	color: inherit;
	font-weight: 600;
	text-decoration: none;
}

.yca .yca-notice a:hover,
.yca .yca-lead a:hover {
	border-bottom-color: currentColor;
}

/* Focus is always visible: yellow ring with a dark outer ring, readable on light and dark. */
.yca a:focus-visible,
.yca button:focus-visible,
.yca input:focus-visible,
.yca .yca-field input:focus {
	box-shadow: 0 0 0 5px var(--yca-primary);
	outline: 3px solid var(--yca-accent);
	outline-offset: 0;
}

/* Notices ------------------------------------------------------------------- */

.yca .yca-notice {
	background: var(--yca-secondary);
	border-left: 4px solid var(--yca-primary);
	color: var(--yca-primary);
	margin: 0 0 24px;
	padding: 12px 16px;
}

.yca .yca-notice--error {
	background: var(--yca-error-bg);
	border-left-color: var(--yca-error);
}

.yca.yca-inline-form,
.yca .yca-inline-form {
	display: inline;
	margin: 0;
}

/* Protected page ---------------------------------------------------------------
 * Sits directly on the page, so text inherits the page colour (white on YC's
 * dark sections, petrol on light ones). */

.yca.yca-protected {
	color: inherit;
}

.yca .yca-bar {
	align-items: center;
	border-bottom: 1px solid var(--yca-accent);
	display: flex;
	flex-wrap: wrap;
	font-size: 14px;
	gap: 12px 24px;
	justify-content: space-between;
	margin: 0 0 24px;
	padding: 0 0 12px;
}

.yca .yca-bar__user strong {
	font-weight: 600;
}

.yca .yca-frame {
	background: var(--yca-white);
	border: 0;
	display: block;
	width: 100%;
}

/* Height per device (Frame_Height). The wrapper carries --yca-h-desktop/-tablet/
 * -mobile from the settings or the shortcode; tablet falls back to desktop and
 * mobile to tablet. The Elementor widget sets --yca-frame-height directly on the
 * frame, which wins over the inherited values. Breakpoints match Elementor's
 * defaults (tablet <= 1024px, mobile <= 767px). */
.yca .yca-frame,
.yca .yca-placeholder--frame {
	--yca-h: var(--yca-h-desktop, 900px);
}

.yca .yca-frame {
	height: var(--yca-frame-height, var(--yca-h));
}

.yca .yca-placeholder--frame {
	min-height: var(--yca-frame-height, var(--yca-h));
}

@media (max-width: 1024px) {
	.yca .yca-frame,
	.yca .yca-placeholder--frame {
		--yca-h: var(--yca-h-tablet, var(--yca-h-desktop, 900px));
	}
}

@media (max-width: 767px) {
	.yca .yca-frame,
	.yca .yca-placeholder--frame {
		--yca-h: var(--yca-h-mobile, var(--yca-h-tablet, var(--yca-h-desktop, 900px)));
	}
}

.yca.yca-placeholder,
.yca .yca-placeholder {
	align-items: center;
	background: var(--yca-secondary);
	border: 1px dashed var(--yca-primary);
	color: var(--yca-primary);
	display: flex;
	font-family: var(--yca-font);
	justify-content: center;
	padding: 24px;
	text-align: center;
}

/* Mobile: full width -------------------------------------------------------- */

@media (max-width: 600px) {
	.yca.yca-login {
		padding: 0;
	}

	.yca .yca-card {
		max-width: none;
		padding: 32px 20px;
	}

	.yca .yca-card .yca-button {
		width: 100%;
	}
}
