/* helpers */
.reset-button {
    display: inline-block;
    font-weight: unset;
    line-height: unset;
    color: unset;
    text-align: unset;
    text-decoration: unset;
    vertical-align: unset;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    background-color: transparent;
    border: unset;
    padding: unset;
    font-size: unset;
    border-radius: unset;
}

.ratio-4-3 {
    aspect-ratio: 4/3;
    object-fit: contain;
}

.fit-cover {
    object-fit: cover;
}

/*  mainCarousel */
.carousel.carousel--inside {
    display: flex;

}
.carousel.carousel--inside .carousel-control-prev,
.carousel.carousel--inside .carousel-control-next {
    position: static;
}

.carousel.carousel--inside .carousel-control-prev {
    order: -1;
}

/*  accordion-item */
.optionsAccordion__button {
    border: 1px solid var(--border-color);
    background-color: var(--bg-color2);
    color: var(--text-color);
    border-radius: 0;
    padding: 1rem;
    text-align: left;
}

.optionsAccordion__header:first-child .optionsAccordion__button {
    border-top-left-radius: var(--border-radius, .25rem);
    border-top-right-radius: var(--border-radius, .25rem);
}

.optionsAccordion__body {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 1rem;
}

.collapse:last-child .optionsAccordion__body {
    border-bottom: 1px solid var(--border-color);
}

/* round last collapse's bottom border-radius */
.optionsAccordion__header:nth-last-child(2) .optionsAccordion__button[aria-expanded="false"],
.collapse:last-child .optionsAccordion__body {
    border-bottom-left-radius: var(--border-radius, .25rem);
    border-bottom-right-radius: var(--border-radius, .25rem);
}

/* picker */
.picker {
    position: relative;
    display: block;
}

.color-square {
    padding-top: 100%;
    width: 100%;
    border-radius: var(--border-radius, .25rem);
}

/* prevent image dragging */
.picker img {
    pointer-events: none;
    user-select: none;
}

.picker__input {
    display: none;
}

.picker__check {
    --check-circle-height: 1.5rem;

    font-size: .8rem;
    width: var(--check-circle-height);
    height: var(--check-circle-height);
    line-height: var(--check-circle-height);
    background-color: var(--primary);
    text-align: center;
    color: white;
    border: 1px solid white;
    border-radius: 50%;

    position: absolute;
    bottom: calc( var(--check-circle-height) * -.25);
    right: calc( var(--check-circle-height) * -.25);

    display: none;
}

.picker__input:checked+.picker__check{
    display: block;
}

/* triangle (needs a relative parent) */
.triangle {
    --triangle-height: 4rem;

    position: absolute;
    top: 0;
    right: 0;

    /* https://stackoverflow.com/questions/7073484/how-do-css-triangles-work/24808936#24808936 */
    height: calc( var(--triangle-height) / 1.41); /* this is the diagonal line of the triangle */
    width: var(--triangle-height);
    transform-origin: right bottom;
    transform: rotate(45deg);
    overflow: hidden;

}

.triangle__btn {
    width: 100%;
    height: 100%;
    transform-origin: right bottom;
    transform: rotate(-45deg);
    background-color: var(--primary);
    color: white;

    position: relative;

}

.triangle__btn i {
    position: absolute;
    top: .35rem;
    right: .35rem;
}

/* options's finance */
.financeFooter {
    --img-width: 50%;
    /* 50% of img height assuming img has 4/3 aspect-ratio */
    --img-overflow-value: calc( (3 / 4 * var(--img-width)) * .5);

    /* margin-top is not the exact same as the overflow because of the container's padding (%value is based on the element's width) */
    margin-top: var(--img-overflow-value);

    position: sticky;
    bottom: 0;
    border-bottom-left-radius: var(--border-radius, .25rem);
    border-bottom-right-radius: var(--border-radius, .25rem);

}

.financeFooter__img {
    width: var(--img-width);
    margin-top: calc(-1 * var(--img-overflow-value));
}

.financeFooter__toggle {
    --icon-height: 2.5rem;
    padding: 1.1em;
    font-size: .8rem;
    width: var(--icon-height);
    height: var(--icon-height);
    line-height: var(--icon-height);
    text-align: center;
    background-color: white;
    color: var(--primary);
    border: 2px solid currentColor;
    border-radius: 50%;
    display: grid;
    place-content: center;

    position: absolute;
    right: 0;
    top: calc(-.5 * var(--icon-height));
}


