/* ==========================================================================
   Shared Calculator UI — .ec-calc base class
   All shortcode wrappers carry this class alongside their own class.
   ========================================================================== */

/* ── Wrapper ── */
.ec-calc {
	border: 1px solid currentColor;
	padding: 0 20px 20px 20px;
	border-radius: 10px;
	background: transparent;
}

/* ── Form grid ── */
.ec-calc__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

/* Single-column variant used by inline-row forms */
.ec-calc__grid--column {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* ── Labels ── */
.ec-calc label,
.ec-calc__item > label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 18px;
	line-height: 125%;
	font-weight: 400;
}

/* ── Hidden items ── */
.ec-calc__item.is-hidden {
	display: none;
}

/* ── Inputs, selects ── */
.ec-calc input,
.ec-calc select {
	padding: 11px;
	font-size: 18px;
	line-height: 125%;
	font-weight: 400;
	border: 2px solid currentColor;
	border-radius: 6px;
	color: inherit;
	width: 100%;
	box-sizing: border-box;
}

.ec-calc input {
	background: transparent;
}

::placeholder {
  color: grey !important;
  opacity: 1; /* Обязательно для Firefox, иначе цвет будет бледным */
}

/* ── Buttons (generic) ── */
.ec-calc button {
	padding: 10px 16px;
	font-size: 18px;
	line-height: 125%;
	font-weight: 400;
	border: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.ec-calc button:hover {
	opacity: .8;
}

/* ── Submit / primary actions ── */
.ec-calc__actions {
	margin-top: 16px;
}

.ec-calc__actions button[type="submit"] {
	font-weight: 600;
}

/* ── Full-width grid item ── */
.ec-calc__full {
	grid-column: 1 / -1;
}

/* ── Inline field group (e.g. amount + period) ── */
.ec-calc__inline {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

.ec-calc__inline > * {
	flex: 1;
}

.ec-calc__inline > .ec-calc__unit {
	flex: 0 0 auto;
	padding-bottom: 10px;
	font-size: 14px;
	white-space: nowrap;
}

/* ── Add row button ── */
.ec-calc__add-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	padding: 6px 12px;
	margin-top: 4px;
}

/* ── Dynamic row ── */
.ec-calc__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) auto;
	gap: 8px;
	align-items: flex-end;
	padding: 8px 0;
	border-bottom: 1px solid currentColor;
}

.ec-calc__row:last-child {
	border-bottom: none;
}

/* Asset bestanddeel row: euro input + type select + remove button, horizontal */
.ec-calc__row--asset {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 6px 0;
	border-bottom: 1px dashed rgba(0,0,0,.12);
}

.ec-calc__row--asset:first-child .ec-calc__remove-btn {
	display: none;
	pointer-events: none;
	opacity: 0;
}

.ec-calc__row--asset:last-child {
	border-bottom: none;
}

.ec-calc__row--asset select {
	flex: 1 1 auto;
	max-width: 220px;
}

/* Euro-prefixed input */
.ec-calc__euro-wrap {
	display: flex;
	align-items: center;
	border: 2px solid #000;
	border-radius: 0;
	overflow: hidden;
	flex-shrink: 0;
}

.ec-calc__euro-sign {
	display: flex;
    align-items: center;
    justify-content: center;
	padding: 11px;
	font-size: 18px;
	line-height: 125%;
    background: #E0E0E0;
	border-right: 2px solid #000;
	color: #000;
	user-select: none;
	min-width: 48px;
}

.ec-calc__euro-wrap input {
	border: none !important;
	outline: none !important;
	width: 100%;
    padding: 11px;
    font-size: 18px;
    line-height: 125%;
    font-weight: 400;
	margin: 0 !important;
}

.ec-calc__remove-btn {
	flex-shrink: 0;
	padding: 11px;
	font-size: 18px;
	line-height: 125%;
    font-weight: 400;
	border-color: transparent;
	opacity: .6;
}

.ec-calc__remove-btn:hover {
	opacity: 1;
}

/* ── Result section ── */
.ec-calc__result {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 2px solid currentColor;
}

/* ── Box 3 belastingdruk highlight ── */
.ec-box3__druk {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	padding: 20px 24px;
    background-color: rgb(253, 213, 48, 25%);
	border-radius: 4px;
	font-size: 24px;
}

.ec-box3__druk span {
	font-size: 20px;
	font-weight: 700;
}

.ec-box3__druk strong {
	font-size: 24px;
	font-weight: 700;
	padding: 12px;
    background-color: #FFD530;
}

/* ── Big netto total ── */
.ec-calc__total {
	font-size: 15px;
	margin-bottom: 12px;
}

.ec-calc__total strong {
	font-size: 24px;
	display: inline-block;
	margin-top: 4px;
}

