/* Builder CSS variables for dimediumgroup (adapted from stiginterior starter)
 * Dim uses --colorPrimary (#114696 blue) and --colorSecondary (#e32237 red) instead of --primary/--secondary.
 * These vars feed /public-assets/css/builder.css + /gocms-assets/css/builder-editor.css.
 *
 * Struktuur järgib stig _public/css/style.css:1500-1555 (Liina 2026-10-20 polish-batch).
 * Dim-palett: Bg2/Bg3/Bg4/Bg6 on tumedad → valge tekst (stig-is Bg3/Bg4/Bg6 — Bg2 oli hall).
 */

:root {
	/* --primary alias to dim's blue — needed by builder.css hard-coded `var(--primary, #123e2f)` */
	--primary: var(--colorPrimary);
	--secondary: var(--colorSecondary);

	/* Container & columns */
	--edtrCntnrW: 1250px;
	--tolerance: 0rem;
	--edtrClmsCntnrW-net: calc(var(--edtrCntnrW) - (2 * var(--centered-wrap_gX)));
	--edtrClmsCntnr: calc(var(--edtrCntnrW) - (2 * var(--centered-wrap_gX) + var(--tolerance)));
	--edtrClmsCount: 1;
	--edtrClmsGapX: 1.5rem;
	--edtrClmsGapY: 1.5rem;
	--edtrClmsBdrX: 0;
	--edtrClmsMin: calc((var(--edtrClmsCntnr) - (var(--edtrClmsCount) - 1) * var(--edtrClmsGapX)) / var(--edtrClmsCount));
	--edtrClmPdX: 1.5rem;
	--edtrBoxedPad: 1.5rem;
	--edtrBlockGap: 1rem;
	--edtrBlockGapL: 2rem;

	/* Column widths (fallback) */
	--edtrCol1: 1fr;
	--edtrCol2: 1fr;

	/* Backgrounds — dim palett (slot-i järjekord sama mis stig polish-batch 2026-10-20: Hele / Hall / Kuldne / Pruun / Varjuga + Lilla) */
	--edtrBg1: #65c2f8;       /* dim light blue (Hele slot) */
	--edtrBg2: #0788dd;       /* dim sinine (Hall slot) */
	--edtrBg3: #114695;       /* dim navy, logo D-värv (Kuldne slot) */
	--edtrBg4: #e32237;       /* dim punane (Pruun slot) */
	--edtrBg5: #65c2f8;       /* Varjuga kaart (sama Bg1-ga) */
	--edtrBg5Text: #fff;      /* kaardi tekstivärv */
	--edtrBg6: #645962;       /* Lilla (stig default; tenant võib muuta kui 6. brand-värv tekib) */

	/* Title XL sizes */
	--edtrTitleXL: calc(1.15 * var(--article__h1));
	--edtrTitleXL2: calc(1.3 * var(--article__h1));
	--edtrTitleXL3: calc(1.6 * var(--article__h1));
}

/* Larger paddings on wider screens */
@media (min-width: 768px) {
	:root {
		--edtrClmPdX: clamp(1.5rem, 1.24187rem + 1.14723vw, 2.25rem);
	}
}
@media (min-width: 1200px) {
	:root {
		--edtrClmPdX: clamp(2.25rem, 1.47562rem + 3.44168vw, 4.5rem);
	}
}

/* --------------------------------------------------------------------------
   Rea taust 6 (Lilla) — stig polish-batch style.css:1526 analoog
   -------------------------------------------------------------------------- */