/* Acc calc icon */
.acc_calc_icon {
    transition: transform 0.5s ease 0.1s; /* Adjust the duration and timing function as needed */
}

.acc_calc_icon .mini_calc_icon,
.acc_calc_icon .mini_calc_icon_main,
.acc_calc_icon .mini_calc_icon_eg {
    transition: fill 0.5s ease
}

.acc_calc_icon:hover {
    transform: rotate(180deg);
}
.acc_calc_icon:hover .mini_calc_icon {
    fill: var(--primary);
}
.acc_calc_icon:hover .mini_calc_icon_main {
    fill: white;
}
.acc_calc_icon:hover .mini_calc_icon_eg {
    fill: rgb(124, 16, 25);
}


/* FOOTER ACC container */
.hidden_bl_acc_footer {
    transform: translateY(70%);
    transition: all 250ms cubic-bezier(0.67, 0.04, 0.36, 0.99);
}

.show_bl_acc_footer {
    transform: translateY(0);
    transition: all 450ms cubic-bezier(0, 0, 0, 1);
}

.bl_btn_acc_summ {
    top: -26px;
    position: absolute;
    padding: 3px 3px;
    max-width: 112px;
    font-size: 10px;
    margin-left: 163px;
}

/* summary */
.summary-section-title {
    background-color: var(--bg-color2, #f2f2f2);
    padding: .75rem 1rem;
}

.financeFooter__pricing {
    font-size: 0.8rem;
}

.invoice-padding-x {
    /* this make sure that the invoiceRow invoice footer text is aligned  */
    padding-inline: 1rem;
}

.invoiceRow {
    padding-block: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
}

.invoiceRow:not(:first-child) {
    border-top: 1px solid var(--border-color);
}

.invoiceRow__title {
    grid-column: 1 / -1;
    font-size: 1.25rem;
    margin-bottom: .5rem; /* added to the gap */
    font-weight: bold;
}

.invoiceRow__text {
    grid-column: 1 / span 1;
}

.invoiceRow__price {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: right;
}

/* payment-options */
.payment-options-modal .modalHeading {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
}

.payment-options-modal .modalHeading__title {
    font-weight: bold;
}

.payment-options-modal .modalHeading__value {
    grid-row: 2 / span 1;
    font-size: 1.25rem;
}

.payment-options-modal .paymentFrequency {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .5rem;
}

/* helper class that stacks every child 1 on top of the other (when fadeIn / fadeInOut stuff) */
.payment-options-modal .stack {
    display: grid;
}
.payment-options-modal .stack>* {
    grid-column: 1/-1;
    grid-row: 1/-1;
}

.paymentOptionsTabs {
    /* we use text-color for a high contrast border */
    border-top: 1px solid var(--text-color);
    border-bottom: 1px solid var(--text-color);
    margin-block: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    text-align: center;
}

.paymentOptionsTabs .nav-link {
    color: inherit;
    transition: all .2s ease-in-out;
}

.paymentOptionsTabs .nav-link:is(:hover, :focus) {
    background-color: var(--bg-color2);
}

.paymentOptionsTabs .nav-link.active {
    background-color: var(--primary);
    color: white;
}

.paymentOptionsInvoice__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-block: .5rem;
}

.paymentOptionsInvoice__row:not(:first-child) {
    border-top: 1px solid var(--border-color);
}

.paymentOptionsInvoice__title {
    font-size: 1.25rem;
}

.paymentOptionsInvoice__price {
    font-size: 1.25rem;
    font-weight: bold;
}

.paymentOptionsInvoice__collapse {
    width: 100%;
}

.accessories__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.accessories__body {
    min-height: 115px;
}

.includeTransportation__title{
    font-size: 0.7rem;
}

.error-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(255, 230, 230, 0.95);
    z-index: 10000; /* A very high z-index to be on top */
}

.error-modal-content {
    position: fixed;
    top: calc(50% + 50px);
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    width: 80%;
    max-width: 600px; /* or any other value that fits your design */
    background-color: #ffe5e5;
    border: 1px solid #ff9999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.error-close-button {
    position: absolute;
    right: 10px;
    top: 5px;
    cursor: pointer;
}

