.kowal-calculator {
    --kc-ink: #17372f;
    --kc-accent: #c9e96a;
    --kc-line: #dce3dd;
    box-sizing: border-box;
    container-name: kowal-calculator;
    container-type: inline-size;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 32px 0;
    color: var(--kc-ink);
    font-family: inherit;
    text-align: left;
}
.kowal-calculator * { box-sizing: border-box; }
.kowal-calculator [hidden] { display: none !important; }
.kc-heading { padding: 24px 0 32px; max-width: 780px; }
.kc-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .2em; }
.kc-heading h1, .kc-heading h2 { font-size: clamp(28px, 4cqi, 46px); line-height: 1.15; margin: 12px 0 20px; letter-spacing: -.03em; }
.kc-heading p { line-height: 1.7; }
.kc-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; width: 100%; min-width: 0; }
.kc-main { width: 100%; max-width: none; min-width: 0; }
.kc-section { width: 100%; margin: 0 0 20px; padding: 16px; border: 1px solid var(--kc-line); border-radius: 16px; min-width: 0; background: #fff; }
.kc-section legend { float: none; width: auto; max-width: 100%; padding: 0 8px; font-size: 19px; font-weight: 700; color: var(--kc-ink); overflow-wrap: anywhere; }
.kc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 256px), 1fr)); gap: 10px; min-width: 0; }
.kc-option { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--kc-line); border-radius: 10px; padding: 12px; transition: background .15s, border-color .15s; }
.kc-option:has(.kc-choice > input:checked) { background: #f4f9e9; border-color: #648b36; }
.kc-choice { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-weight: 400; margin: 0; }
.kc-choice input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--kc-ink); }
.kc-choice-text { display: grid; gap: 6px; min-width: 0; width: 100%; overflow-wrap: anywhere; }
.kc-product-image { display: block; width: 200px; height: auto; max-width: 100%; aspect-ratio: 1; object-fit: contain; margin: 0 auto 4px; border-radius: 8px; }
.kc-choice strong { font-size: 16px; }
.kc-muted { font-size: 13px; line-height: 1.6; color: #53645d; font-weight: 400; }
.kc-price { font-size: 14px; font-weight: 600; }
.kc-field { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; font-size: 14px; font-weight: 500; min-width: 0; }
.kc-field input, .kc-field select, .kc-field textarea { font: inherit; width: 100%; max-width: 100%; padding: 11px 12px; border: 1px solid #b8c4bc; border-radius: 8px; background: #fff; color: var(--kc-ink); box-shadow: none; }
.kc-field textarea { min-height: 96px; resize: vertical; }
.kc-field input:disabled { background: #f0f2ef; color: #69726b; }
.kc-contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
.kc-contact > .kc-field:last-of-type { grid-column: 1 / -1; }
.kc-summary { position: static; width: 100%; min-width: 0; background: #f0f4ed; border: 1px solid var(--kc-line); border-radius: 18px; padding: 24px; }
.kc-summary h2, .kc-summary h3 { font-size: 22px; margin: 0 0 20px; font-weight: 700; }
.kc-summary-items { padding: 0 8px 0 0; margin: 0 0 20px; list-style: none; max-height: clamp(96px, calc(100dvh - 600px), 320px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.kc-summary-items li { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--kc-line); font-size: 13px; line-height: 1.5; }
.kc-summary-items li > span { min-width: 0; overflow-wrap: anywhere; }
.kc-summary-items strong { white-space: nowrap; }
.kc-total { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.kc-total-net { font-size: 20px; font-weight: 700; }
.kc-total-gross { padding-bottom: 18px; border-bottom: 1px solid var(--kc-line); }
.kc-submit { width: 100%; padding: 15px 18px; background: var(--kc-ink); border: 0; border-radius: 9px; color: #fff; font-size: 15px; line-height: 1.4; font-weight: 700; cursor: pointer; margin-top: 16px; }
.kc-submit:hover { background: #274e3e; }
.kc-submit:disabled { opacity: .5; cursor: wait; }
.kc-message { font-size: 14px; line-height: 1.6; color: #8a3c1d; overflow-wrap: anywhere; }
.kc-message:empty { display: none; }
.kc-warning { padding: 12px; border-radius: 8px; background: #fff1d8; font-size: 13px; line-height: 1.5; }
.kc-success { padding: 32px; background: #f0f4ed; border: 1px solid var(--kc-line); border-radius: 16px; font-size: 20px; line-height: 1.6; }
.kc-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.kowal-calculator :focus-visible { outline: 3px solid #537c37; outline-offset: 3px; }
.kc-mobile-summary { display: block; position: sticky; top: 0; z-index: 5; width: 100%; padding: 14px 18px; margin: 0 0 18px; background: var(--kc-ink); color: #fff; border: 0; border-radius: 8px; text-align: left; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px #17372f22; }
/* Breakpoints follow the widget's ROW/column, including on a wide desktop viewport. */
@container kowal-calculator (min-width: 640px) {
    .kc-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container kowal-calculator (min-width: 960px) {
    .kc-form { grid-template-columns: minmax(0, 1fr) minmax(280px, 28%); gap: 24px; }
    .kc-summary { position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
    .kc-section { padding: 18px; margin-bottom: 20px; }
    .kc-mobile-summary { display: none; }
}
@container kowal-calculator (max-width: 479px) {
    .kc-section { padding: 16px; }
    .kc-heading { padding: 12px 0 24px; }
    .kc-summary { padding: 18px; }
}
/* A single column remains safe in browsers without container-query support. */
@supports not (container-type: inline-size) {
    .kc-heading h2 { font-size: 32px; }
}

.kc-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; line-height: 1.5; }
.kc-option-footer { display: flex; justify-content: flex-end; margin-top: auto; padding-top: 10px; }
.kc-read-more { display: inline-flex; align-items: center; gap: 6px; color: var(--kc-ink); font-size: 12px; line-height: 1.5; font-weight: 600; text-decoration: none; padding: 4px 0; }
.kc-read-more:hover { text-decoration: underline; }
.kc-recaptcha { min-width: 0; }
.kc-recaptcha .grecaptcha-badge { transform: scale(.75); transform-origin: top left; margin-bottom: -15px; }
.kc-recaptcha + .kc-muted a { text-decoration: underline; }
.kc-consents { display: grid; gap: 12px; margin-top: 18px; }
.kc-consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; }
.kc-consent > input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--kc-ink); }
.kc-consent > label { margin: 0; font-size: 13px; line-height: 1.6; font-weight: 400; cursor: pointer; overflow-wrap: anywhere; }
.kc-consent a { text-decoration: underline; }
.kc-readonly-items { display: grid; gap: 10px; }
.kc-readonly-row { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 8px 12px; padding: 10px; border: 1px solid var(--kc-line); border-radius: 10px; min-width: 0; }
.kc-readonly-image { grid-column: 1; grid-row: 1 / span 3; width: 75px; height: 75px; object-fit: contain; border-radius: 6px; }
.kc-readonly-description { grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.kc-readonly-description p { margin: 4px 0; }
.kc-readonly-qty, .kc-readonly-price { grid-column: 2; display: grid; gap: 4px; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.kc-readonly-qty { grid-row: 2; }
.kc-readonly-price { grid-row: 3; }
@container kowal-calculator-products (min-width: 640px) {
    .kc-readonly-row { grid-template-columns: 75px minmax(0, 1fr) 100px minmax(100px, max-content); align-items: center; }
    .kc-readonly-image { grid-row: 1; }
    .kc-readonly-qty { grid-column: 3; grid-row: 1; }
    .kc-readonly-price { grid-column: 4; grid-row: 1; text-align: right; }
}
@media print {
    .kc-summary, .kc-summary-items { max-height: none !important; overflow: visible !important; position: static !important; }
}

/* Alternative layouts measure the product column, independently of the summary/ROW width. */
.kc-main { container-name: kowal-calculator-products; container-type: inline-size; }
.kc-layout-compact .kc-cards, .kc-layout-list .kc-cards { grid-template-columns: minmax(0, 1fr); }
.kc-layout-compact .kc-option, .kc-layout-list .kc-option { display: grid; gap: 8px; align-content: start; padding: 10px; }
.kc-layout-compact .kc-choice, .kc-layout-list .kc-choice { display: contents; }
.kc-layout-compact .kc-choice > input, .kc-layout-list .kc-choice > input { grid-column: 1; grid-row: 1; }
.kc-layout-compact .kc-choice-text, .kc-layout-list .kc-choice-text { grid-column: 3; grid-row: 1; gap: 4px; }
.kc-layout-compact .kc-choice strong, .kc-layout-list .kc-choice strong { font-size: 14px; line-height: 1.4; }
.kc-layout-compact .kc-product-image, .kc-layout-list .kc-product-image { grid-column: 2; grid-row: 1 / span 3; margin: 0; border-radius: 6px; }
.kc-layout-compact .kc-option { grid-template-columns: 18px 120px minmax(0, 1fr); }
.kc-layout-compact .kc-product-image { width: 120px; height: 120px; }
.kc-layout-compact .kc-option > .kc-field, .kc-layout-list .kc-option > .kc-field { grid-column: 3; margin: 4px 0 0; }
.kc-layout-compact .kc-option > .kc-field input, .kc-layout-list .kc-option > .kc-field input { padding: 7px 9px; }
.kc-layout-compact .kc-option-footer, .kc-layout-list .kc-option-footer { grid-column: 3; margin: 0; padding: 0; justify-content: flex-start; }
.kc-layout-list .kc-option { grid-template-columns: 18px 75px minmax(0, 1fr); align-items: start; }
.kc-layout-list .kc-product-image { width: 75px; height: 75px; }
.kc-layout-list .kc-option-footer { grid-column: 3; grid-row: 2; align-self: start; }
.kc-layout-list .kc-price { grid-column: 3; grid-row: 3; overflow-wrap: anywhere; }
.kc-layout-list .kc-option > .kc-field { grid-row: 3; }
.kc-layout-list .kc-option:has(> .kc-field) .kc-price { grid-row: 4; }
@container kowal-calculator-products (min-width: 640px) {
    .kc-layout-list .kc-option { grid-template-columns: 18px 75px minmax(0, 1fr) minmax(100px, max-content); column-gap: 12px; row-gap: 4px; align-items: center; }
    .kc-layout-list .kc-option:has(> .kc-field) { grid-template-columns: 18px 75px minmax(0, 1fr) 100px minmax(100px, max-content); }
    .kc-layout-list .kc-choice > input, .kc-layout-list .kc-product-image { grid-row: 1 / span 2; }
    .kc-layout-list .kc-price { grid-column: 4; grid-row: 1 / span 2; }
    .kc-layout-list .kc-option > .kc-field { grid-column: 4; grid-row: 1 / span 2; margin: 0; }
    .kc-layout-list .kc-option:has(> .kc-field) .kc-price { grid-column: 5; grid-row: 1 / span 2; }
}
@container kowal-calculator-products (min-width: 640px) {
    .kc-layout-compact .kc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container kowal-calculator-products (min-width: 960px) {
    .kc-layout-compact .kc-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container kowal-calculator-products (min-width: 1280px) {
    .kc-layout-compact .kc-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
