/* Calculator-specific styles */

.calculators-landing-hero {
    padding: 2.5rem 1.25rem 1.75rem;
    text-align: center;
}

.calculators-landing-title {
    line-height: 1.12;
    margin: 0 auto 0.875rem;
}

.calculators-landing-lead {
    line-height: 1.45;
    margin-bottom: 0;
    max-width: 42rem;
}

.calculators-scroll-cue {
    align-items: center;
    color: #f76c6c;
    display: inline-flex;
    font-size: 1.55rem;
    justify-content: center;
    line-height: 1;
    margin-top: 1.25rem;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.calculators-scroll-cue:hover,
.calculators-scroll-cue:focus {
    color: #f76c6c;
    transform: translateY(2px);
}

.calculators-scroll-cue:focus-visible {
    border-radius: 8px;
    outline: 2px solid rgba(247, 108, 108, 0.65);
    outline-offset: 0.35rem;
}

#calculators-list {
    scroll-margin-top: 5.5rem;
}

#calculator-box {
    background:
        linear-gradient(145deg, rgba(168, 208, 230, 0.1), rgba(248, 233, 161, 0.1) 44%, rgba(255, 255, 255, 0) 72%),
        #ffffff;
    border: 1px solid rgba(55, 71, 133, 0.14);
    border-radius: 8px;
    box-shadow:
        0 22px 48px rgba(36, 48, 94, 0.14),
        0 2px 8px rgba(36, 48, 94, 0.08);
    color: #374785;
}

/* Static pre-calculation medical disclaimer */
.calculator-disclaimer {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Result output container */
#result {
    width: min(92%, 780px);
}

#result:not(:empty) {
    color: #24305e;
    margin-top: 2rem;
    padding: 0;
    text-align: left;
}

.calculator-result-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(168, 208, 230, 0.16), rgba(248, 233, 161, 0.14) 44%, rgba(255, 255, 255, 0) 72%),
        #ffffff;
    border: 1px solid rgba(55, 71, 133, 0.14);
    border-radius: 8px;
    box-shadow:
        0 22px 48px rgba(36, 48, 94, 0.14),
        0 2px 8px rgba(36, 48, 94, 0.08);
}

.calculator-result-card::before {
    content: "";
    display: block;
    height: 5px;
    background-color: #a8d0e6;
}

.calculator-result-card__content {
    padding: clamp(1.25rem, 4vw, 2rem);
    text-align: left;
}

.calculator-result-card h3,
.calculator-result-card h4 {
    color: #24305e;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0 0 1rem;
    text-align: left;
}

.calculator-result-card h3 {
    align-items: flex-start;
    display: flex;
    gap: 0.7rem;
}

.calculator-result-card h3::before {
    background-color: #f76c6c;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(247, 108, 108, 0.14);
    content: "";
    flex: 0 0 0.6rem;
    height: 0.6rem;
    margin-top: 0.4em;
    width: 0.6rem;
}

.calculator-result-card h4 {
    margin-top: 1.25rem;
    text-align: center;
    color: #f76c6c;
}

.calculator-result-card p {
    color: #4f5b76;
    line-height: 1.65;
    margin-bottom: 0.85rem;
}

.calculator-result-card p:last-child {
    margin-bottom: 0;
}

.calculator-result-card__content > p:first-of-type,
.calculator-result-card__content .result-container > p:first-of-type {
    background: linear-gradient(135deg, rgba(168, 208, 230, 0.2), rgba(248, 233, 161, 0.22));
    border: 1px solid rgba(55, 71, 133, 0.12);
    border-radius: 8px;
    color: #24305e;
    font-weight: 500;
    padding: 1rem;
}

.calculator-result-card strong,
.calculator-result-card b {
    color: #24305e;
    font-weight: 750;
}

.calculator-result-card__content a {
    border-bottom: 1px solid rgba(247, 108, 108, 0.45);
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease;
}

/* .calculator-result-card__content a:hover,
.calculator-result-card__content a:focus {
    color: #fff;
} */

.calculator-result-card .emojires {
    font-size: 1rem;
    vertical-align: 0.02em;
}