.includeTransportation__value {
    text-align: center;
    height: 18px;
    width: 18px;
}

.includeTransportation__title, .downPayment-input_lease {
    text-align: center;
    margin-bottom: 0 !important;
}
.lc_label_cont>.form-label {
    margin-bottom: 0 !important;
}

/* Lines */
.bl_line::before {
    content: "";
    height: 2px;
    border-bottom: var(--secondary) 2px solid;
    display: block;
    width: 125px;
    bottom: -10px;
    position: relative;
    margin: auto;
}
.bl_line::after {
    content: "";
    height: 2px;
    border-bottom: var(--secondary) 1px solid;
    display: block;
    width: 75px;
    bottom: -10px;
    position: relative;
    margin: auto;
    padding: 2px;
}

.bl_topLeft_title,
.bl_topLeft_carousel,
.bl_top_price,
.bl_back_btn
{
    position: sticky;
}
.bl_back_btn {
    top: 19%;
    z-index: 5;
    font-weight: bold;
    padding-left: 1rem;
}

.bl_topLeft_title {
    top: 23%;
}

.bl_topLeft_carousel {
    top: 47%;
    margin-top: 1rem;
}

.bl_top_price {
    top: 12%;
    background: white;
    height: 130px;
    z-index: 4;
    padding: 1.5rem 1rem;
    border: 1px solid rgb(230, 230, 230);
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.bl_price_stickyoff {
    margin-bottom: 0;
}


.bl_accessory_price_primary {
    color: var(--primary);
}

.bl_accessory_price_white {
    color: white;
}

.checked_bg_color {
    background-color: #4a606d;
    color: #fff;
}

.bl_acc_mini_img {
    border-radius: 5px;
    border: 1px solid rgb(219, 219, 219);
}

.acc_custom_checkbox {
    cursor: pointer;
    margin-bottom: 0;
}

.acc_checkbox_hide {
    /* display: none !important; */
}

/* TOP BUILDER PRICE Animation */

.hidden_top_builder_price {
    transform: translateY(-125%);
    transition: all 550ms cubic-bezier(0.67, 0.04, 0.36, 0.99);
}

.show_top_builder_price {
    /* z-index: 1035; */
    transform: translateY(0);
    transition: all 250ms cubic-bezier(0, 0, 0, 1);
}

.options-view {
    margin-bottom: 103px;
}

/* ====== TRIMSLIST ======= */
.trimslist__container {
    padding: 15px;
}

.trimslist__list {
    display: flex;
    justify-content: center;
    /* width: fit-content; */
    max-width: 100vw;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    overflow: auto;
}

.trimslist__item a{
    height: 100%;
}

.trimslist__item {
    display: block;
    --model-item-gutter: 0.25rem;
    padding-left: var(--model-item-gutter);
    padding-right: var(--model-item-gutter);

    --model-item-width: 28%; /* make sure that theres a part of the 4th car to show the user that we can scroll mobile */
    flex: 0 0 var(--model-item-width);
    max-width: 150px;
}

.trimslist__item:first-child {
    margin-left: 0.75rem;
}

.trimslist__item:last-child {
    margin-right: 0.75rem;
}

/* ================================== */

@media screen and (max-width: 360px) {
    .accessories__content {
        max-width: 200px;
    }
}

@media screen and (max-width: 576px) {
    .accessories__content {
        max-width: 250px;
    }
}
@media screen and (min-width: 990px) {
    .accessories__content {
        max-width: 160px;
    }
}
@media screen and (min-width: 1200px) {
    .accessories__content {
        max-width: 210px;
    }
}

@media screen and (max-width: 1200px) {
    .bl_btn_acc_summ {
        top: -34px;
        max-width: 58px;
        margin-left: 147px;
    }
}

@media screen and (max-width: 1050px) {
    .bl_topLeft_title {
        position: relative;
        top: 0;
    }
}
@media screen and (max-width: 991px) {
    .bl_btn_acc_summ {
        top: -31px;
        max-width: 192px;
        font-size: 16px;
        margin-left: 381px;
        border-radius: 15px;
    }
    .financeFooter  {
        z-index: 5;
    }
    .financeFooter__img {
        margin-top: calc(-1.6 * var(--img-overflow-value));
    }
    .bl_footer_acc_top {
        top: 28px;
    }
    .financeFooter__toggle {
        top: calc(-1.2 * var(--icon-height));
    }
    .bl_top_price {
        text-align: center;
        height: 90px;
    }
    .bl_top_price_price {
        font-size: 1.5rem;
    }


}

@media screen and (max-width: 912px) {
    .bl_back_btn {
        top: 10%;
    }
    .bl_topLeft_title {
        top: 0;
    }
    .bl_top_price {
        top: 8%;
    }

    /* TOP BUILDER PRICE Animation */
    .hidden_top_builder_price {
        transform: translateY(-115%);
        transition: all 350ms cubic-bezier(0.67, 0.04, 0.36, 0.99);
    }

    .show_top_builder_price {
        transform: translateY(0);
        transition: all 150ms cubic-bezier(0, 0, 0, 1);
    }

    .hidden_top_builder_price_med {
        transform: translateY(-125%);
        transition: all 350ms cubic-bezier(0.67, 0.04, 0.36, 0.99);
    }

    .hidden_top_builder_price_big {
        transform: translateY(-145%);
        transition: all 350ms cubic-bezier(0.67, 0.04, 0.36, 0.99);
    }

}
@media screen and (max-width: 820px) {
    .bl_back_btn {
        top: 11%;
    }
    .bl_top_price {
        top: 9%;
    }
}
@media screen and (max-width: 768px) {
    .bl_btn_acc_summ {
        top: -28px;
        max-width: 143px;
        font-size: 12px;
        margin-left: 269px;
        border-radius: 15px;
    }
    .trimslist__container {
        padding: 15px 0px;
    }
    .trimslist__link img {
        padding: 3px;
    }
    .trimslist__item a {
        padding-bottom: 5px;
    }

    .trimslist__name {
        font-size: 0.7rem;
    }

    /* TOP BUILDER PRICE Animation */
    .hidden_top_builder_price {
        transform: translateY(-85%);
        transition: all 450ms cubic-bezier(0.67, 0.04, 0.36, 0.99);
    }
    .hidden_top_builder_price_med {
        transform: translateY(-125%);
        transition: all 450ms cubic-bezier(0.67, 0.04, 0.36, 0.99);
    }
    .hidden_top_builder_price_big {
        transform: translateY(-155%);
        transition: all 450ms cubic-bezier(0.67, 0.04, 0.36, 0.99);
    }

    .show_top_builder_price {
        transform: translateY(0);
        transition: all 250ms cubic-bezier(0, 0, 0, 1);
    }
}
@media screen and (max-width: 540px) {
    .bl_back_btn {
        top: 18%;
    }
    .bl_top_price {
        top: 16%;
    }

    .bl_btn_acc_summ {
        top: -26px;
        padding: 3px 3px;
        max-width: 112px;
        font-size: 10px;
        margin-left: 241px;
    }
    .bl_title_trim_year {
        font-size: 2rem;
    }
}
@media screen and (max-width: 414px) {
    .bl_back_btn {
        position: relative;
    }
    .bl_top_price {
        top: 13%;
    }

    .bl_btn_acc_summ {
        margin-left: 189px;
    }
}
@media screen and (max-width: 390px) {

    .bl_btn_acc_summ {
        border-radius: 7px;
        top: -34px;
        padding: 3px 3px;
        max-width: 65px;
        font-size: 10px;
        margin-left: 194px;

    }
}

@media screen and (max-width: 380px) {
    .bl_top_price {
        top: 20%;
    }
    .bl_btn_acc_summ {
        margin-left: 185px;
    }
}

@media screen and (max-width: 360px) {

    .bl_btn_acc_summ {
        margin-left: 172px;
    }

}
@media screen and (max-width: 280px) {

    .bl_btn_acc_summ {
        border-radius: 15px;
        top: -34px;
        padding: 5px 5px;
        max-width: 52px;
        font-size: 8px;
        margin-left: 117px;
    }

    .trimslist__name {
        font-size: 0.6rem;
    }

    .bl_title_trim_year {
        font-size: 1.5rem;
    }

}
