/*** New financing calculator (modal #modalFinancing) ******************************************************************/
/*   Independent from financing_simulator.css: every class is prefixed with fcalc_                                     */

.fcalc_modal .modal-dialog{
    max-width: 440px;
}

.fcalc_modal .fcalc_content{
    border: none;
    border-radius: 12px;
    overflow: hidden;
    color: var(--black-text);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

/** Opener button (product details) **********************************************************************************/

.financing_btn{
    background-color: #fff;
    transition: border-color .2s ease-in-out, background-color .2s ease-in-out;
}

.financing_btn span{
    transition: color .2s ease-in-out;
}

/* Bootstrap's .border uses !important, so the hover color needs it too */
.financing_btn:hover{
    border-color: var(--main-red) !important;
    background-color: var(--grey-95);
}

.financing_btn:hover span{
    color: var(--main-red);
}

/** Header ***********************************************************************************************************/

.fcalc_header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--grey-93);
}

.fcalc_header_info{
    display: flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
}

.fcalc_header_icon{
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background-color: var(--grey-95);
    border: 1px solid var(--grey-93);
}

.fcalc_header_icon img{
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.fcalc_eyebrow{
    margin: 0;
    font-size: .7rem;
    font-weight: bold;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--main-red);
}

.fcalc_title{
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fcalc_header_actions{
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 0 0 auto;
}

.fcalc_price_pill{
    padding: .25rem .7rem;
    border-radius: 50px;
    background-color: var(--black-text);
    color: var(--white-text);
    font-size: .8rem;
    font-weight: bold;
    white-space: nowrap;
}

/* layout.css turns every .modal .btn-close into a fixed white circle (gallery style); restore it inside our header */
.fcalc_modal .btn-close{
    position: static;
    width: 1em;
    height: 1em;
    margin: 0;
    padding: .25em;
    border-radius: .375rem;
    background-color: transparent;
    opacity: .5;
}

.fcalc_modal .btn-close:hover{
    opacity: 1;
}

/** Tabs *************************************************************************************************************/

.fcalc_tabs{
    display: flex;
    gap: .25rem;
    margin: .85rem 1.1rem 0 1.1rem;
    padding: .25rem;
    border-radius: 50px;
    background-color: var(--grey-95);
    border: 1px solid var(--grey-93);
    width: fit-content;
}

.fcalc_tabs .fcalc_tab{
    border: none;
    border-radius: 50px;
    padding: .3rem 1.1rem;
    background-color: transparent;
    color: var(--grey-80);
    font-size: .8rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: all .2s ease-in-out;
}

.fcalc_tabs .fcalc_tab:hover{
    color: var(--black-text);
}

.fcalc_tabs .fcalc_tab.active{
    background-color: var(--main-red);
    color: #fff;
    box-shadow: 0 3px 8px rgba(238, 46, 36, .3);
}

/** Body *************************************************************************************************************/

.fcalc_body{
    padding: 1rem 1.1rem 1.1rem 1.1rem;
}

.fcalc_pane{
    display: none;
}

.fcalc_pane.active{
    display: block;
    animation: fcalcFadeIn .25s ease-in-out;
}

@keyframes fcalcFadeIn{
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fcalc_summary{
    margin-top: 1rem;
}

/** Fields ***********************************************************************************************************/

.fcalc_field + .fcalc_field{
    margin-top: 1rem;
}

.fcalc_field_header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .6rem;
}

.fcalc_label{
    margin: 0 0 .5rem 0;
    font-size: .75rem;
    font-weight: bold;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--grey-80);
}

.fcalc_field_header .fcalc_label{
    margin: 0;
}

.fcalc_money_input{
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    border: 1px solid var(--grey-85);
    border-radius: 8px;
    background-color: #fff;
    transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out;
}

.fcalc_money_input:focus-within{
    border-color: var(--main-red);
    box-shadow: 0 0 0 3px rgba(238, 46, 36, .15);
}

.fcalc_money_input input{
    width: 90px;
    border: none;
    outline: none;
    text-align: right;
    font-size: 1rem;
    font-weight: bold;
    color: var(--black-text);
    background: transparent;
    -moz-appearance: textfield;
}

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

.fcalc_money_input span{
    font-weight: bold;
    color: var(--grey-80);
}

/** Range slider *****************************************************************************************************/

