.ib-calc {
    width: 100%;
    margin: 0 auto;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #202020;
}

/* Sections */
.ib-calc__section {
    background: #ffffff;
    border: 1px solid #D8D8D8;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
}

.ib-calc__heading {
    font-family: 'Lora', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 18px;
    padding: 0;
    color: #202020;
    display: block;
}

.ib-calc__results .ib-calc__heading {
    margin-bottom: 8px;
}

.ib-calc__email-section .ib-calc__button {
    margin-bottom: 8px;
}

/* Fields */
.ib-calc__field {
    margin-bottom: 16px;
}

.ib-calc__field:last-child {
    margin-bottom: 0;
}

.ib-calc__label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #202020;
}

.ib-calc__hint {
    display: block;
    font-size: 13px;
    color: #565656;
    margin-top: 4px;
}

/* Inputs */
.ib-calc__input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #c4c4c4;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    max-width: 280px;
    transition: border-color 0.15s;
}

.ib-calc__input-wrap:focus-within {
    border-color: #565656;
}

.ib-calc__prefix {
    padding: 10px 0 10px 16px;
    color: #565656;
    font-weight: 500;
    user-select: none;
    flex-shrink: 0;
}

.ib-calc__input {
    border: none;
    outline: none;
    padding: 10px 16px 10px 6px;
    font-size: 15px;
    width: 100%;
    background: transparent;
    color: #202020;
    -moz-appearance: textfield;
}

.ib-calc__input::-webkit-inner-spin-button,
.ib-calc__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ib-calc__select {
    display: block;
    padding: 10px 16px;
    font-size: 15px;
    border: 1px solid #c4c4c4;
    border-radius: 8px;
    background: #fff;
    color: #202020;
    max-width: 280px;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.15s;
}

.ib-calc__select:focus {
    border-color: #565656;
    outline: none;
}

/* Checkboxes */
.ib-calc__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    color: #202020;
}

.ib-calc__checkbox {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: #FB4B42;
    cursor: pointer;
}

.ib-calc__checkbox:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ib-calc__checkbox:disabled + span {
    opacity: 0.4;
}

/* Conditional fields */
.ib-calc__conditional {
    display: none;
    margin-top: 12px;
    margin-left: 27px;
    padding-left: 16px;
    border-left: 3px solid #c4c4c4;
}

.ib-calc__conditional.ib-calc__conditional--visible {
    display: block;
}

/* Button */
.ib-calc__button {
    display: block;
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: #FB4B42;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-bottom: 24px;
}

.ib-calc__button:hover {
    background: #C13730;
}

.ib-calc__button:active {
    background: #C13730;
    transform: scale(0.99);
}

/* Results */
.ib-calc__results {
    display: none;
}

.ib-calc__results.ib-calc__results--visible {
    display: block;
}

/* Summary box */
.ib-calc__summary {
    background: #ffffff;
    border: 1px solid #D8D8D8;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    text-align: center;
}

.ib-calc__summary-label {
    display: block;
    font-size: 14px;
    color: #565656;
    margin-bottom: 6px;
}

.ib-calc__summary-amount {
    display: block;
    font-size: 34px;
    font-weight: 700;
    color: #202020;
}

.ib-calc__summary-sub {
    display: block;
    font-size: 14px;
    color: #565656;
    margin-top: 12px;
}

.ib-calc__summary-sub span {
    font-weight: 600;
    color: #202020;
}

/* Table */
.ib-calc__table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 14px;
}

.ib-calc__table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
    color: #202020;
}

.ib-calc__table tr:last-child td {
    border-bottom: none;
}

.ib-calc__table td:last-child {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ib-calc__table .ib-calc__row--subtotal td {
    font-weight: 600;
    border-bottom: 2px solid #565656;
    padding-top: 11px;
    padding-bottom: 11px;
    color: #202020;
}

.ib-calc__table .ib-calc__row--total td {
    font-weight: 700;
    font-size: 15px;
    background: #fbfcfa;
    color: #202020;
    border-bottom: none;
    border-radius: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.ib-calc__table .ib-calc__row--section td {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #565656;
    padding-top: 18px;
    padding-bottom: 4px;
    border-bottom: none;
}

.ib-calc__table .ib-calc__row--negative td:last-child {
    color: #FB4B42;
}

/* E-mail sectie */
.ib-calc__email-section {
    display: none;
    background: #ffffff;
    border: 1px solid #D8D8D8;
    border-radius: 16px;
    padding: 28px;
    margin-top: 24px;
}

.ib-calc__email-section.ib-calc__email-section--visible {
    display: block;
}

.ib-calc__email-intro {
    margin: 0 0 20px;
    color: #565656;
    font-size: 14px;
}

.ib-calc__email-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .ib-calc__email-name-row {
        grid-template-columns: 1fr;
        row-gap: 0;
    }
}

.ib-calc__required {
    color: #FB4B42;
}

.ib-calc__email-input {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 15px;
    border: 1px solid #c4c4c4;
    border-radius: 8px;
    background: #fff;
    color: #202020;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.ib-calc__email-input:focus {
    border-color: #565656;
    outline: none;
}

.ib-calc__button--secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ib-calc__email-feedback {
    font-size: 14px;
    margin: 0;
}

.ib-calc__email-feedback:empty {
    display: none;
}

.ib-calc__email-feedback--success {
    color: #1a7a3e;
    font-weight: 500;
}

.ib-calc__email-feedback--error {
    color: #FB4B42;
    font-weight: 500;
}

/* Urencriterium: pass/fail samenvatting */
.ib-calc__summary--pass {
    border-color: #1a7a3e;
    background: #f0faf4;
}

.ib-calc__summary--fail {
    border-color: #FB4B42;
    background: #fff6f6;
}

.ib-calc__summary-status {
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ib-calc__summary--pass .ib-calc__summary-status {
    color: #1a7a3e;
}

.ib-calc__summary--fail .ib-calc__summary-status {
    color: #c0392b;
}

/* Disclaimer */
.ib-calc__disclaimer {
    font-size: 12px;
    color: #565656;
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .ib-calc__section,
    .ib-calc__email-section {
        padding: 16px;
    }

    .ib-calc__input-wrap,
    .ib-calc__select {
        max-width: 100%;
    }

    .ib-calc__summary-amount {
        font-size: 26px;
    }

    .ib-calc__table td,
    .ib-calc__table td:last-child {
        padding: 6px 8px;
        font-size: 13px;
        white-space: normal;
    }

    .ib-calc__table .ib-calc__row--total td {
        display: block;
        text-align: left;
        word-break: break-word;
    }

    .ib-calc__table .ib-calc__row--total td:last-child {
        padding-top: 2px;
    }
}
