// Questo file fa parte di MyTown.
// MyTown è software libero: puoi ridistribuirlo e/o modificarlo secondo
// i termini della GNU Affero General Public License come pubblicata dalla
// Free Software Foundation, versione 3.
// Distribuito senza ALCUNA GARANZIA; vedi la GNU AGPL v3 per i dettagli.
// Copyright (C) Kondor Consulting & Services S.r.l.
// SPDX-License-Identifier: AGPL-3.0-or-later

:root {
	/* Colore brand centralizzato — tema EDIL = giallo,
	 * allineato al tema `yellow` del portale datasmart (#ffc107 + testo scuro:
	 * giallo/nero/bianco, giallo come accento). Usato al posto dei vecchi hex
	 * hardcoded sparsi nei componenti, così il tema cambia davvero al variare
	 * di app-theme. */
	--app-brand: #ffc107;
	--app-brand-rgb: 255, 193, 7;
	--app-brand-2: #1f2937;
	--app-brand-3: #e0a800;

	/* Testo/icone che stanno SOPRA un riempimento --app-brand.
	 * Scuro sul giallo edil; bianco sul blu cna (vedi blocco app-theme='cna'). */
	--app-on-brand: #1f2937;
	--app-on-brand-rgb: 31, 41, 55;

	--ion-color-primary: #ffc107;
	--ion-color-primary-rgb: 255, 193, 7;
	--ion-color-primary-contrast: #1f2937;
	--ion-color-primary-contrast-rgb: 31, 41, 55;
	--ion-color-primary-shade: #e0a800;
	--ion-color-primary-tint: #ffce3a;

	--ion-color-secondary: #1f2937;
	--ion-color-secondary-rgb: 31, 41, 55;
	--ion-color-secondary-contrast: #ffffff;
	--ion-color-secondary-contrast-rgb: 255, 255, 255;
	--ion-color-secondary-shade: #1b232f;
	--ion-color-secondary-tint: #353e49;

	--ion-color-tertiary: #e0a800;
	--ion-color-tertiary-rgb: 224, 168, 0;
	--ion-color-tertiary-contrast: #1f2937;
	--ion-color-tertiary-contrast-rgb: 31, 41, 55;
	--ion-color-tertiary-shade: #c59400;
	--ion-color-tertiary-tint: #e3b11a;

	--ion-color-success: #198754;
	--ion-color-success-rgb: 25, 135, 84;
	--ion-color-success-contrast: #ffffff;
	--ion-color-success-contrast-rgb: 255, 255, 255;
	--ion-color-success-shade: #16774a;
	--ion-color-success-tint: #309365;

	/* Warning spostato su ambra più profonda per non collidere col primary giallo. */
	--ion-color-warning: #f59e0b;
	--ion-color-warning-rgb: 245, 158, 11;
	--ion-color-warning-contrast: #1f2937;
	--ion-color-warning-contrast-rgb: 31, 41, 55;
	--ion-color-warning-shade: #d78b0a;
	--ion-color-warning-tint: #f6a823;

	--ion-color-danger: #dc3545;
	--ion-color-danger-rgb: 220, 53, 69;
	--ion-color-danger-contrast: #ffffff;
	--ion-color-danger-contrast-rgb: 255, 255, 255;
	--ion-color-danger-shade: #c22f3d;
	--ion-color-danger-tint: #e04958;

	--ion-color-light: #f6f8fc;
	--ion-color-light-rgb: 246, 248, 252;
	--ion-color-light-contrast: #000000;
	--ion-color-light-contrast-rgb: 0, 0, 0;
	--ion-color-light-shade: #d8dade;
	--ion-color-light-tint: #f7f9fc;

	--ion-color-medium: #5f5f5f;
	--ion-color-medium-rgb: 95, 95, 95;
	--ion-color-medium-contrast: #ffffff;
	--ion-color-medium-contrast-rgb: 255, 255, 255;
	--ion-color-medium-shade: #545454;
	--ion-color-medium-tint: #6f6f6f;

	--ion-color-dark: #2f2f2f;
	--ion-color-dark-rgb: 47, 47, 47;
	--ion-color-dark-contrast: #ffffff;
	--ion-color-dark-contrast-rgb: 255, 255, 255;
	--ion-color-dark-shade: #292929;
	--ion-color-dark-tint: #444444;

	--ion-color-contrast: #f6f8fc;
	--ion-color-primary-contrast: #ffffff;
}