/* ── Result table ── */
.ec-calc table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
}

.ec-calc table + table {
	margin-top: 20px;
}

.ec-calc td,
.ec-calc th {
	border-bottom: 0;
	padding: 8px 4px;
	text-align: left;
}

.ec-calc th,
.ec-calc tr,
.ec-calc td {
	border: 0;
}

.ec-calc table tr td:first-child {
	padding-left: 20px;
}

.ec-calc table tr td:last-child {
	padding-right: 20px;
}

.ec-calc th {
	font-weight: 700;
	font-size: 14px;
	background-color: #F1F1F1;
	padding: 8px 20px;
	font-size: 18px;
}

.ec-calc td:not(.tk-label) {
	text-align: right;
}

.ec-calc .tk-total { font-weight: 700; border-top: 1px solid #000; }
.ec-calc .tk-accent { font-weight: 700; }

.ec-calc__subhead td,
.ec-calc__subhead th {
	font-weight: 600;
	font-size: 13px;
}

.ec-calc__section td,
.ec-calc__section th {
	font-weight: 700;
	text-align: left !important;
	padding-top: 12px;
}

.ec-calc table tr.is-hidden {
	display: none;
}

/* ── Help / details block ── */
.ec-calc__help {
	grid-column: 1 / -1;
}

.ec-calc__help details {
	border: 1px solid currentColor;
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 13px;
}

.ec-calc__help summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	user-select: none;
}

.ec-calc__help summary::-webkit-details-marker { display: none; }

.ec-calc__help-body { margin-top: 10px; }
.ec-calc__help-body p { margin: 0 0 8px; }

.ec-calc__help-table {
	border-collapse: collapse;
	font-size: 12px;
	width: 100%;
	margin-bottom: 10px;
	overflow-x: auto;
	display: block;
}

.ec-calc__help-table th,
.ec-calc__help-table td {
	border: 1px solid currentColor;
	padding: 4px 8px;
	text-align: center;
	white-space: nowrap;
}

/* ── Note / footnote ── */
.ec-calc__note {
	margin-top: 10px;
	font-size: 12px;
	opacity: .75;
}

.ec-calc__footnotes {
	margin-top: 14px;
	font-size: 12px;
	opacity: .8;
}

.ec-calc__footnotes ol {
	margin: 0;
	padding-left: 20px;
}

.ec-calc__footnotes li + li {
	margin-top: 4px;
}

/* ── WKR-style sub-panel ── */
.ec-calc__sub-panel {
	margin-top: 16px;
	padding: 16px;
	border: 1px dashed currentColor;
	border-radius: 8px;
}

.ec-calc__sub-panel h4 {
	margin: 0 0 8px;
	font-size: 15px;
}

.ec-calc__sub-panel p {
	margin: 0 0 10px;
	font-size: 13px;
}

.ec-calc__sub-panel-actions {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	justify-content: flex-end;
}

/* ==========================================================================
   Calculator Widget — tabs
   ========================================================================== */

.ec-calc-widget {
	container-type: inline-size;
}

.ec-calc-widget .ec-calc-widget__tabs {
	display: flex;
	gap: 20px;
	border-collapse: collapse;
	padding: 40px 20px 0 20px;
    border: 2px solid #000;
	border-bottom: 0;
}

.ec-calc-widget__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 16px;
	border-bottom: 2px solid currentColor;
	padding-bottom: 0;
}

.ec-calc-widget__tab-btn {
	flex: 1;
	padding: 10px 20px;
	font-size: 18px;
	font-weight: 700;
	line-height: 125%;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	background: #F5F5F5;
	color: inherit;
	min-height: 94px;
}

.ec-calc-widget__tab-btn.is-active {
	position: relative;
	background: #FFD530;
	border-color: #000;
}

.ec-calc-widget__panel {
	border: 2px solid #000;
	border-radius: 0;
	border-top: 0;
}
.ec-calc-widget__panel .ec-calc {
	border:0px;
}
.ec-calc-widget__cf7{
	padding: 0 20px 20px 20px;
}
.ec-calc-widget__cf7 .wpcf7 {
	margin-top: 18px;
    padding-top: 16px;
    border-top: 2px solid currentColor;
}
.ec-calc-widget__panel[hidden] {
	display: none;
}

.ec-calc-widget .ec-calc input, 
.ec-calc-widget .ec-calc select {
	border-radius: 0 !important;
	max-width: 200px;
}

/* ==========================================================================
   Shared inline-row form components  (ec-nl-*)
   Used by nettoloon, nettoloon-dga, btw, box3 and any future calculators.
   ========================================================================== */

/* Each field is a full-width row */
.ec-nl-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	min-height: 36px;
}

