/* ABS Cost Saving Calculator
   Two cards: inputs + results. Side by side on desktop, stacked on mobile.
   ABS brand: navy / teal / gold / savings-green on light-blue. */

.abs-calc {
    --abs-navy: #0B1C30;
    --abs-teal: #06454E;
    --abs-gold: #C8A24A;
    --abs-green: #2F9E5B;
    --abs-text: #3F4A54;
    --abs-muted: #8A97A3;
    --abs-bg: #EAF5F7;
    --abs-border: #E3E8EC;
    --abs-radius: 18px;

    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 24px;
    box-sizing: border-box;
    color: var(--abs-text);
    font-family: inherit;
}

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

/* Cards */
.abs-calc__card {
    flex: 1 1 380px;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--abs-border);
    border-bottom: 3px solid var(--abs-teal);
    border-radius: var(--abs-radius);
    box-shadow: 0 18px 40px -24px rgba(11, 28, 48, 0.35);
    padding: 26px 28px 30px;
}

/* Card head */
.abs-calc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--abs-border);
}

.abs-calc__title {
    margin: 0;
    color: var(--abs-navy);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
}

.abs-calc__compare {
    color: var(--abs-muted);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

/* Reset button */
.abs-calc__reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #fff;
    color: var(--abs-navy);
    border: 1px solid var(--abs-border);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.abs-calc__reset:hover {
    border-color: var(--abs-gold);
    box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.12);
}

/* Input grid */
.abs-calc__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
}

.abs-calc__field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.abs-calc__label {
    color: var(--abs-muted);
    font-size: 15px;
    font-weight: 700;
}

/* Stepper */
.abs-calc__stepper {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--abs-border);
    border-radius: 12px;
    overflow: hidden;
    background: #FBFDFE;
}

.abs-calc__step {
    width: 44px;
    border: 0;
    background: transparent;
    color: var(--abs-navy);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.abs-calc__step:hover {
    background: var(--abs-bg);
}

.abs-calc__qty {
    flex: 1;
    min-width: 0;
    border: 0;
    border-left: 1px solid var(--abs-border);
    border-right: 1px solid var(--abs-border);
    background: transparent;
    text-align: center;
    color: var(--abs-navy);
    font-size: 18px;
    font-weight: 700;
    padding: 12px 8px;
    -moz-appearance: textfield;
}

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

/* Segmented toggle */
.abs-calc__toggle {
    display: flex;
    background: var(--abs-bg);
    border-radius: 12px;
    padding: 5px;
    gap: 5px;
}

.abs-calc__toggle-btn {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--abs-muted);
    font-size: 16px;
    font-weight: 700;
    padding: 11px 10px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.abs-calc__toggle-btn.is-active {
    background: #fff;
    color: var(--abs-navy);
    box-shadow: 0 2px 8px -2px rgba(11, 28, 48, 0.25);
}

/* Selects */
.abs-calc__select {
    position: relative;
}

.abs-calc__select::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--abs-navy);
    border-bottom: 2px solid var(--abs-navy);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.abs-calc__select select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid var(--abs-border);
    border-radius: 12px;
    background: #FBFDFE;
    color: var(--abs-navy);
    font-size: 16px;
    font-weight: 600;
    padding: 13px 40px 13px 16px;
    cursor: pointer;
}

.abs-calc__select select:focus,
.abs-calc__qty:focus {
    outline: none;
    border-color: var(--abs-teal);
    box-shadow: 0 0 0 3px rgba(6, 69, 78, 0.12);
}

/* Result tiles */
.abs-calc__tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.abs-calc__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    border: 1px solid var(--abs-border);
    border-radius: 14px;
    padding: 20px 18px;
    min-height: 140px;
}

.abs-calc__tile--savings {
    background: rgba(47, 158, 91, 0.06);
    border-color: rgba(47, 158, 91, 0.30);
}

.abs-calc__tile-label {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Reserve two lines so single- and double-line labels are the same height,
       which keeps the dollar values on one horizontal line across the tiles. */
    min-height: 2.6em;
    color: var(--abs-muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.abs-calc__tile-value {
    color: var(--abs-navy);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}

.abs-calc__tile--savings .abs-calc__tile-value {
    color: var(--abs-green);
}

.abs-calc__tile-note {
    color: var(--abs-green);
    font-size: 13px;
    font-weight: 700;
}

/* Tagline + CTA */
.abs-calc__tagline {
    margin: 20px 0 0;
    color: var(--abs-muted);
    font-size: 15px;
    font-weight: 600;
}

.abs-calc__cta {
    display: inline-block;
    margin-top: 18px;
    padding: 13px 26px;
    background: var(--abs-gold);
    color: var(--abs-navy);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    transition: filter 0.15s ease;
}

.abs-calc__cta:hover {
    filter: brightness(0.95);
}

/* Responsive: stack cards, then collapse the grids */
@media (max-width: 900px) {
    .abs-calc {
        flex-direction: column;
    }

    .abs-calc__card {
        flex-basis: auto;
    }
}

@media (max-width: 560px) {
    .abs-calc__grid {
        grid-template-columns: 1fr;
    }

    .abs-calc__tiles {
        grid-template-columns: 1fr;
    }

    .abs-calc__tile {
        min-height: 0;
    }

    .abs-calc__head {
        flex-wrap: wrap;
    }

    .abs-calc__compare {
        text-align: left;
    }
}

/* Theme-hardening: hello-elementor / Elementor global kits paint every
   <button> and <a> with the brand gold, which leaks into this component
   (gold Reset, gold stepper, and a gold-on-gold invisible CTA). Pin the
   component's own controls with a parent-scoped, !important override so it
   renders identically on a plain page or inside an Elementor widget. */
.abs-calc .abs-calc__reset {
    background: #fff !important;
    color: var(--abs-navy) !important;
    border: 1px solid var(--abs-border) !important;
}

.abs-calc .abs-calc__reset:hover {
    border-color: var(--abs-gold) !important;
}

.abs-calc .abs-calc__step {
    background: transparent !important;
    color: var(--abs-navy) !important;
    border: 0 !important;
}

.abs-calc .abs-calc__step:hover {
    background: var(--abs-bg) !important;
}

.abs-calc .abs-calc__toggle-btn {
    background: transparent !important;
    color: var(--abs-muted) !important;
    border: 0 !important;
    box-shadow: none !important;
}

.abs-calc .abs-calc__toggle-btn.is-active {
    background: #fff !important;
    color: var(--abs-navy) !important;
    box-shadow: 0 2px 8px -2px rgba(11, 28, 48, 0.25) !important;
}

/* The one intentional gold button — force readable navy text over it. */
.abs-calc .abs-calc__cta {
    background: var(--abs-gold) !important;
    color: var(--abs-navy) !important;
}

.abs-calc .abs-calc__cta:hover {
    color: var(--abs-navy) !important;
}

/* Keep the result numbers centered and on one horizontal line across tiles. */
.abs-calc .abs-calc__tile-value {
    margin-top: 0 !important;
    text-align: center;
}

.abs-calc .abs-calc__tile-note {
    text-align: center;
}
