/* Calculatoare salarii RO 2026 — stil accesibil (WCAG 2.2 AA). */

/* Doar pentru cititoare de ecran (vizibil la screen reader, ascuns vizual). */
.csr-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ===== Homepage „Econometru" ===== */
.bit-home {
	max-width: 1080px;
	margin: 0 auto;
}

.bit-hero {
	background: #eef3f9;
	border: 1px solid #cdd9e6;
	border-radius: 12px;
	padding: 2.2rem 1.6rem;
	margin: 0 0 2rem;
	text-align: center;
}

.bit-hero h1 {
	color: #0d4f93;
	font-size: 2.1rem;
	line-height: 1.2;
	margin: 0 0 .6rem;
}

.bit-hero-sub {
	font-size: 1.2rem;
	line-height: 1.55;
	color: #243240;
	max-width: 62ch;
	margin: 0 auto 1.2rem;
}

.bit-btn {
	display: inline-block;
	background: #1155a2;
	color: #ffffff;
	padding: .75rem 1.6rem;
	border-radius: 6px;
	border: 2px solid #0d4f93;
	font-size: 1.1rem;
	font-weight: 700;
	text-decoration: none;
	min-height: 44px;
}

.bit-btn:hover,
.bit-btn:focus {
	background: #0d4f93;
	color: #ffffff;
}

.bit-btn:focus-visible {
	outline: 3px solid #c2410c;
	outline-offset: 2px;
}

.bit-section-title {
	color: #0d4f93;
	font-size: 1.5rem;
	margin: 2rem 0 1rem;
}

.bit-cards {
	list-style: none;
	padding: 0;
	margin: 0 0 2rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 1rem;
}

.bit-card {
	border: 1px solid #5a5a5a;
	border-radius: 10px;
	padding: 1rem 1.1rem;
	background: #ffffff;
}

.bit-card h3 {
	margin: 0 0 .35rem;
	font-size: 1.15rem;
}

.bit-card h3 a {
	color: #0d4f93;
	text-decoration: none;
}

.bit-card h3 a:hover {
	color: #1a6e37;
	text-decoration: underline;
}

.bit-card h3 a:focus-visible {
	outline: 3px solid #c2410c;
	outline-offset: 2px;
}

.bit-card p {
	margin: 0;
	color: #2a2a2a;
}

.bit-how {
	background: #f2f5f9;
	border-radius: 10px;
	padding: 1.2rem 1.4rem;
	margin: 0 0 1rem;
}

.bit-how h2 {
	margin-top: 0;
	color: #0d4f93;
}

@media (max-width: 768px) {
	.bit-hero h1 { font-size: 1.7rem; }
	.bit-hero-sub { font-size: 1.05rem; }
	.bit-btn { display: block; }
}

.csr-calc {
	--csr-fg: #1a1a1a;
	--csr-bg: #ffffff;
	--csr-accent: #0b4f9c;       /* contrast > 7:1 pe alb */
	--csr-accent-fg: #ffffff;
	--csr-border: #5a5a5a;       /* contrast > 4.5:1 */
	--csr-soft: #f2f5f9;
	--csr-strong: #073a73;
	--csr-warn-bg: #fff4e5;
	--csr-warn-border: #8a5300;
	max-width: 720px;
	margin: 0 auto 2rem;
	color: var(--csr-fg);
	font-size: 1rem;
	line-height: 1.5;
}

.csr-calc *,
.csr-calc *::before,
.csr-calc *::after {
	box-sizing: border-box;
}

.csr-title {
	font-size: 1.5rem;
	margin: 0 0 .25rem;
}

.csr-subtitle {
	margin: 0 0 1.25rem;
	color: #333;
}

.csr-form fieldset {
	border: 1px solid var(--csr-border);
	border-radius: 8px;
	padding: 1rem 1rem .5rem;
	margin: 0 0 1rem;
}

.csr-form legend {
	font-weight: 700;
	padding: 0 .4rem;
}

.csr-field {
	margin-bottom: .85rem;
}

.csr-field > label {
	display: block;
	font-weight: 600;
	margin-bottom: .3rem;
}

.csr-field input[type="number"],
.csr-field select {
	width: 100%;
	min-height: 44px;
	padding: .5rem .6rem;
	font-size: 1rem;
	color: var(--csr-fg);
	background: var(--csr-bg);
	border: 1px solid var(--csr-border);
	border-radius: 6px;
}

.csr-field--check {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
}

.csr-field--check input[type="checkbox"] {
	width: 22px;
	height: 22px;
	margin-top: .15rem;
	flex: 0 0 auto;
}

.csr-field--check label {
	font-weight: 600;
}

.csr-help {
	margin: .25rem 0 0;
	font-size: .875rem;
	color: #444;
}

.csr-note,
.csr-disclaimer {
	font-size: .9rem;
	color: #333;
	background: var(--csr-soft);
	border-radius: 6px;
	padding: .6rem .8rem;
}

.csr-actions {
	margin: .5rem 0 1rem;
}

.csr-btn {
	display: inline-block;
	min-height: 44px;
	min-width: 44px;
	padding: .6rem 1.4rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--csr-accent-fg);
	background: var(--csr-accent);
	border: 2px solid var(--csr-strong);
	border-radius: 6px;
	cursor: pointer;
}

