/* =================================
   LOAN CALCULATOR
================================= */

.loan-page {
    padding: 70px 0 90px;

    min-height: calc(100vh - 78px);
}


/* =================================
   HEADER
================================= */

.loan-header {
    max-width: 760px;

    margin: 0 auto 45px;

    text-align: center;
}


.loan-icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 22px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #e7f7f3;

    border-radius: 20px;

    font-size: 32px;
}


.loan-header h1 {
    font-size: 42px;

    line-height: 1.2;

    margin-bottom: 15px;

    color: #172033;
}


.loan-header p {
    font-size: 17px;

    color: #697386;

    line-height: 1.7;
}


/* =================================
   CALCULATOR
================================= */

.loan-calculator {
    max-width: 1050px;

    margin: auto;

    display: grid;

    grid-template-columns: 1fr 1fr;

    background: #ffffff;

    border: 1px solid #e8ebf0;

    border-radius: 24px;

    overflow: hidden;

    box-shadow:
        0 15px 45px
        rgba(23, 32, 51, 0.08);
}


/* =================================
   FORM
================================= */

.loan-form {
    padding: 42px;
}


.form-title {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 32px;
}


.form-title-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7f7f3;
    border-radius: 12px;
    font-size: 20px;
}


.form-title h2 {
    font-size: 21px;

    color: #172033;

    margin-bottom: 2px;
}


.form-title p {
    font-size: 13px;

    color: #7a8494;
}


/* =================================
   FORM GROUP
================================= */

.form-group {
    margin-bottom: 23px;
}


.form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 700;

    color: #374151;
}


/* =================================
   SELECT
================================= */

.select-input,
.period-select {
    height: 53px;

    border: 1px solid #dfe4ea;

    border-radius: 10px;

    background: #ffffff;

    color: #172033;

    font-size: 14px;

    padding: 0 14px;

    outline: none;

    cursor: pointer;

    transition: 0.2s;
}


.select-input {
    width: 100%;
}


.select-input:focus,
.period-select:focus {
    border-color: #16a085;

    box-shadow:
        0 0 0 4px
        rgba(22, 160, 133, 0.1);
}


/* =================================
   INPUT GROUP
================================= */

.input-group {
    display: grid;
    grid-template-columns: 1fr 145px;
    gap: 10px;
}


/* =================================
   INPUT WRAPPER
================================= */

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}


.input-wrapper input {
    width: 100%;
    height: 53px;
    padding: 0 15px;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    background: #ffffff;
    color: #172033;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
}


.input-wrapper input:focus {
    border-color: #16a085;
    box-shadow:
        0 0 0 4px
        rgba(22, 160, 133, 0.1);
}


/* =================================
   CURRENCY PREFIX
================================= */

.input-prefix {
    position: absolute;
    left: 15px;
    z-index: 2;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    pointer-events: none;
}


.input-prefix + input {
    padding-left: 48px;
}


/* =================================
   PERCENT SUFFIX
================================= */

.input-suffix {
    position: absolute;

    right: 15px;

    font-size: 14px;

    font-weight: 600;

    color: #6b7280;

    pointer-events: none;
}


/* =================================
   REMOVE NUMBER ARROWS
================================= */

/* Chrome, Edge, Safari */

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {

    -webkit-appearance: none;

    margin: 0;

}


/* Firefox */

input[type="number"] {

    -moz-appearance: textfield;

    appearance: textfield;

}


/* =================================
   BUTTON
================================= */

.loan-button {
    width: 100%;

    height: 53px;

    margin-top: 5px;

    border: none;

    border-radius: 10px;

    background: #16a085;

    color: #ffffff;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}


.loan-button:hover {
    background: #12816c;

    transform: translateY(-1px);

    box-shadow:
        0 8px 20px
        rgba(22, 160, 133, 0.2);
}


.loan-button:active {
    transform: translateY(0);
}


/* =================================
   RESET
================================= */

.reset-button {
    width: 100%;

    height: 45px;

    margin-top: 10px;

    border: 1px solid #dfe4ea;

    border-radius: 10px;

    background: #ffffff;

    color: #5d6675;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}


.reset-button:hover {
    background: #f5f7fa;

    border-color: #cbd2da;
}


/* =================================
   RESULT
================================= */

.loan-result {
    padding: 42px;

    background: #172033;

    color: #ffffff;
}


/* =================================
   RESULT HEADER
================================= */

.result-header {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 30px;
}


.result-header > span {
    width: 45px;
    height: 45px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.08);

    border-radius: 12px;

    font-size: 20px;
}


.result-header h2 {
    font-size: 21px;

    margin-bottom: 2px;
}


.result-header p {
    font-size: 13px;

    color: #aeb7c7;
}


/* =================================
   MAIN PAYMENT
================================= */

.monthly-payment {
    padding: 22px;

    margin-bottom: 25px;

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 15px;
}


.monthly-payment span {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;

    color: #aeb7c7;
}


.monthly-payment strong {
    display: block;

    font-size: 30px;

    line-height: 1.2;

    color: #ffffff;
}


/* =================================
   RESULT DETAILS
================================= */

.result-details {
    border-top: 1px solid
        rgba(255, 255, 255, 0.1);

    border-bottom: 1px solid
        rgba(255, 255, 255, 0.1);
}


.result-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding: 16px 0;

    border-bottom: 1px solid
        rgba(255, 255, 255, 0.07);
}


.result-row:last-child {
    border-bottom: none;
}


.result-row span {
    font-size: 13px;

    color: #aeb7c7;
}


.result-row strong {
    font-size: 14px;

    color: #ffffff;

    text-align: right;
}


.result-row .interest-value {
    color: #f2c94c;
}


/* =================================
   NOTE
================================= */

.loan-note {
    display: flex;

    gap: 10px;

    margin-top: 25px;

    padding: 14px;

    background: rgba(255, 255, 255, 0.04);

    border-radius: 10px;
}


.loan-note span {
    font-size: 15px;
}


.loan-note p {
    font-size: 12px;

    line-height: 1.6;

    color: #9da7b8;
}


/* =================================
   TABLET
================================= */

@media (max-width: 850px) {

    .loan-calculator {
        grid-template-columns: 1fr;
    }

}


/* =================================
   MOBILE
================================= */

@media (max-width: 600px) {

    .loan-page {
        padding: 45px 0 60px;
    }


    .loan-header {
        margin-bottom: 30px;
    }


    .loan-header h1 {
        font-size: 32px;
    }


    .loan-header p {
        font-size: 15px;
    }


    .loan-form,
    .loan-result {
        padding: 28px 22px;
    }


    .input-group {
        grid-template-columns: 1fr;
    }


    .monthly-payment strong {
        font-size: 25px;
    }


    .result-row {
        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }


    .result-row strong {
        text-align: left;
    }

}