/* =====================================================
   FREEVEXA — EMI CALCULATOR
   PREMIUM DARK GLASS UI
===================================================== */


/* =====================================================
   PAGE
===================================================== */

.emi-page {
    min-height: 100vh;
    padding: 150px 20px 90px;
    position: relative;
}


/* =====================================================
   HERO
===================================================== */

.emi-hero {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 48px;
    text-align: center;
}

.emi-hero .tool-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: auto;
    max-width: max-content;

    padding: 8px 15px;

    border: 1px solid rgba(0, 240, 255, .20);
    border-radius: 999px;

    background:
        rgba(0, 240, 255, .055);

    color: #00f0ff;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.5px;

    box-shadow:
        0 0 25px rgba(0, 240, 255, .025);
}

.emi-hero .tool-badge span {
    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: #00f0ff;

    box-shadow:
        0 0 10px rgba(0, 240, 255, .8);
}


/* =====================================================
   TITLE
===================================================== */

.emi-hero h1 {
    margin: 20px 0 14px;

    font-family:
        "Space Grotesk",
        system-ui,
        sans-serif;

    font-size:
        clamp(42px, 6vw, 68px);

    line-height: 1.05;

    font-weight: 700;

    letter-spacing: -2.5px;

    color: #f4f7fb;
}

.emi-hero h1 span {
    color: #00f0ff;

    text-shadow:
        0 0 25px rgba(0, 240, 255, .15);
}


/* =====================================================
   HERO DESCRIPTION
===================================================== */

.emi-hero p {
    max-width: 650px;

    margin: 0 auto;

    color: #9299a8;

    font-family:
        "DM Sans",
        system-ui,
        sans-serif;

    font-size: 16px;

    line-height: 1.7;
}


/* =====================================================
   MAIN WRAPPER
===================================================== */

.emi-wrapper {
    width: 100%;
    max-width: 1050px;

    margin: 0 auto;
}


/* =====================================================
   CALCULATOR CARD
===================================================== */

.emi-card {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, .075);

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(15, 23, 42, .82),
            rgba(8, 15, 28, .76)
        );

    backdrop-filter:
        blur(22px);

    -webkit-backdrop-filter:
        blur(22px);

    box-shadow:
        0 30px 90px rgba(0, 0, 0, .38);

    position: relative;
}


/* subtle glow */

.emi-card::before {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    top: -180px;
    right: -100px;

    border-radius: 50%;

    background:
        rgba(0, 240, 255, .045);

    filter: blur(70px);

    pointer-events: none;
}


/* =====================================================
   INPUT PANEL
===================================================== */

.emi-input-panel {
    padding: 42px;

    border-right:
        1px solid rgba(255, 255, 255, .065);

    position: relative;
    z-index: 1;
}


/* =====================================================
   PANEL TITLE
===================================================== */

.panel-title {
    margin-bottom: 30px;
}

.panel-title span {
    display: block;

    margin: 0;

    font-family:
        "Space Grotesk",
        sans-serif;

    color: #edf1f7;

    font-size: 22px;

    font-weight: 700;
}

.panel-title small {
    display: block;

    margin-top: 7px;

    color: #737d8f;

    font-size: 13px;

    line-height: 1.5;
}


/* =====================================================
   INPUT GROUP
===================================================== */

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;

    margin-bottom: 9px;

    color: #cbd1db;

    font-size: 13px;

    font-weight: 700;
}

.input-group label span {
    color: #70798a;

    font-weight: 400;
}


/* =====================================================
   INPUT BOXES
===================================================== */

.input-with-prefix,
.input-with-suffix {
    display: flex;

    align-items: center;

    width: 100%;
    height: 55px;

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, .085);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, .035);

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.input-with-prefix:hover,
.input-with-suffix:hover {
    border-color:
        rgba(255, 255, 255, .13);
}

.input-with-prefix:focus-within,
.input-with-suffix:focus-within,
.tenure-row:focus-within {

    border-color:
        rgba(0, 240, 255, .45);

    background:
        rgba(0, 240, 255, .025);

    box-shadow:
        0 0 0 3px rgba(0, 240, 255, .055);
}


/* =====================================================
   PREFIX / SUFFIX
===================================================== */

.input-with-prefix > span,
.input-with-suffix > span {

    display: flex;

    align-items: center;

    justify-content: center;

    height: 100%;

    padding: 0 17px;

    color: #00f0ff;

    font-size: 16px;

    font-weight: 800;
}

.input-with-suffix > span {
    color: #858e9e;
}


/* =====================================================
   INPUT
===================================================== */

.input-with-prefix input,
.input-with-suffix input {

    width: 100%;
    height: 100%;

    padding: 0 15px;

    border: 0;
    outline: 0;

    background: transparent;

    color: #f2f5f9;

    font-family:
        "DM Sans",
        system-ui,
        sans-serif;

    font-size: 16px;

    font-weight: 600;
}