.csr-btn:hover {
	background: var(--csr-strong);
}

/* Focus vizibil — niciodata eliminat. */
.csr-calc :focus-visible {
	outline: 3px solid #c2410c;
	outline-offset: 2px;
}

.csr-result {
	border: 2px solid var(--csr-accent);
	border-radius: 8px;
	padding: 1rem 1.1rem;
	background: var(--csr-soft);
	margin: 0 0 1.5rem;
}

.csr-result h3 {
	margin: 0 0 .6rem;
	font-size: 1.2rem;
}

/* ===== Sumar: cifra principală mare + metrici secundare ===== */
.csr-summary {
	margin: 0 0 1rem;
}

.csr-summary-primary {
	margin: 0 0 .9rem;
}

.csr-summary-label {
	margin: 0;
	font-size: .95rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #333;
}

.csr-summary-value {
	margin: .1rem 0 0;
	font-size: 2.5rem;        /* ~40px desktop */
	line-height: 1.1;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.csr-tone-net { color: #1a6e37; }   /* verde închis — net/creștere (AA pe fundal deschis) */
.csr-tone-cost { color: #073a73; }  /* albastru puternic — cost */
.csr-tone-neg { color: #b42318; }   /* roșu închis — scădere (AA) */

.csr-metrics {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid #cdd9e6;
}

.csr-metric {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: .5rem 0;
	border-bottom: 1px solid #cdd9e6;
}

.csr-metric-label {
	color: #2a2a2a;
}

.csr-metric-value {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #1a1a1a;
	text-align: right;
	white-space: nowrap;
}

/* ===== Detalierea (tabel) într-un <details> nativ, deschis implicit ===== */
.csr-detail {
	margin-top: .5rem;
}

.csr-detail-toggle {
	cursor: pointer;
	font-weight: 700;
	color: var(--csr-accent);
	padding: .4rem 0;
	list-style-position: inside;
}

.csr-detail-toggle:hover {
	color: var(--csr-strong);
}

.csr-detail-body {
	margin-top: .25rem;
}

/* Container derulabil orizontal pentru tabel (evită overflow-ul paginii pe mobil). */
.csr-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}
.csr-table-scroll:focus-visible {
	outline: 3px solid #c2410c;
	outline-offset: 2px;
}

.csr-table {
	width: 100%;
	border-collapse: collapse;
	margin: .5rem 0;
	background: var(--csr-bg);
}

.csr-table caption {
	text-align: left;
	font-weight: 700;
	padding: .4rem 0;
}

.csr-table th,
.csr-table td {
	text-align: left;
	padding: .55rem .6rem;
	border-bottom: 1px solid #d0d0d0;
}

.csr-table td {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.csr-table thead th {
	border-bottom: 2px solid var(--csr-border);
}

.csr-row-strong th,
.csr-row-strong td {
	font-weight: 700;
	background: #e6eef8;
	color: var(--csr-strong);
}

.csr-warn {
	margin: .8rem 0 0;
	padding: .7rem .9rem;
	background: var(--csr-warn-bg);
	border-left: 4px solid var(--csr-warn-border);
	border-radius: 4px;
	color: #4a2e00;
}

/* Conținutul SEO (explicații, FAQ, surse, linkuri interne) trăiește acum în
   conținutul paginii ca blocuri Gutenberg native și e stilizat de temă (Astra).
   Aici rămâne doar disclaimer-ul (.csr-disclaimer, mai sus), care păstrează clasă proprie. */

/* Desktop: formular în stânga, rezultat în dreapta (sticky la scroll).
   Ordinea în DOM rămâne formular → rezultat (ordine logică pentru cititoare de ecran);
   grila doar le așază vizual, fără să schimbe ordinea de citire. */
@media (min-width: 880px) {
	.csr-calc {
		max-width: 980px;
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 2rem;
		align-items: start;
	}
	.csr-title,
	.csr-subtitle {
		grid-column: 1 / -1;
	}
	.csr-form {
		grid-column: 1;
		margin: 0;
	}
	.csr-result {
		grid-column: 2;
		position: sticky;
		top: 1rem;
		margin: 0;
	}
}

/* Responsive: o singura coloana sub 880px, cifra principală puțin mai mică pe mobil. */
@media (max-width: 768px) {
	.csr-title { font-size: 1.3rem; }
	.csr-btn { width: 100%; }
	.csr-summary-value { font-size: 2rem; }   /* ~32px mobil */

	/* Tabel mai compact + container cu bordură (semnal că se poate derula). */
	.csr-table-scroll { border: 1px solid #cdd9e6; border-radius: 6px; }
	.csr-table { font-size: .9rem; margin: 0; }
	.csr-table th, .csr-table td { padding: .4rem .45rem; }
	.csr-table caption { padding: .4rem .45rem; }
}

/* Respecta preferinta de miscare redusa (nu folosim animatii, dar pentru viitor). */
@media (prefers-reduced-motion: reduce) {
	.csr-calc * { animation: none !important; transition: none !important; }
}
