/* =========================================================
   LOAN CARD
========================================================= */

.loan-card{
    width:100%;
    max-width:460px;

    padding:20px;

    background:#fff;

    border:1px solid #eeeeee;
    border-radius:18px;

    box-shadow:
        0 8px 30px rgba(0,0,0,.05);
}

.card-title{
    display:flex;
    align-items:center;
    justify-content:center;

    margin-bottom:20px;
}

.card-title b{
    color:#202124;

    font-size:20px;
    line-height:1.4;

    font-weight:700;
}


/* =========================================================
   FORM LABEL
========================================================= */

.loan-card label{
    display:block;

    margin:14px 0 8px;

    color:#4b5563;

    font-size:16px;
    line-height:1.4;

    font-weight:600;
}

.loan-card label span{
    color:var(--primary);
}


/* =========================================================
   ASSET GRID
========================================================= */

.asset-grid{
    width:100%;

    display:grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap:9px;
}

.asset{
    height:52px;

    display:flex;
    align-items:center;

    gap:8px;

    padding:0 11px;

    background:#fff;
    color:#374151;

    border:1px solid #e2e3e5;
    border-radius:11px;

    cursor:pointer;

    transition:
        border-color .15s ease,
        background-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

.asset:hover{
    border-color:var(--primary);

    background:#fff;

    transform:translateY(-1px);
}

.asset.active{
    background:#fff5f8;

    border-color:var(--primary);

    box-shadow:
        0 0 0 2px
        rgba(216,27,96,.07);
}

.asset-icon{
    width:23px;
    height:23px;

    flex:0 0 23px;
}

.asset-icon svg{
    width:100%;
    height:100%;

    fill:none;

    stroke:currentColor;

    stroke-width:1.8;

    stroke-linecap:round;
    stroke-linejoin:round;
}

.asset-name{
    min-width:0;

    overflow:hidden;

    color:#374151;

    font-size:15px;
    line-height:1.25;

    font-weight:600;

    white-space:nowrap;

    text-overflow:ellipsis;
}

.asset.active .asset-name{
    color:var(--primary);

    font-weight:700;
}


/* =========================================================
   AMOUNT
========================================================= */

.amount{
    width:100%;

    display:flex;
    align-items:baseline;

    justify-content:flex-start;

    gap:8px;

    margin-bottom:14px;

    padding:2px 0;

    background:transparent;
}

.amount strong{
    color:#202124;

    font-size:40px;
    line-height:1.05;

    letter-spacing:-.9px;

    font-weight:750;
}

.amount span{
    margin:0;

    color:#202124;

    font-size:32px;
    line-height:1;

    font-weight:600;
}


/* =========================================================
   RANGE
========================================================= */

input[type="range"]{
    display:block;

    width:100%;
    height:5px;

    margin:0;
    padding:0;

    appearance:none;
    -webkit-appearance:none;

    border:0;
    outline:0;

    border-radius:999px;

    background:
        linear-gradient(
            to right,
            var(--primary)
            var(--range-progress,50%),

            #f3dbe4
            var(--range-progress,50%)
        );

    cursor:pointer;
}

input[type="range"]::-webkit-slider-runnable-track{
    width:100%;
    height:5px;

    border-radius:999px;

    background:transparent;
}

input[type="range"]::-webkit-slider-thumb{
    width:19px;
    height:19px;

    margin-top:-7px;

    appearance:none;
    -webkit-appearance:none;

    background:#fff;

    border:1.5px solid var(--primary);

    border-radius:50%;

    box-shadow:
        0 1px 5px rgba(0,0,0,.12);

    cursor:grab;
}

input[type="range"]::-webkit-slider-thumb:active{
    transform:scale(1.05);

    cursor:grabbing;
}

input[type="range"]::-moz-range-track{
    width:100%;
    height:5px;

    border-radius:999px;

    background:#f3dbe4;
}

input[type="range"]::-moz-range-progress{
    height:5px;

    border-radius:999px;

    background:var(--primary);
}

input[type="range"]::-moz-range-thumb{
    width:19px;
    height:19px;

    background:#fff;

    border:1.5px solid var(--primary);

    border-radius:50%;

    box-shadow:
        0 1px 5px rgba(0,0,0,.12);
}


/* =========================================================
   RANGE LABEL
========================================================= */

.range-label{
    display:flex;

    justify-content:space-between;

    width:100%;

    margin-top:8px;

    color:#6b7280;

    font-size:14px;
    line-height:1.4;

    font-weight:500;
}

.range-label span{
    white-space:nowrap;
}


/* =========================================================
   AMOUNT TOTAL
========================================================= */

.amount-total{
    width:100%;

    margin-top:16px;

    padding:11px 14px;

    background:#fafafa;

    border:1px solid #eeeeee;

    border-radius:11px;
}

.amount-total-item{
    display:flex;

    align-items:center;
    justify-content:space-between;

    gap:12px;

    width:100%;
    min-height:25px;
}

.amount-total-item + .amount-total-item{
    margin-top:7px;

    padding-top:7px;

    border-top:1px solid #e9e9e9;
}

.amount-total-item span{
    flex:1;
    min-width:0;

    color:#6b7280;

    font-size:14px;
    line-height:1.4;

    font-weight:600;
}

.amount-total-item strong{
    flex:0 0 auto;

    color:#374151;

    font-size:14px;
    line-height:1.4;

    font-weight:700;

    text-align:right;

    white-space:nowrap;
}


/* =========================================================
   TERM COMPONENT
========================================================= */

.term-component{
    width:100%;

    margin:18px 0 0;
    padding:0;

    font-family:inherit;

    color:#5f6368;

    box-sizing:border-box;
}

.term-component *,
.term-component *::before,
.term-component *::after{
    box-sizing:border-box;
}

.term-component .term-group{
    width:100%;

    margin:0;
    padding:0;
}

.term-component .term-label{
    display:none;
}

.term-component .term-track{
    position:relative;

    display:grid;

    grid-template-columns:
        repeat(
            var(--term-count,4),
            minmax(0,1fr)
        );

    align-items:start;

    width:100%;
    min-width:100%;

    margin:0;
    padding:0;
}

.term-component .term-track::before{
    content:"";

    position:absolute;

    z-index:1;

    top:6px;

    left:7px;
    right:7px;

    width:auto;

    height:2px;

    margin:0;
    padding:0;

    background:
        repeating-linear-gradient(
            to right,
            #d1d5db 0,
            #d1d5db 7px,
            transparent 7px,
            transparent 12px
        );

    pointer-events:none;
}

.term-component .term-option{
    position:relative;

    z-index:2;

    display:flex;

    flex-direction:column;

    align-items:center;
    justify-content:flex-start;

    width:100%;
    min-width:0;

    min-height:50px;

    margin:0;
    padding:0;

    border:0;
    outline:0;

    background:transparent;

    color:#6b7280;

    font-family:inherit;

    cursor:pointer;

    -webkit-tap-highlight-color:transparent;
}

.term-component .term-option:first-child{
    align-items:flex-start;
}

.term-component .term-option:not(:first-child):not(:last-child){
    align-items:center;
}

.term-component .term-option:last-child{
    align-items:flex-end;
}

.term-component .term-dot{
    position:relative;

    z-index:5;

    display:block;

    width:15px;
    height:15px;

    flex:0 0 15px;

    margin:0;

    border-radius:50%;

    background:#fff;

    border:2px solid #d81b60;

    box-shadow:
        0 0 0 1px
        rgba(216,27,96,.08);

    transition:
        background-color .15s ease,
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

.term-component .term-option:hover .term-dot{
    background:#fff5f8;

    border-color:#d81b60;

    box-shadow:
        0 0 0 2px
        rgba(216,27,96,.08);
}

.term-component .term-option.active .term-dot{
    width:17px;
    height:17px;

    flex:0 0 17px;

    margin-top:-1px;

    background:#fff;

    border:3px solid #d81b60;

    box-shadow:
        0 0 0 3px
        rgba(216,27,96,.12);

    transform:none;
}

.term-component .term-option.active .term-dot::after{
    content:"";

    position:absolute;

    top:50%;
    left:50%;

    width:6px;
    height:6px;

    border-radius:50%;

    background:#d81b60;

    transform:
        translate(-50%,-50%);
}

.term-component .term-line{
    display:none !important;
}

.term-component .term-text{
    position:relative;

    z-index:5;

    display:block;

    width:max-content;
    max-width:100%;

    margin:10px 0 0;
    padding:0;

    color:#5f6368;

    font-size:15px;
    line-height:1.4;

    font-weight:600;

    white-space:nowrap;

    text-align:center;

    transition:
        color .15s ease,
        font-weight .15s ease;
}

.term-component .term-option:first-child .term-text{
    text-align:left;
}

.term-component .term-option:last-child .term-text{
    text-align:right;
}

.term-component .term-option:hover .term-text{
    color:#d81b60;
}

.term-component .term-option.active .term-text{
    color:#d81b60;

    font-weight:700;
}

.term-component .term-option:focus-visible .term-dot{
    box-shadow:
        0 0 0 3px
        rgba(216,27,96,.16);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:700px){

    .loan-card{
        max-width:none;

        padding:18px;

        border-radius:16px;
    }

    .card-title{
        margin-bottom:18px;
    }

    .card-title b{
        font-size:20px;
    }

    .loan-card label{
        margin:14px 0 8px;

        font-size:16px;
    }

    .asset-grid{
        grid-template-columns:
            repeat(3,minmax(0,1fr));

        gap:8px;
    }

    .asset{
        height:52px;

        padding:0 8px;

        gap:6px;
    }

    .asset-icon{
        width:22px;
        height:22px;

        flex:0 0 22px;
    }

    .asset-name{
        font-size:14px;

        font-weight:600;
    }

    .amount{
        margin-bottom:14px;

        gap:8px;
    }

    .amount strong{
        font-size:41px;

        line-height:1.03;

        letter-spacing:-.9px;
    }

    .amount span{
        font-size:32px;
    }

    .range-label{
        margin-top:8px;

        font-size:14px;
    }

    .amount-total{
        margin-top:15px;

        padding:11px 12px;
    }

    .amount-total-item{
        min-height:25px;
    }

    .amount-total-item span,
    .amount-total-item strong{
        font-size:14px;
    }


    /* TERM */

    .term-component{
        margin-top:16px;
    }

    .term-component .term-text{
        margin-top:9px;

        font-size:15px;

        font-weight:600;
    }

    .term-component .term-dot{
        width:14px;
        height:14px;

        flex-basis:14px;
    }

    .term-component .term-option.active .term-dot{
        width:16px;
        height:16px;

        flex-basis:16px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width:520px){

    .loan-card{
        padding:16px;
    }

    .card-title{
        margin-bottom:17px;
    }

    .card-title b{
        font-size:19px;
    }

    .loan-card label{
        margin:13px 0 8px;

        font-size:15px;
    }

    .asset-grid{
        gap:7px;
    }

    .asset{
        height:51px;

        padding:0 7px;

        gap:5px;
    }

    .asset-icon{
        width:21px;
        height:21px;

        flex:0 0 21px;
    }

    .asset-name{
        font-size:14px;

        font-weight:600;
    }

    .amount{
        margin-bottom:13px;
    }

    .amount strong{
        font-size:39px;
    }

    .amount span{
        font-size:31px;
    }

    .range-label{
        font-size:14px;
    }

    .amount-total{
        padding:10px 11px;
    }

    .amount-total-item span,
    .amount-total-item strong{
        font-size:14px;
    }

    .term-component{
        margin-top:15px;
    }

    .term-component .term-text{
        font-size:14px;

        margin-top:9px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width:380px){

    .loan-card{
        padding:15px;
    }

    .card-title b{
        font-size:18px;
    }

    .loan-card label{
        font-size:15px;
    }

    .asset-grid{
        gap:6px;
    }

    .asset{
        height:50px;

        padding:0 6px;

        gap:4px;
    }

    .asset-icon{
        width:20px;
        height:20px;

        flex-basis:20px;
    }

    .asset-name{
        font-size:13px;
    }

    .amount strong{
        font-size:37px;
    }

    .amount span{
        font-size:29px;
    }

    .range-label{
        font-size:13px;
    }

    .amount-total-item span,
    .amount-total-item strong{
        font-size:13px;
    }

    .term-component{
        margin-top:14px;
    }

    .term-component .term-track::before{
        top:5px;

        left:6px;
        right:6px;
    }

    .term-component .term-dot{
        width:13px;
        height:13px;

        flex-basis:13px;
    }

    .term-component .term-option.active .term-dot{
        width:15px;
        height:15px;

        flex-basis:15px;
    }

    .term-component .term-option.active .term-dot::after{
        width:5px;
        height:5px;
    }

    .term-component .term-text{
        margin-top:8px;

        font-size:13px;

        font-weight:600;
    }
}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion:reduce){

    .asset,
    .term-component .term-dot,
    .term-component .term-text{
        transition:none;
    }
}