.calculator-result-card .table-responsive {
    background-color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(55, 71, 133, 0.12);
    border-radius: 8px;
    margin-top: 1rem;
    overflow-x: auto;
}

.calculator-result-card .table {
    color: #24305e;
    margin-bottom: 0;
    min-width: 620px;
}

.calculator-result-card .table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: rgba(55, 71, 133, 0.1);
    padding: 0.9rem 1rem;
}

.calculator-result-card .table thead th {
    background-color: rgba(55, 71, 133, 0.08);
    color: #24305e;
    font-size: 0.9rem;
    font-weight: 750;
}

.calculator-result-card .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(168, 208, 230, 0.12);
    color: #24305e;
}

/* Footer appended to every calculator result */
.result-footer {
    background: linear-gradient(135deg, rgba(248, 233, 161, 0.24), rgba(168, 208, 230, 0.16));
    border-top: 1px solid rgba(55, 71, 133, 0.12);
    padding: 1.15rem clamp(1.25rem, 4vw, 2rem) 1.3rem;
}

.result-footer__card {
    background-color: #ffffff;
    border: 1px solid rgba(55, 71, 133, 0.12);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(36, 48, 94, 0.08);
}

.result-footer__card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
}

.result-footer__icon {
    background-color: rgba(168, 208, 230, 0.22);
    border: 1px solid rgba(55, 71, 133, 0.1);
    border-radius: 8px;
    color: #f76c6c;
    flex: 0 0 auto;
    height: 4rem;
    margin-bottom: 0.25rem;
    width: 4rem;
}

.result-footer__icon i {
    color: #f76c6c;
    font-size: 1.5rem;
    line-height: 1;
}

.result-footer__title {
    color: #24305e;
    font-size: 1.1rem;
    font-weight: 750;
    line-height: 1.3;
    margin: 0;
}

.result-footer__text {
    color: #5f6b84;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
}

.result-footer__btn {
    align-self: center;
    background-color: #374785;
    border-color: #374785;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.25rem;
    padding: 0.55rem 1.1rem;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.result-footer__btn:hover,
.result-footer__btn:focus {
    background-color: #24305e;
    border-color: #24305e;
    color: #ffffff;
}

/* Related calculators links below result cards */
.result-footer__related {
    text-align: center;
    padding-bottom: 1.25rem;
}

.result-footer__related .result-footer__related-title {
    align-items: center;
    color: #f16f78;
    display: flex;
    font-size: 1rem;
    font-weight: 750;
    gap: 0.75rem;
    justify-content: center;
    margin: 0 0 0.75rem;
    padding-top: 1.25rem;
    text-align: center;
}

.result-footer__related-title::before,
.result-footer__related-title::after {
    background-color: rgba(247, 108, 108, 0.35);
    content: "";
    display: block;
    flex: 0 0 auto;
    height: 1px;
    width: 70px;
}

.result-footer__related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.result-footer__related-link {
    border-bottom: 1px solid rgba(247, 108, 108, 0.45);
    color: #374785;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease;
}

.result-footer__related-link:hover,
.result-footer__related-link:focus {
    border-color: #f76c6c;
    color: #f76c6c;
}

@media (max-width: 576px) {
    .calculators-landing-hero {
        padding: 2.25rem 1.25rem 1.7rem;
    }

    .calculators-landing-title {
        line-height: 1.08;
    }

    .calculators-scroll-cue {
        font-size: 1.7rem;
        margin-top: 1.25rem;
    }

    #result {
        width: calc(100% - 1.5rem);
    }

    .calculator-result-card__content {
        padding: 1rem;
    }

    .result-footer {
        padding: 1rem;
    }

    .result-footer__card-body {
        padding: 1rem;
    }

    .result-footer__related-title::before,
    .result-footer__related-title::after {
        width: 35px;
    }
}

@media (min-width: 768px) {
    .calculators-landing-hero {
        padding: 3rem 1.5rem 1.9rem;
    }

    .calculators-landing-title {
        margin-bottom: 0.75rem;
    }

    .calculators-scroll-cue {
        font-size: 2rem;
        margin-top: 1.25rem;
    }
}