.fcalc_range{
    --fcalc-fill: 0%;
    display: block;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(to right, var(--main-red) 0%, var(--main-red) var(--fcalc-fill), var(--grey-90) var(--fcalc-fill), var(--grey-90) 100%);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.fcalc_range::-webkit-slider-thumb{
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    border: 5px solid var(--main-red);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    transition: transform .15s ease-in-out;
}

.fcalc_range::-webkit-slider-thumb:hover{
    transform: scale(1.12);
}

.fcalc_range::-moz-range-thumb{
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    border: 5px solid var(--main-red);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.fcalc_range_limits{
    display: flex;
    justify-content: space-between;
    margin-top: .35rem;
    font-size: .75rem;
    color: var(--grey-80);
}

/** Months ***********************************************************************************************************/

.fcalc_months{
    display: flex;
    flex-wrap: nowrap;
    gap: .35rem;
}

.fcalc_months .fcalc_month{
    flex: 1 1 0;
    min-width: 0;
    padding: .45rem .15rem;
    border: 1px solid var(--grey-85);
    border-radius: 8px;
    background-color: #fff;
    color: var(--black-text);
    font-size: .95rem;
    font-weight: bold;
    transition: all .2s ease-in-out;
}

.fcalc_months .fcalc_month:hover{
    border-color: var(--main-red);
    color: var(--main-red);
}

.fcalc_months .fcalc_month.active{
    background-color: var(--main-red);
    border-color: var(--main-red);
    color: #fff;
    box-shadow: 0 3px 8px rgba(238, 46, 36, .3);
}

/** Result ***********************************************************************************************************/

.fcalc_result{
    padding: .9rem 1.1rem;
    border-radius: 12px;
    background-color: var(--black-text);
    color: var(--white-text);
}

.fcalc_result_label{
    margin: 0;
    font-size: .7rem;
    font-weight: bold;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--grey-80);
}

.fcalc_result_quote{
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .3rem;
    margin: .1rem 0 .7rem 0;
}

.fcalc_quote{
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.1;
    color: #fff;
}

.fcalc_quote_units{
    font-size: .95rem;
    font-weight: bold;
    color: var(--main-red);
}

/* Breakdown as a 2x2 grid to keep the card short */
.fcalc_breakdown{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem 1rem;
    list-style: none;
    margin: 0;
    padding: .7rem 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.fcalc_breakdown li{
    display: flex;
    flex-direction: column;
    gap: .05rem;
    min-width: 0;
}

.fcalc_breakdown li > span:first-child{
    font-size: .68rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--grey-80);
}

.fcalc_breakdown li > span:last-child,
.fcalc_breakdown li > span:last-child span{
    font-size: .95rem;
    font-weight: bold;
    color: #fff;
}

.fcalc_disclaimer{
    margin: .6rem 0 0 0;
    font-size: .7rem;
    font-style: italic;
    color: var(--grey-80);
}

/** Call to action ***************************************************************************************************/

.fcalc_modal .fcalc_cta{
    display: block;
    width: 100%;
    margin-top: .75rem;
    padding: .75rem 1rem;
    border: none;
    border-radius: 8px;
    background-color: var(--main-red);
    color: #fff;
    font-size: .95rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color .2s ease-in-out, transform .15s ease-in-out;
}

.fcalc_modal .fcalc_cta:hover{
    background-color: var(--corporate-red-3);
}

.fcalc_modal .fcalc_cta:active{
    transform: scale(.98);
}

/** YouEasyGo ********************************************************************************************************/

.fcalc_plan{
    padding: 1.25rem 1rem;
    border-radius: 12px;
    background-color: var(--black-text);
    color: var(--white-text);
    text-align: center;
}

/* Explicit color: a site-wide rule makes the text dark on the black card */
.fcalc_plan .fcalc_plan_title,
.fcalc_plan .fcalc_plan_title *{
    color: #fff;
}

.fcalc_plan_title{
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    font-weight: bold;
    line-height: 1.3;
}

.fcalc_plan .fcalc_disclaimer{
    font-size: .8rem;
}

.fcalc_plan_price{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
}

.fcalc_plan_from{
    font-size: .8rem;
    color: var(--grey-80);
    text-transform: uppercase;
}

.fcalc_plan_amount{
    font-size: 2.4rem;
    font-weight: bold;
    line-height: 1;
    color: #fff;
}

.fcalc_plan_per{
    font-size: .8rem;
    font-weight: bold;
    line-height: 1.1;
    text-align: left;
    text-transform: uppercase;
    color: var(--main-red);
}

.fcalc_plan_img{
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 8px;
}

/** Responsive *******************************************************************************************************/

@media (max-width: 575.98px){
    .fcalc_modal .modal-dialog{
        max-width: none;
    }

    .fcalc_header{
        padding: .75rem .9rem;
    }

    .fcalc_header_actions{
        gap: .5rem;
    }

    .fcalc_price_pill{
        padding: .2rem .55rem;
        font-size: .75rem;
    }

    .fcalc_tabs{
        margin: .75rem .9rem 0 .9rem;
    }

    .fcalc_body{
        padding: .85rem .9rem .9rem .9rem;
    }

    .fcalc_quote{
        font-size: 1.75rem;
    }
}