/* Fixed-width left-hand label */
.ec-nl-label {
	flex: 0 0 600px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

/* Right-hand controls (inputs, period select, help btn …) */
.ec-nl-fields {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	flex: 1 1 auto;
}

/* € or % prefix glued to input */
.ec-nl-input-group {
	display: flex;
	align-items: stretch;
}

.ec-nl-addon {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 8px;
	border: 2px solid currentColor;
	border-right: none;
	border-radius: 0;
	font-size: 18px;
	background: #E0E0E0;
	white-space: nowrap;
	min-width: 48px;
}

.ec-nl-input-group input,
.ec-nl-input-group select {
	border-radius: 0 6px 6px 0 !important;
	margin: 0;
}

/* "per" separator */
.ec-nl-sep {
	font-size: 14px;
	white-space: nowrap;
	padding: 0 2px;
}

/* Required asterisk */
.ec-nl-req {
	margin-left: 2px;
	opacity: 0.6;
}

/* ──────────────────────────────────────────────────────────
   Help button  (i)
   ────────────────────────────────────────────────────────── */
.ec-nl-help-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: auto;
	width: 30px;
	height: 30px;
	min-width: 30px;
	border-radius: 50% !important;
	border: 2px solid currentColor !important;
	background: rgb(255,213,49,24%) !important;
	color: inherit;
	font-size: 18px !important;
	font-weight: 700 !important;
	cursor: pointer;
	padding: 0 !important;
	line-height: 1;
	flex-shrink: 0;
	opacity: 0.55;
	transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.ec-nl-help-btn:hover {
	opacity: 1;
}

.ec-nl-help-btn.is-active {
	opacity: 1;
	background: currentColor;
	/* color: var(--wp--preset--color--background, #fff); */
}

/* Panel revealed below the row */
.ec-nl-help-panel {
	margin-top: 20px;
	padding: 14px 24px;
	font-size: 18px;
	background: rgb(255,213,48,24%);
}

.ec-nl-help-panel[hidden] {
	display: none;
}

.ec-nl-help-panel p {
	margin: 0 !important;
}

.ec-nl-help-panel p:last-child {
	margin-bottom: 0;
}

.ec-nl-help-panel ul {
	margin: 0 0 6px;
	padding-left: 20px;
}

/* ──────────────────────────────────────────────────────────
   Toggle button group  (Ja / Nee, Yes / No, incl / excl …)
   ────────────────────────────────────────────────────────── */
.ec-nl-toggle {
	display: inline-flex;
	border: 2px solid currentColor;
	border-radius: 0;
	overflow: hidden;
	flex-shrink: 0;
}

.ec-nl-toggle__btn {
	padding: 7px 14px;
	font-size: 14px;
	border: none !important;
	border-radius: 0 !important;
	border-right: 2px solid currentColor !important;
	background: transparent;
	color: inherit;
	cursor: pointer;
	opacity: 1;
	transition: opacity 0.15s, background 0.15s, color 0.15s;
	white-space: nowrap;
}

.ec-nl-toggle__btn:last-child {
	border-right: none !important;
}

.ec-nl-toggle__btn:hover {
	opacity: 0.85;
}

.ec-nl-toggle__btn.is-active {
	opacity: 1;
	text-shadow: 1px 0 black;
}

/* ──────────────────────────────────────────────────────────
   Fixes
   ────────────────────────────────────────────────────────── */

input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea {
	margin: 0;
}
.ec-nettoloon__grid {
	gap: 0 !important;
}
.ec-calc .ec-calc__remove-btn {
	padding: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: red;
    border-color: black;
	margin-left: 35px;
}
.ec-calc .ec-nl-label {
	display: block;
	margin-bottom: 0;
	font-weight: 600;
}
.ec-calc .ec-nettoloon__item,
.ec-calc .ec-calc__item {
	padding: 20px;
	border-bottom: 1px solid #CBCBCB;
}
.ec-calc select {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDEyIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xIDFMNiA2TDExIDEiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPg==);
    background-position: calc(100% - 15px) center;
    background-repeat: no-repeat;
    display: inline-block;
    height: auto;
    margin: 0;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.ec-calc .ec-calc__actions,
.ec-calc .ec-nettoloon__actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-right: 20px;
}
.ec-calc .ec-calc__actions button,
.ec-calc .ec-nettoloon__actions button {
	font-size: 24px;
	font-weight: bold;
	border: 0;
	background-color: #000;
	color: #fff;
	border-radius: 0;
	padding: 25px 37px;
}
button.ec-nl-toggle__btn.is-active[data-value="y"] {
	background-color: #FFD530;
}
button.ec-nl-toggle__btn.is-active[data-value="n"] {
	background-color: #E0E0E0;
}
.ec-calc .ec-box3__rows .ec-calc__row--asset select {
	width: auto;
	max-width: 300px;
}
.ec-nl-input-group.reverse .ec-nl-addon {
	border-right: 2px solid currentColor;
	border-left: none;
}
.ec-nettoloon__total {
	padding: 20px 24px;
	background-color: rgb(253, 213, 48, 25%); /* Converted from hex #FFD530 */
}
.ec-nettoloon__total div {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.ec-nettoloon__total div span {
	font-size: 24px;
	font-weight: bold;
}
.ec-nettoloon__total div strong {
	padding: 12px;
	background-color: #FFD530;
}
.ec-calc .ec-nettoloon-dga__wkr-btn {
	padding: 11px;
}
hr.line {
    width: 100%;
    max-width: 100% !important;
    border-top: 2px solid #CBCBCB;
    margin: 32px 0;
}
.ec-nettoloon__result h3 {
	font-size: 32px;
}
.ec-box3__form .ec-box3__rows {
	display: flex;
	align-items: baseline;
	padding: 0 20px;
}
.ec-box3__form .ec-box3__rows > p {
	font-weight: 600;
	max-width: 608px;
	width: 100%;
	margin-bottom: 0;
}
.blocks {
	width: 100%;
}
.blocks input {
	width: 150px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1512px) {
	.ec-nl-label {
		flex: 0 0 490px;
	}
	.ec-box3__form .ec-box3__rows > p {
		max-width: 498px;
	}
}
@media (max-width: 1399px) {
	.ec-nl-label {
		flex: 0 0 394px;
	}
	.ec-box3__form .ec-box3__rows > p {
		max-width: 402px;
	}
}
@media (max-width: 1199px) {
	.ec-nl-label {
		flex: 0 0 100%;
		flex-wrap: wrap;
	}
	.ec-calc-widget .ec-calc-widget__tabs {
		flex-direction: column;
		gap: 10px;
	}
	.ec-calc-widget__tab-btn {
		min-height: 60px;
	}
	.ec-box3__form .ec-box3__rows {
		flex-direction: column;
		align-items: baseline;
	}
	.ec-box3__form .ec-box3__rows > p {
		max-width: 100%;
	}
}
@media (max-width: 767px) {
	.table-responsive {
		overflow-x: auto;
	}
	.ec-calc input, 
	.ec-calc select,
	.ec-calc button,
	.ec-calc-widget__tab-btn {
		font-size: 16px !important;
	}
	.ec-calc .ec-calc__remove-btn {
		font-size: 26px !important;
		margin-left: 0;
	}
	.ec-calc table tr td {
		font-size: 14px !important;
	}
	.ec-calc-widget .ec-calc input, 
	.ec-calc-widget .ec-calc select {
		max-width: 170px;
	}
	.ec-calc .ec-nl-label {
		font-size: 14px;
	}
	.ec-nl-help-panel {
		padding: 10px;
	}
	.ec-nl-help-panel p {
		font-size: 14px;
		line-height: 22px;
	}
	.ec-calc {
		padding: 0 15px 15px 15px;
	}
	.ec-calc-widget .ec-calc-widget__tabs {
		flex-direction: column;
		padding: 15px 15px 0 15px;
	}
	.ec-calc .ec-calc__actions, .ec-calc .ec-nettoloon__actions {
		justify-content: center;
		margin-right: 0;
	}
	.ec-calc .ec-calc__actions button, 
	.ec-calc .ec-nettoloon__actions button {
		flex: 1 1 auto;
		justify-content: center;
		font-size: 24px !important;
	}
	.ec-calc .ec-nettoloon__item, 
	.ec-calc .ec-calc__item {
		padding: 20px 0;
	}
	.ec-calc table tr td:last-child {
		padding-right: 0;
	}
	.ec-calc table tr td:first-child {
		padding-left: 0;
	}
	.ec-nettoloon__total div span,
	.ec-box3__druk span {
		font-size: 18px;
	}
	.ec-nettoloon__result h3 {
		font-size: 24px;
	}
	.ec-nettoloon-dga .ec-nettoloon__grid label {
		flex-direction: column;
		align-items: baseline;
		font-size: 14px !important;
	}
	.ec-nettoloon-dga__wkr-panel h4,
	.ec-nettoloon-dga__wkr-panel p {
		font-size: 14px !important;
	}
	.ec-calc__row--asset {
		flex-direction: column;
		align-items: stretch;
	}
	.ec-calc .ec-box3__rows .ec-calc__row--asset select {
		max-width: 100%;
	}
	.ec-calc th {
		padding: 8px 0;
	}
	.ec-calc__footnotes ol {
		padding-left: 0;
	}
	.ec-box3__form .ec-box3__rows {
		padding: 0;
	}
	.ec-zzp__inputs-summary > p {
		padding: 6px 0 !important;
	}
}