.edtrClms.edtrBg6 {border-image: linear-gradient(var(--edtrBg6), var(--edtrBg6)) fill 0 // 0 100vw; background-color: var(--edtrBg6);}
.edtrClms__c.edtrBg6 {background-color: var(--edtrBg6);}

/* --------------------------------------------------------------------------
   edtrBg5 (Varjuga kaart) padding reset — padding tuleb ainult hasPdX* combost
   (stig style.css:1521-1522, Liina 2026-10-19). Ilma selleta builder.css:194
   lööb peale 1.75rem/1.5rem, mis segab hasPdX comboga.
   -------------------------------------------------------------------------- */
.edtrClms__c.edtrBg5 {padding-top: 0; padding-bottom: 0;}
.edtrClms__c.edtrBg5:not([class*="hasPdX"]) {padding-left: 0; padding-right: 0;}

/* --------------------------------------------------------------------------
   Dim-spetsiifilised üksikparandused
   -------------------------------------------------------------------------- */

/* "Kuldne pealkiri" (edtrTitle--gold) → dim punane aktsent (--colorSecondary) */
.edtrTitle.edtrTitle--gold         { color: var(--colorSecondary); }
.edtrBg4 .edtrTitle.edtrTitle--gold { color: var(--colorSecondaryHover); }

/* --------------------------------------------------------------------------
   Tume taust → valge tekst (dim palettis tumedad: Bg2, Bg3, Bg4, Bg6).
   Struktuur sama mis stig style.css:1527-1554 :is(Bg3, Bg4, Bg6) kaskaad.
   -------------------------------------------------------------------------- */
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6),
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) :is(.article, p, li, strong, h1, h2, h3, h4, h5, h6, [class*="edtrTitle"], .infoCard__label) {
	color: #fff;
}
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .article a:not([class*="btn"]) {
	color: #fff;
	text-decoration: underline;
}
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) hr {
	border-color: rgba(255,255,255,0.35);
}

/* Nupud tumedal taustal — valge nupp, dim-blue tekst */
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .c-btn-primary {
	--btnColor: var(--colorPrimary);
	background: #fff;
	border-color: #fff;
	color: var(--colorPrimary);
}
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .c-btn-primary:hover,
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .c-btn-primary:focus {
	background: var(--edtrBg1);
	border-color: var(--edtrBg1);
	color: var(--colorPrimary);
}
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) :is(.c-btn-outline, .c-btn-outline-primary) {
	--btnColor: #fff;
	color: #fff;
	border-color: #fff;
	background: transparent;
}

/* --------------------------------------------------------------------------
   Hele veerg tumeda rea sees → tekst ja nupud tagasi tavaliseks
   (stig style.css:1549-1551 analoog; dim light slots = Bg1 + Bg5)
   -------------------------------------------------------------------------- */
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .edtrClms__c:is(.edtrBg1, .edtrBg5),
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .edtrClms__c:is(.edtrBg1, .edtrBg5) :is(.article, p, li, strong, a, h1, h2, h3, h4, h5, h6, [class*="edtrTitle"], .infoCard__label) {
	color: #282828;
}
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .edtrClms__c:is(.edtrBg1, .edtrBg5) .c-btn-primary {
	--btnColor: #fff;
	background: var(--colorPrimary);
	border-color: var(--colorPrimary);
	color: #fff;
}
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .edtrClms__c:is(.edtrBg1, .edtrBg5) :is(.c-btn-outline, .c-btn-outline-primary) {
	--btnColor: var(--colorPrimary);
	color: var(--colorPrimary);
	border-color: var(--colorPrimary);
}

/* Tume veerg tumeda rea sees → tekst jääb valgeks (stig style.css:1552-1554) */
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .edtrClms__c:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6),
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .edtrClms__c:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) :is(.article, p, li, strong, h1, h2, h3, h4, h5, h6, [class*="edtrTitle"], .infoCard__label) {
	color: #fff;
}
:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .edtrClms__c:is(.edtrBg2, .edtrBg3, .edtrBg4, .edtrBg6) .c-btn-primary {
	--btnColor: var(--colorPrimary);
	background: #fff;
	border-color: #fff;
	color: var(--colorPrimary);
}

/* Kaardi (edtrBg5) muudetavad värvid — override builder.css rida 195 */
.edtrClms__c.edtrBg5 { background-color: var(--edtrBg5) !important; color: var(--edtrBg5Text) !important; }

/* --------------------------------------------------------------------------
   Ikooni-container'il kõrgus = laius (builder.css:100-103 seab ainult width,
   SVG säilitab atribuudist height="120" → erineva viewBox'iga ikoonid
   joonduvad erinevalt kõrguses → sildid ei joondu horisontaalselt).
   -------------------------------------------------------------------------- */
.edtrIconXS > * { height: 2em; }
.edtrIconS  > * { height: 4em; }
.edtrIconM  > * { height: 6em; }
.edtrIconL  > * { height: 8em; }

/* --------------------------------------------------------------------------
   Ikooni horisontaalne joondus jstfyC / jstfyE nõuab block-level lastu, et
   builder.css:98-99 margin-left:auto reeglid toimiksid. Inline SVG default
   display:inline → margin:auto ignoreeritakse → kõik ikoonid istuvad vasakul.
   -------------------------------------------------------------------------- */
.edtrIcon > * { display: block; }
