/**
 * AXO embed CSS overrides — match Pluskredit brand.
 *
 * AXO's whitelabel embed renders inside our /ansoegning/ page using a sophisticated
 * design-token system on [data-theme=lendme]. By overriding the design tokens at
 * the same selector, ALL components automatically rebrand to Pluskredit colors/fonts.
 *
 * Pluskredit brand reference:
 *   --coral:  #FF6B57  (primary CTA / brand accent)
 *   --ink:    #0B1B3D  (primary dark, used for main CTA button bg)
 *   --ink-2:  #243E66  (body text)
 *   --muted:  #5C6B83  (secondary text)
 *   --linen:  #F6F4F1  (subtle bg)
 *   --line:   #D8DEE8  (borders)
 *   font:     Inter Tight, Inter, system-ui
 *
 * Strategy: target AXO's design tokens directly via [data-theme=lendme]. CSS Cascade
 * Layers means our unlayered overrides outrank AXO's @layer base declarations.
 *
 * @package PluskreditAxo
 */

/* ============================================================
 * THEME TOKEN OVERRIDES — apply Pluskredit colors + fonts to ALL components
 * Target the highest-level design tokens — they cascade to buttons, inputs, etc.
 * ============================================================ */
[data-theme=lendme] {
	/* PRIMARY (was green) → Pluskredit coral. Drives main brand accents. */
	--color-primary-default:   #FF6B57 !important;
	--color-primary-dark:      #E84E37 !important;
	--color-primary-darkest:   #C73E27 !important;
	--color-primary-light:     #FFD8D1 !important;

	/* SECONDARY (was orange) → Pluskredit ink (dark navy). */
	--color-secondary-default: #0B1B3D !important;
	--color-secondary-dark:    #050E20 !important;
	--color-secondary-light:   #C9D1E0 !important;

	/* TYPOGRAPHY — Use Inter Tight for both body + headings. */
	--typography-font-family-default: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif !important;
	--typography-font-family-heading: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif !important;
	--typography-subtext-font-family: 'Inter Tight', 'Inter', system-ui, sans-serif !important;
	--typography-title-hero-font-family: 'Inter Tight', 'Inter', system-ui, sans-serif !important;
	--typography-title-subtitle-font-family: 'Inter Tight', 'Inter', system-ui, sans-serif !important;

	/* BUTTON-SPECIFIC tokens — primary CTA should be Pluskredit ink (dark), like our calculator submit. */
	--button-color-background-primary:   #0B1B3D !important;
	--button-color-foreground-primary:   #FFFFFF !important;
	--button-color-border-primary:       #0B1B3D !important;

	--button-color-background-secondary: #FFFFFF !important;
	--button-color-foreground-secondary: #0B1B3D !important;
	--button-color-border-secondary:     #D8DEE8 !important;

	/* RADIUS — slightly more rounded than AXO default. */
	--action-radius-button: 10px !important;
	--global-radius-medium: 12px !important;
	--global-radius-small:  8px !important;
	--global-radius-large:  16px !important;

	/* FOCUS RING — coral instead of green. */
	--global-color-border-focus: #FF6B57 !important;
	--effect-shadow-focus-ring:  0 0 0 3px rgba(255, 107, 87, 0.18) !important;
}

/* ============================================================
 * DIRECT SELECTOR OVERRIDES — for cases where AXO hardcoded colors.
 * Example: e-skat login button hardcodes #14143c instead of token.
 * ============================================================ */

/* e-skat login button — hardcoded #14143c → ink */
.ansoegning [data-theme=lendme] [class*="_eskatLogin_"][data-variant="primary"] {
	background-color: #0B1B3D !important;
	border-color:     #0B1B3D !important;
	color:            #FFFFFF !important;
}

/* Generic primary buttons — additional safety override */
.ansoegning [data-theme=lendme] [class*="_button_"][data-variant="primary"] {
	background: #0B1B3D !important;
	color:      #FFFFFF !important;
	box-shadow: inset 0 0 0 1px #0B1B3D !important;
}
.ansoegning [data-theme=lendme] [class*="_button_"][data-variant="primary"]:hover {
	background: #050E20 !important;
}

/* Card backgrounds — Pluskredit paper with subtle shadow */
.ansoegning [data-theme=lendme] [class*="_card_"] {
	background:    #FFFFFF !important;
	border-radius: 12px !important;
	box-shadow:    0 1px 3px rgba(11, 27, 61, 0.06), 0 4px 12px rgba(11, 27, 61, 0.04) !important;
}

/* Links inside embed — coral underlined */
.ansoegning [data-theme=lendme] a {
	color: #FF6B57 !important;
	text-decoration: underline !important;
	text-underline-offset: 2px !important;
}
.ansoegning [data-theme=lendme] a:hover {
	text-decoration-thickness: 2px !important;
}

/* ============================================================
 * UNIVERSAL FALLBACK — typography overrides via element selectors
 * Kept from v1 in case [data-theme=lendme] context is missing on some pages.
 * ============================================================ */
.ansoegning .ans-form-wrap *,
.ansoegning .ans-form-wrap *:before,
.ansoegning .ans-form-wrap *:after {
	box-sizing: border-box;
	font-family: 'Inter Tight', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ============================================================
 * RESPONSIVE — mobile
 * ============================================================ */
@media (max-width: 640px) {
	.ansoegning [data-theme=lendme] [class*="_button_"] {
		font-size: 15px !important;
		padding: 12px 20px !important;
	}
}
