.abc-calculator-wrapper {
    --abc-primary: #2563eb;
    --abc-primary-soft: rgba(37, 99, 235, 0.06);
    --abc-border: rgba(15, 23, 42, 0.1);
    --abc-radius: 14px;

    background: #ffffff;
    border-radius: var(--abc-radius);
    border: 1px solid var(--abc-border);
    padding: 24px 24px 20px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    max-width: 700px;
    margin: 0 auto;
}

.abc-calculator-heading {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.4rem;
    line-height: 1.3;
}

.abc-calculator-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.abc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.abc-row-actions {
    justify-content: flex-end;
    margin-top: 6px;
}

.abc-field {
    flex: 1 1 220px;
    min-width: 0;
}

.abc-field label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #0f172a;
}

.abc-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f8fafc;
    font-size: 0.9rem;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
    outline: none;
    box-sizing: border-box;
}

.abc-input:focus {
    border-color: var(--abc-primary);
    background: #ffffff;
    box-shadow: 0 0 0 1px var(--abc-primary-soft);
}

/* Customer type pills */

.abc-field-customer-type {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.abc-customer-type-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.abc-customer-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.abc-pill-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.abc-pill-option input {
    display: none;
}

.abc-pill-option span {
    white-space: nowrap;
}

.abc-pill-option input:checked ~ span,
.abc-pill-option input:checked + span {
    font-weight: 600;
    color: #0f172a;
}

.abc-pill-option input:checked ~ span::after,
.abc-pill-option input:checked + span::after {
    content: "";
    position: absolute;
    inset: -6px -10px;
    border-radius: inherit;
    border: 1px solid var(--abc-primary);
    box-shadow: 0 0 0 1px var(--abc-primary-soft);
}

.abc-pill-option:hover {
    background: #eff6ff;
}

/* Toggle fields */

.abc-field-toggle {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.abc-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 6px;
}

.abc-toggle input {
    display: none;
}

.abc-toggle-slider {
    width: 32px;
    height: 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.25);
    position: relative;
    transition: background 0.16s ease;
}

.abc-toggle-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
    transition: transform 0.16s ease;
}

.abc-toggle input:checked + .abc-toggle-slider {
    background: var(--abc-primary);
}

.abc-toggle input:checked + .abc-toggle-slider::before {
    transform: translateX(12px);
}

.abc-toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.abc-sub-field label {
    font-size: 0.8rem;
}

/* Button */

.abc-button-calc {
    border: none;
    border-radius: 999px;
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.abc-button-calc::after {
    content: "→";
    font-size: 0.9em;
}

.abc-button-calc:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.42);
    filter: brightness(1.03);
}

.abc-button-calc:active {
    transform: translateY(0);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}

/* Result box */

.abc-result {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--abc-primary-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.abc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.abc-result-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #0f172a;
}

.abc-result-value {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
    color: #0f172a;
}

.abc-result-note {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #64748b;
}

/* Responsive */

@media (max-width: 600px) {
    .abc-calculator-wrapper {
        padding: 18px 16px 16px;
    }

    .abc-row {
        flex-direction: column;
    }

    .abc-result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .abc-result-value {
        text-align: left;
    }
}
