/* Website calculators. Colours: ONLY the logo CI from uy_design_system.css (--uy-navy, --uy-gold, --uy-gold-text,
   --uy-offwhite, --uy-text, --uy-slate); the values after the comma are fallbacks only (same values).
   Rules: navy for result block, table heads, headings, links and focus; gold only as accent (primary button,
   thin lines, icons), never as an area of text or a big surface; text on gold buttons is dark navy (--uy-navy-ink) and bold.
   Everything is class based (.av_ext_calc ...): every calculator page, including a new one, gets it automatically.
   Rules: Masterplaene/DESIGN_REGELWERK_V1.0.md and docs/CI_FARBEN_2026-11-15.md */

.av_ext_calc_hero {
    background: var(--uy-offwhite, #F4F7FB);
    border-bottom: 3px solid var(--uy-gold, #F0AB15);
}
.av_ext_calc_hero h1 {
    color: var(--uy-navy, #1E417E);
    font-size: clamp(1.9rem, 5vw, 3rem);
    line-height: 1.1;
    max-width: 22ch;
}
.av_ext_calc_hero .lead {
    color: var(--uy-slate, #475569);
    max-width: 65ch;
}
.av_ext_calc a.av_ext_back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--uy-navy, #1E417E);
    font-weight: 500;
}

/* cards */
.av_ext_card {
    background: #fff;
    border: 1px solid rgba(33, 37, 41, 0.1);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px rgba(30, 65, 126, 0.08);
    padding: 1.25rem;
}
@media (min-width: 768px) {
    .av_ext_card {
        padding: 1.75rem;
    }
}

/* form: large touch targets (44 px and more), 16 px text so that phones do not zoom in */
.av_ext_calc .form-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.av_ext_calc .form-control,
.av_ext_calc .form-select,
.av_ext_calc .input-group-text {
    min-height: 48px;
    font-size: 1rem;
}
.av_ext_calc .input-group-text {
    min-width: 3.25rem;
    justify-content: center;
    background: var(--uy-offwhite, #F4F7FB);
    color: var(--uy-text, #1E293B);
    font-weight: 500;
}
.av_ext_calc .form-control {
    font-variant-numeric: tabular-nums;
}
.av_ext_calc .form-text {
    color: var(--uy-slate, #475569);
}
.av_ext_calc .form-check.form-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    padding-left: 0;
}
.av_ext_calc .form-switch .form-check-input {
    width: 3rem;
    height: 1.6rem;
    margin: 0;
    float: none;
    flex-shrink: 0;
    cursor: pointer;
}
.av_ext_calc .form-switch .form-check-label {
    cursor: pointer;
}
.av_ext_calc .btn.btn-primary {
    --bs-btn-color: var(--uy-navy-ink, #0F2347);
    --bs-btn-hover-color: var(--uy-navy-ink, #0F2347);
    --bs-btn-active-color: var(--uy-navy-ink, #0F2347);
    min-height: 48px;
    background-color: var(--uy-gold, #F0AB15);
    border-color: var(--uy-gold, #F0AB15);
    color: var(--uy-navy-ink, #0F2347);
    font-weight: 700;
}
.av_ext_calc .btn.btn-primary:hover,
.av_ext_calc .btn.btn-primary:focus-visible,
.av_ext_calc .btn.btn-primary:active {
    background-color: var(--uy-gold-hover, #F6C14A);
    border-color: var(--uy-gold-hover, #F6C14A);
    color: var(--uy-navy-ink, #0F2347);
}
.av_ext_calc .btn.btn-primary:disabled,
.av_ext_calc .btn.btn-primary.disabled {
    background-color: var(--uy-gold, #F0AB15);
    border-color: var(--uy-gold, #F0AB15);
    color: var(--uy-navy-ink, #0F2347);
    opacity: 0.6;
}
/* headings, links and Bootstrap "primary/warning" helpers: logo navy, never the theme yellow or a bright blue */
.av_ext_calc h1,
.av_ext_calc h2,
.av_ext_calc h3,
.av_ext_calc h4 {
    color: var(--uy-navy, #1E417E);
}
.av_ext_calc .text-primary,
.av_ext_calc .text-warning {
    color: var(--uy-navy, #1E417E) !important;
}
.av_ext_calc .av_ext_stat_main h1,
.av_ext_calc .av_ext_stat_main h2,
.av_ext_calc .av_ext_stat_main h3,
.av_ext_calc .av_ext_stat_main h4 {
    color: #fff;
}
.av_ext_calc a:not(.btn):not(.av_ext_link_card) {
    color: var(--uy-navy, #1E417E);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
.av_ext_calc .av_ext_stat_main a:not(.btn):not(.av_ext_link_card) {
    color: #fff;
}
.av_ext_calc a:not(.btn):not(.av_ext_link_card):hover {
    color: var(--uy-navy-dark, #152E5A);
}
.av_ext_calc .av_ext_stat_main a:not(.btn):not(.av_ext_link_card):hover {
    color: #fff;
}
/* inputs, selects (also the currency select) and switches: navy focus and checked state */
.av_ext_calc .form-control,
.av_ext_calc .form-select {
    color: var(--uy-text, #1E293B);
    border-color: #64748B;
}
.av_ext_calc .form-control:focus,
.av_ext_calc .form-select:focus {
    border-color: var(--uy-navy, #1E417E);
    box-shadow: 0 0 0 0.2rem rgba(30, 65, 126, 0.25);
}
.av_ext_calc .form-check-input:checked {
    background-color: var(--uy-navy, #1E417E);
    border-color: var(--uy-navy, #1E417E);
}
.av_ext_calc .form-check-input:focus {
    border-color: var(--uy-navy, #1E417E);
    box-shadow: 0 0 0 0.2rem rgba(30, 65, 126, 0.25);
}
/* notes of Bootstrap: calm surfaces with a thin accent line instead of yellow or blue areas */
.av_ext_calc .alert-warning,
.av_ext_calc .alert-info {
    background: var(--uy-offwhite, #F4F7FB);
    color: var(--uy-text, #1E293B);
    border: 1px solid #CBD5E1;
    border-left: 4px solid var(--uy-gold, #F0AB15);
}
.av_ext_calc .alert-info {
    border-left-color: var(--uy-navy, #1E417E);
}
.av_ext_calc :focus-visible {
    outline: 3px solid var(--uy-navy, #1E417E);
    outline-offset: 2px;
}
/* on navy ground the ring is gold (4.99:1 on navy, 3:1 needed) */
.av_ext_calc .av_ext_stat_main :focus-visible {
    outline-color: var(--uy-gold, #F0AB15);
}

/* info tip: a text link with icon, opens on tap or click */
.av_ext_calc_tip > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
    color: var(--uy-navy, #1E417E);
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
.av_ext_calc_tip > summary::-webkit-details-marker {
    display: none;
}
.av_ext_calc_tip > div {
    background: var(--uy-offwhite, #F4F7FB);
    border-left: 4px solid var(--uy-navy, #1E417E);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* result */
@media (min-width: 992px) {
    .av_ext_calc_result_col {
        position: sticky;
        top: 6.5rem;
    }
}
.av_ext_stat_main {
    background: var(--uy-navy, #1E417E);
    color: #fff;
    border-top: 4px solid var(--uy-gold, #F0AB15);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
}
.av_ext_stat_main .av_ext_stat_label {
    color: rgba(255, 255, 255, 0.85);
}
.av_ext_stat_main .av_ext_stat_value {
    font-size: clamp(2rem, 7vw, 2.9rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.av_ext_stat_main .av_ext_stat_sub {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    color: var(--uy-navy, #1E417E);
    font-weight: 700;
}
.av_ext_stat {
    background: var(--uy-offwhite, #F4F7FB);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    height: 100%;
}
.av_ext_stat_label {
    display: block;
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--uy-slate, #475569);
}
.av_ext_stat_value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.av_ext_rows {
    width: 100%;
    margin: 0;
}
.av_ext_rows td,
.av_ext_rows th {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(33, 37, 41, 0.1);
    vertical-align: top;
}
.av_ext_rows td:last-child {
    text-align: right;
    padding-left: 1rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.av_ext_rows tr[data-kind="total"] td {
    font-weight: 700;
}
.av_ext_rows tr[data-kind="head"] th {
    padding-top: 1.5rem;
    border-bottom: 2px solid var(--uy-navy, #1E417E);
    color: var(--uy-navy, #1E417E);
    font-weight: 600;
}
/* status: always icon plus word, never colour alone */
.av_ext_rows tr[data-kind="ok"] td:last-child,
.av_ext_rows tr[data-kind="no"] td:last-child {
    white-space: normal;
}
.av_ext_badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.av_ext_badge_ok {
    background: #e3f4e8;
    color: #0b5a2a;
}
.av_ext_badge_no {
    background: #eceef0;
    color: #3d444b;
}
.av_ext_callout {
    background: var(--uy-offwhite, #F4F7FB);
    border-left: 4px solid var(--uy-gold, #F0AB15);
    border-radius: 0.5rem;
    padding: 0.9rem 1rem;
    color: var(--uy-text, #1E293B);
}
.av_ext_notes > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
    color: var(--uy-navy, #1E417E);
    font-weight: 600;
}
.av_ext_notes p,
.av_ext_footer p {
    font-size: 0.875rem;
    color: var(--uy-slate, #475569);
    max-width: 75ch;
}
.av_ext_empty {
    border: 2px dashed rgba(33, 37, 41, 0.2);
    border-radius: 1rem;
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--uy-slate, #475569);
}

/* links to the other calculators and the overview page */
a.av_ext_link_card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    height: 100%;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
a.av_ext_link_card:hover,
a.av_ext_link_card:focus-visible {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 14px 34px rgba(30, 65, 126, 0.16);
    transform: translateY(-2px);
}
.av_ext_icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: var(--uy-navy, #1E417E);
    color: var(--uy-gold, #F0AB15);
    font-size: 1.25rem;
}
.av_ext_link_card .av_ext_more {
    color: var(--uy-navy, #1E417E);
    font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
    a.av_ext_link_card {
        transition: none;
    }
    a.av_ext_link_card:hover,
    a.av_ext_link_card:focus-visible {
        transform: none;
    }
}

/* the result card is a jump target (button "Calculate"): keep it clear of the fixed header */
#calc_result {
    scroll-margin-top: 6.5rem;
}

/* review by the roles Designer and Sales: answer first, clear next steps */
.av_ext_stat_main_no {
    background: var(--uy-text, #1E293B);
}
/* purchase costs: the same quiet line as in the PDF - share of the price first, the amount in normal size */
.av_ext_stat_main_quiet {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.4rem;
    background: var(--uy-offwhite, #F4F7FB);
    color: var(--uy-text, #1E293B);
    border-left: 4px solid var(--uy-navy, #1E417E);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}
.av_ext_stat_main_quiet .av_ext_stat_label {
    order: 1;
    display: inline;
    font-size: 1rem;
    color: var(--uy-text, #1E293B);
}
.av_ext_stat_main_quiet .av_ext_stat_label::after {
    content: ":";
}
.av_ext_stat_main_quiet .av_ext_stat_sub {
    order: 2;
    display: inline;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: 1rem;
    font-weight: 600;
}
.av_ext_stat_main_quiet .av_ext_stat_value {
    order: 3;
    display: inline;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: inherit;
}
.av_ext_stat_main_quiet .av_ext_stat_value::before {
    content: "(";
}
.av_ext_stat_main_quiet .av_ext_stat_value::after {
    content: ")";
}
.av_ext_calc .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.av_ext_btn_ghost {
    border: 2px solid var(--uy-navy, #1E417E);
    color: var(--uy-navy, #1E417E);
    background: #fff;
}
.av_ext_btn_ghost:hover,
.av_ext_btn_ghost:focus-visible {
    background: var(--uy-navy, #1E417E);
    color: #fff;
}
.av_ext_cta {
    background: var(--uy-offwhite, #F4F7FB);
    box-shadow: none;
}
.av_ext_cta p {
    color: var(--uy-text, #1E293B);
}
.av_ext_prop {
    border-left: 4px solid var(--uy-gold, #F0AB15);
}

/* lead form (result as PDF by e-mail) and legal sources */
.av_ext_send {
    border-top: 4px solid var(--uy-gold, #F0AB15);
}
.av_ext_hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.av_ext_consent {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding-left: 0;
}
.av_ext_consent .form-check-input {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0.1rem 0 0 0;
    float: none;
}
.av_ext_consent .form-check-label {
    min-height: 44px;
    color: var(--uy-text, #1E293B);
}
.av_ext_consent a,
.av_ext_sources a {
    color: var(--uy-navy, #1E417E);
    text-decoration: underline;
}
.av_ext_send_msg {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}
.av_ext_send_ok {
    background: #d1e7dd;
    color: #0a3622;
}
.av_ext_send_err {
    background: #f8d7da;
    color: #58151c;
}
.av_ext_sources > summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
}
.av_ext_sources span.small {
    color: var(--uy-slate, #475569);
}
/* links to the official texts: full touch target (44 px) */
.av_ext_sources li > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* trip budget: choice cards and tiles (Bootstrap btn-check, no script needed); one column on phones,
   touch targets of 44 px and more, the chosen state shown by border, background and a tick (not by colour alone) */
.av_ext_choice legend.form-label {
    float: none;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}
.av_ext_choice_grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
@media (min-width: 576px) {
    .av_ext_choice_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.av_ext_calc .av_ext_choice_card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.6rem 0.9rem;
    text-align: left;
    white-space: normal;
    background: #fff;
    color: var(--uy-text, #1E293B);
    border: 2px solid rgba(33, 37, 41, 0.18);
    border-radius: 0.75rem;
    font-weight: 500;
}
.av_ext_calc .btn-check:checked + .av_ext_choice_card {
    border-color: var(--uy-navy, #1E417E);
    background: var(--uy-offwhite, #F4F7FB);
    color: var(--uy-text, #1E293B);
    box-shadow: inset 0 0 0 1px var(--uy-navy, #1E417E);
}
.av_ext_calc .btn-check:focus-visible + .av_ext_choice_card {
    outline: 3px solid var(--uy-navy, #1E417E);
    outline-offset: 2px;
}
.av_ext_choice_mark {
    visibility: hidden;
    color: var(--uy-navy, #1E417E);
}
.av_ext_calc .btn-check:checked + .av_ext_choice_card .av_ext_choice_mark {
    visibility: visible;
}
.av_ext_calc .btn-check[type="radio"]:checked + .av_ext_choice_card::before {
    content: "\f00c";
    font-family: FontAwesome;
    color: var(--uy-navy, #1E417E);
}
/* a price is missing: the hint is text, not a big figure */
.av_ext_stat_main[data-highlight="missing"] .av_ext_stat_value {
    font-size: 1.15rem;
    line-height: 1.4;
}

/* trip budget: plus and minus beside nights and travellers (shown by the script), 48 px touch targets */
.av_ext_calc .av_ext_step {
    min-width: 48px;
    padding: 0 0.75rem;
    border: 1px solid #ced4da;
    background: var(--uy-offwhite, #F4F7FB);
    color: var(--uy-text, #1E293B);
    font-size: 1.25rem;
    line-height: 1;
}
.av_ext_calc .av_ext_step:hover {
    background: #e9ecef;
}
/* without the script the buttons stay hidden: the field keeps its round corners */
.av_ext_stepper:has(> .av_ext_step[hidden]) > .form-control {
    border-radius: var(--bs-border-radius, 0.375rem);
}

/* trip budget: bar with the range at the bottom of phones and tablets, never on large screens;
   below the cookie bar (z-index of Bootstrap modals is higher) and clear of the iPhone home bar */
.av_ext_bar {
    display: none;
}
.av_ext_bar_tag {
    display: block;
    font-size: .75rem;
    line-height: 1.2;
}
.av_ext_tag {
    display: block;
}
#calc_budget {
    scroll-margin-top: 9rem;
}
@media (max-width: 991.98px) {
    .av_ext_bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1025;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid rgba(33, 37, 41, 0.12);
        box-shadow: 0 -6px 20px rgba(30, 65, 126, 0.12);
    }
    .av_ext_bar strong {
        display: block;
        font-variant-numeric: tabular-nums;
    }
    .av_ext_bar .btn {
        flex-shrink: 0;
        white-space: nowrap;
        min-height: 44px;
        padding: .4rem .75rem;
        font-size: .875rem;
        display: inline-flex;
        align-items: center;
    }
    /* compact bar (about 70 px): the range alone, the label is in the result block above */
    .av_ext_bar {
        padding-top: .5rem !important;
        padding-bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)) !important;
        gap: .5rem;
        align-items: center;
    }
    .av_ext_bar .av_ext_stat_label {
        display: none;
    }
    .av_ext_bar strong {
        font-size: 1rem;
        line-height: 1.2;
    }
    /* room at the end of the page, so the bar never covers the lead form or the footer */
    #wrapwrap:has(.av_ext_bar) {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }
    /* typing in the lead form (keyboard open): the bar steps aside */
    .av_ext_calc:has(.av_ext_send :focus) .av_ext_bar {
        display: none;
    }
}

/* small screens: a long value (text result) may wrap, amounts keep their line; no horizontal scrolling */
@media (max-width: 575.98px) {
    .av_ext_rows td:last-child {
        white-space: normal;
        overflow-wrap: anywhere;
        min-width: 7.5rem;
    }
}

/* currency of the amount (business calculators): a select in front of the field, as high as the field and of a
   fixed width, so the layout does not jump when another code is chosen; no fixed heights */
.av_ext_calc .av_ext_cur {
    flex: 0 0 6.5rem;
    width: 6.5rem;
    min-width: 6.5rem;
    min-height: 48px;
}
.av_ext_calc .av_ext_cur_follow {
    justify-content: center;
}
.av_ext_calc .av_ext_fx {
    overflow-wrap: anywhere;
}
.av_ext_calc .av_ext_fx_credit {
    display: inline-block;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: underline;
}
.av_ext_calc .av_ext_alt {
    color: var(--uy-slate, #475569);
    font-variant-numeric: tabular-nums;
}