/*
 * Tema CNA / MyTown (brand `mytown`). Applicato via `html[app-theme='cna']`
 * impostato in main.ts da BRAND.theme. Palette allineata al tema `cna` del
 * portale (themes.css) e al demo MyTown. Solo colori — nessuna modifica di layout.
 */
html[app-theme='cna'] {
	/* Brand MyTown/CNA: blu elettrico + navy (vedi tema cna del portale e demo). */
	--app-brand: #0060e4;
	--app-brand-rgb: 0, 96, 228;
	--app-brand-2: #0a3a86;
	--app-brand-3: #2e7df0;

	/* Sul blu cna il testo sopra il brand resta bianco. */
	--app-on-brand: #ffffff;
	--app-on-brand-rgb: 255, 255, 255;

	--ion-color-primary: #0060e4;
	--ion-color-primary-rgb: 0, 96, 228;
	--ion-color-primary-contrast: #ffffff;
	--ion-color-primary-contrast-rgb: 255, 255, 255;
	--ion-color-primary-shade: #0048c0;
	--ion-color-primary-tint: #2e7df0;

	--ion-color-secondary: #0a3a86;
	--ion-color-secondary-rgb: 10, 58, 134;
	--ion-color-secondary-contrast: #ffffff;
	--ion-color-secondary-contrast-rgb: 255, 255, 255;
	--ion-color-secondary-shade: #0a2a66;
	--ion-color-secondary-tint: #2e7df0;

	--ion-color-tertiary: #0868c9;
	--ion-color-tertiary-rgb: 8, 104, 201;
	--ion-color-tertiary-contrast: #ffffff;
	--ion-color-tertiary-contrast-rgb: 255, 255, 255;
	--ion-color-tertiary-shade: #075cb1;
	--ion-color-tertiary-tint: #2177ce;

	--ion-color-success: #34d399;
	--ion-color-success-rgb: 52, 211, 153;
	--ion-color-success-contrast: #ffffff;
	--ion-color-success-contrast-rgb: 255, 255, 255;
	--ion-color-success-shade: #2eba87;
	--ion-color-success-tint: #48d7a3;

	--ion-color-warning: #f59e0b;
	--ion-color-warning-rgb: 245, 158, 11;
	--ion-color-warning-contrast: #1f2937;
	--ion-color-warning-contrast-rgb: 31, 41, 55;
	--ion-color-warning-shade: #d78b0a;
	--ion-color-warning-tint: #f6a823;

	--ion-color-danger: #ef4444;
	--ion-color-danger-rgb: 239, 68, 68;
	--ion-color-danger-contrast: #ffffff;
	--ion-color-danger-contrast-rgb: 255, 255, 255;
	--ion-color-danger-shade: #d23c3c;
	--ion-color-danger-tint: #f15757;

	--ion-color-light: #f3f8fe;
	--ion-color-light-rgb: 243, 248, 254;
	--ion-color-light-contrast: #0a2a66;
	--ion-color-light-contrast-rgb: 10, 42, 102;
	--ion-color-light-shade: #d6dae0;
	--ion-color-light-tint: #f4f9fe;

	--ion-color-medium: #5b6675;
	--ion-color-medium-rgb: 91, 102, 117;
	--ion-color-medium-contrast: #ffffff;
	--ion-color-medium-contrast-rgb: 255, 255, 255;
	--ion-color-medium-shade: #505a67;
	--ion-color-medium-tint: #6b7583;

	--ion-color-dark: #0a2a66;
	--ion-color-dark-rgb: 10, 42, 102;
	--ion-color-dark-contrast: #ffffff;
	--ion-color-dark-contrast-rgb: 255, 255, 255;
	--ion-color-dark-shade: #09255a;
	--ion-color-dark-tint: #233f75;

	--ion-color-contrast: #f3f8fe;
}