.input-with-prefix input {
    padding-left: 0;
}

.input-with-suffix input {
    padding-left: 17px;
}

.input-with-prefix input::placeholder,
.input-with-suffix input::placeholder {
    color: #555e6d;
}


/* Remove number arrows */

.input-with-prefix input::-webkit-inner-spin-button,
.input-with-prefix input::-webkit-outer-spin-button,
.input-with-suffix input::-webkit-inner-spin-button,
.input-with-suffix input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-with-prefix input[type="number"],
.input-with-suffix input[type="number"] {
    appearance: textfield;
}


/* =====================================================
   TENURE
===================================================== */

.tenure-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        125px;

    width: 100%;
    height: 55px;

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, .085);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, .035);

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.tenure-row input {

    width: 100%;
    height: 100%;

    padding: 0 17px;

    border: 0;
    outline: 0;

    background: transparent;

    color: #f2f5f9;

    font-size: 16px;

    font-weight: 600;
}

.tenure-row select {

    width: 100%;
    height: 100%;

    padding: 0 14px;

    border: 0;

    border-left:
        1px solid rgba(255, 255, 255, .075);

    outline: 0;

    background:
        #111827;

    color: #cbd1dc;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;
}

.tenure-row select option {
    background: #111827;
    color: #fff;
}


/* =====================================================
   CALCULATE BUTTON
===================================================== */

.calculate-btn {

    width: 100%;
    height: 55px;

    margin-top: 8px;

    border: 0;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #00f0ff,
            #00b8ff
        );

    color: #031014;

    font-family:
        "DM Sans",
        sans-serif;

    font-size: 15px;

    font-weight: 800;

    cursor: pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        filter .2s ease;
}

.calculate-btn:hover {

    transform:
        translateY(-2px);

    filter:
        brightness(1.05);

    box-shadow:
        0 14px 35px
        rgba(0, 240, 255, .20);
}

.calculate-btn:active {
    transform:
        translateY(0);
}

.calculate-btn span {
    margin-left: 7px;

    font-size: 17px;
}


/* =====================================================
   RESET BUTTON
===================================================== */

.reset-btn {

    display: block;

    width: 100%;

    margin-top: 13px;

    padding: 9px;

    border: 0;

    background: transparent;

    color: #737c8c;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition:
        color .2s ease;
}

.reset-btn:hover {
    color: #00f0ff;
}


/* =====================================================
   RESULT PANEL
===================================================== */

.emi-result-panel {

    min-width: 0;

    padding: 42px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    position: relative;

    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(0, 240, 255, .075),
            transparent 42%
        );
}


/* =====================================================
   RESULT LABEL
===================================================== */

.result-label {

    color: #737d8e;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 2px;

    text-transform: uppercase;
}


/* =====================================================
   EMI VALUE
===================================================== */

.emi-value {

    margin-top: 8px;

    color: #00f0ff;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size:
        clamp(38px, 5vw, 54px);

    font-weight: 700;

    line-height: 1.1;

    letter-spacing: -2px;

    word-break: break-word;

    text-shadow:
        0 0 25px rgba(0, 240, 255, .08);
}


/* =====================================================
   SUBTEXT
===================================================== */

.result-subtext {

    margin-top: 5px;

    color: #6e7889;

    font-size: 12px;
}


/* =====================================================
   DIVIDER
===================================================== */

.result-divider {

    width: 100%;
    height: 1px;

    margin: 27px 0 17px;

    background:
        rgba(255, 255, 255, .07);
}


/* =====================================================
   RESULT ROWS
===================================================== */

.result-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 11px 0;

    color: #838d9d;

    font-size: 13px;
}

.result-row strong {

    color: #e5e9ef;

    font-size: 14px;

    font-weight: 700;

    white-space: nowrap;
}


/* =====================================================
   TOTAL PAYMENT
===================================================== */

.total-row {

    margin-top: 5px;

    padding-top: 17px;

    border-top:
        1px dashed rgba(255, 255, 255, .085);
}

.total-row span {
    color: #c5cad3;
}

.total-row strong {
    color: #00f0ff;

    font-size: 15px;
}


/* =====================================================
   PAYMENT BREAKDOWN
===================================================== */

.payment-breakdown {

    margin-top: 27px;
}

.breakdown-title {

    margin-bottom: 11px;

    color: #c8ced8;

    font-size: 12px;

    font-weight: 700;
}


/* =====================================================
   BREAKDOWN BAR
===================================================== */

.breakdown-bar {

    display: flex;

    width: 100%;
    height: 9px;

    overflow: hidden;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, .05);
}

.principal-bar {

    width: 70%;

    background: #00f0ff;

    transition:
        width .4s ease;
}

.interest-bar {

    width: 30%;

    background: #7000ff;

    transition:
        width .4s ease;
}


