/* =========================================
   SAVINGS CALCULATOR
========================================= */

.savings-page {
    padding: 70px 0 90px;

    min-height: calc(100vh - 78px);
}


/* =========================================
   PAGE HEADER
========================================= */

.savings-header {
    max-width: 800px;

    margin: 0 auto 45px;

    text-align: center;
}


.savings-icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #e7f7f3;

    border-radius: 20px;

    font-size: 32px;
}


.savings-header h1 {
    margin: 18px 0 14px;

    color: #172033;

    font-size: 42px;

    line-height: 1.2;
}


.savings-header p {
    margin: 0;

    color: #697386;

    font-size: 17px;

    line-height: 1.7;
}


/* =========================================
   LANGUAGE
========================================= */

.language-selector {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    padding: 7px 10px 7px 13px;

    background: #ffffff;

    border: 1px solid #e1e6eb;

    border-radius: 10px;
}


.language-selector label {
    color: #697386;

    font-size: 13px;
}


.language-selector select {
    border: none;

    outline: none;

    background: transparent;

    color: #172033;

    font-size: 13px;

    cursor: pointer;
}


/* =========================================
   MAIN CALCULATOR
========================================= */

.savings-calculator {
    max-width: 1080px;

    margin: 0 auto;

    display: grid;

    grid-template-columns: 1fr 1fr;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e7eaf0;

    border-radius: 24px;

    box-shadow:
        0 18px 50px
        rgba(23, 32, 51, 0.08);
}


/* =========================================
   FORM
========================================= */

.savings-form {
    padding: 42px;
}


.form-title {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 30px;
}


.form-title-icon {
    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #e7f7f3;

    border-radius: 13px;

    font-size: 21px;
}


.form-title h2 {
    margin: 0 0 3px;

    color: #172033;

    font-size: 21px;
}


.form-title p {
    margin: 0;

    color: #7a8494;

    font-size: 13px;
}


/* =========================================
   FORM GROUP
========================================= */

.form-group {
    margin-bottom: 21px;
}


.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #374151;

    font-size: 14px;

    font-weight: 700;
}


/* =========================================
   SELECT
========================================= */

.select-input,
.period-select {
    height: 53px;

    padding: 0 14px;

    border: 1px solid #dfe4ea;

    border-radius: 10px;

    outline: none;

    background: #ffffff;

    color: #172033;

    font-size: 14px;

    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
========================================= */

.input-wrapper {
    position: relative;

    width: 100%;
}


.input-wrapper input {
    width: 100%;

    height: 53px;

    padding: 0 15px;

    box-sizing: border-box;

    border: 1px solid #dfe4ea;

    border-radius: 10px;

    outline: none;

    background: #ffffff;

    color: #172033;

    font-size: 15px;

    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;

    top: 50%;

    z-index: 2;

    transform: translateY(-50%);

    color: #6b7280;

    font-size: 14px;

    font-weight: 700;

    pointer-events: none;
}


.input-prefix + input {
    padding-left: 50px;
}


/* =========================================
   PERCENT SUFFIX
========================================= */

.input-suffix {
    position: absolute;

    right: 15px;

    top: 50%;

    transform: translateY(-50%);

    color: #6b7280;

    font-size: 14px;

    font-weight: 600;

    pointer-events: none;
}


/* =========================================
   REMOVE NUMBER ARROWS
========================================= */

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {

    -webkit-appearance: none;

    margin: 0;
}


input[type="number"] {

    -moz-appearance: textfield;

    appearance: textfield;
}


/* =========================================
   CALCULATE BUTTON
========================================= */

.calculate-button {
    width: 100%;

    height: 53px;

    margin-top: 4px;

    border: none;

    border-radius: 10px;

    background: #16a085;

    color: #ffffff;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}


.calculate-button:hover {
    background: #12816c;

    transform: translateY(-1px);

    box-shadow:
        0 8px 20px
        rgba(22, 160, 133, 0.2);
}


.calculate-button:active {
    transform: translateY(0);
}


/* =========================================
   RESET BUTTON
========================================= */

.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 PANEL
========================================= */

.savings-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: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.08);

    border-radius: 13px;

    font-size: 20px;
}


.result-header h2 {
    margin: 0 0 3px;

    font-size: 21px;
}


.result-header p {
    margin: 0;

    color: #aeb7c7;

    font-size: 13px;
}


/* =========================================
   FUTURE VALUE
========================================= */

.future-value {
    padding: 22px;

    margin-bottom: 25px;

    border: 1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 15px;

    background: rgba(255, 255, 255, 0.06);
}


.future-value span {
    display: block;

    margin-bottom: 8px;

    color: #aeb7c7;

    font-size: 13px;
}


.future-value strong {
    display: block;

    color: #ffffff;

    font-size: 30px;

    line-height: 1.25;

    word-break: break-word;
}


/* =========================================
   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;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid
        rgba(255, 255, 255, 0.07);
}


.result-row:last-child {
    border-bottom: none;
}


.result-row span {
    color: #aeb7c7;

    font-size: 13px;
}


.result-row strong {
    color: #ffffff;

    font-size: 14px;

    text-align: right;
}


.result-row .profit-value {
    color: #4fd1a9;
}


/* =========================================
   NOTE
========================================= */

.savings-note {
    display: flex;

    gap: 10px;

    margin-top: 25px;

    padding: 14px;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.04);
}


.savings-note span {
    font-size: 15px;
}


.savings-note p {
    margin: 0;

    color: #9da7b8;

    font-size: 12px;

    line-height: 1.6;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 850px) {

    .savings-calculator {
        grid-template-columns: 1fr;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .savings-page {
        padding: 45px 0 60px;
    }


    .savings-header h1 {
        font-size: 32px;
    }


    .savings-header p {
        font-size: 15px;
    }


    .savings-form,
    .savings-result {
        padding: 28px 22px;
    }


    .input-group {
        grid-template-columns: 1fr;
    }


    .future-value strong {
        font-size: 25px;
    }


    .result-row {
        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }


    .result-row strong {
        text-align: left;
    }

}