/* =====================================================
   LEGEND
===================================================== */

.breakdown-legend {

    display: flex;

    align-items: center;

    gap: 23px;

    margin-top: 11px;

    color: #777f90;

    font-size: 11px;
}

.breakdown-legend span {

    display: flex;

    align-items: center;

    gap: 7px;
}

.breakdown-legend i {

    display: inline-block;

    width: 7px;
    height: 7px;

    border-radius: 50%;
}

.principal-dot {
    background: #00f0ff;

    box-shadow:
        0 0 8px rgba(0, 240, 255, .4);
}

.interest-dot {
    background: #7000ff;

    box-shadow:
        0 0 8px rgba(112, 0, 255, .4);
}


/* =====================================================
   INFO CARDS
===================================================== */

.emi-info {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

    margin-top: 20px;
}

.emi-info > div {

    padding: 22px;

    border:
        1px solid rgba(255, 255, 255, .055);

    border-radius: 16px;

    background:
        rgba(255, 255, 255, .022);

    transition:
        border-color .2s ease,
        transform .2s ease;
}

.emi-info > div:hover {

    border-color:
        rgba(0, 240, 255, .14);

    transform:
        translateY(-2px);
}

.emi-info strong {

    display: block;

    color: #dce1e9;

    font-size: 13px;

    font-weight: 700;
}

.emi-info p {

    margin: 8px 0 0;

    color: #737c8d;

    font-size: 12px;

    line-height: 1.7;
}


/* =====================================================
   LIGHT MODE
===================================================== */

body.light-mode .emi-hero h1 {
    color: #151922;
}

body.light-mode .emi-hero p {
    color: #697180;
}

body.light-mode .emi-card {

    background:
        rgba(255, 255, 255, .82);

    border-color:
        rgba(0, 0, 0, .08);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, .10);
}

body.light-mode .emi-input-panel {

    border-right-color:
        rgba(0, 0, 0, .08);
}

body.light-mode .emi-result-panel {

    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(0, 180, 255, .08),
            transparent 42%
        );
}

body.light-mode .panel-title span,
body.light-mode .result-row strong,
body.light-mode .emi-info strong {
    color: #151922;
}

body.light-mode .panel-title small,
body.light-mode .result-subtext {
    color: #747c89;
}

body.light-mode .input-group label {
    color: #343a46;
}

body.light-mode .input-with-prefix,
body.light-mode .input-with-suffix,
body.light-mode .tenure-row {

    background:
        rgba(0, 0, 0, .025);

    border-color:
        rgba(0, 0, 0, .10);
}

body.light-mode
.input-with-prefix input,
body.light-mode
.input-with-suffix input,
body.light-mode
.tenure-row input {

    color: #171b24;
}

body.light-mode .tenure-row select {

    background:
        #f2f4f7;

    color: #303642;

    border-left-color:
        rgba(0, 0, 0, .08);
}

body.light-mode .emi-info > div {

    background:
        rgba(0, 0, 0, .025);

    border-color:
        rgba(0, 0, 0, .07);
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 850px) {

    .emi-page {
        padding:
            135px 18px 70px;
    }

    .emi-card {
        grid-template-columns: 1fr;
    }

    .emi-input-panel {

        border-right: 0;

        border-bottom:
            1px solid rgba(255, 255, 255, .07);
    }

    body.light-mode .emi-input-panel {

        border-right: 0;

        border-bottom:
            1px solid rgba(0, 0, 0, .08);
    }

    .emi-result-panel {
        min-height: 430px;
    }
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 560px) {

    .emi-page {
        padding:
            120px 14px 60px;
    }

    .emi-hero {
        margin-bottom: 32px;
    }

    .emi-hero h1 {

        margin-top: 17px;

        font-size: 42px;

        letter-spacing: -1.5px;
    }

    .emi-hero p {

        font-size: 14px;

        line-height: 1.6;
    }

    .emi-input-panel,
    .emi-result-panel {

        padding:
            27px 20px;
    }

    .panel-title {
        margin-bottom: 25px;
    }

    .panel-title span {
        font-size: 20px;
    }

    .tenure-row {

        grid-template-columns:
            minmax(0, 1fr)
            105px;
    }

    .emi-result-panel {
        min-height: auto;
    }

    .emi-value {
        font-size: 40px;
    }

    .emi-info {
        grid-template-columns: 1fr;
    }

    .breakdown-legend {
        gap: 15px;
    }
}


/* =====================================================
   VERY SMALL DEVICES
===================================================== */

@media (max-width: 380px) {

    .emi-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .emi-input-panel,
    .emi-result-panel {
        padding: 23px 16px;
    }

    .emi-hero h1 {
        font-size: 36px;
    }

    .tenure-row {
        grid-template-columns:
            1fr 95px;
    }

    .emi-value {
        font-size: 35px;
    }
}
