﻿/* =========================================================
   FD CALCULATOR - MAIN PAGE
   ========================================================= */

:root {
    --pnb-maroon: #800000;
    --pnb-maroon-dark: #5a0000;
    --pnb-yellow: #d4af37;
    --pnb-yellow-light: #f5c542;
    --pnb-white: #ffffff;
}


/* =========================================================
   FD PAGE
   ========================================================= */

.fd-page {
    border: 3px solid #800000;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
}


/* =========================================================
   LEFT PANEL
   ========================================================= */

.left-panel {
    flex: 1;
    background: url('/Assets/img/FD_Background_image.png') center center no-repeat;
    background-size: cover;
    border-radius: 25px 0 0 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   RIGHT PANEL
   ========================================================= */

.right-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    background: url('/Assets/img/RIGHT_BG_IMAGE.png') center center no-repeat;
    background-size: cover;
}


/* =========================================================
   DEPOSIT CALCULATOR PANEL
   ========================================================= */

.deposit-calculator-panel {
    border: 2px solid var(--pnb-maroon);
    border-radius: 16px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

    .deposit-calculator-panel:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }

    .deposit-calculator-panel h4 {
        color: var(--pnb-maroon);
        border-bottom: 2px solid var(--pnb-yellow);
        display: inline-block;
        padding-bottom: 5px;
    }


/* =========================================================
   RATE CARDS
   ========================================================= */

#dynamicRateCards > div {
    display: flex;
}

.rate-box {
    border: 2px solid #d4af37 !important;
    border-radius: 12px;
    padding: 15px;
    background: #fffdf5;
    min-width: 120px;
    min-height: 140px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
}

    .rate-box:hover {
        border-color: #f5c542 !important;
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    .rate-box strong {
        color: var(--pnb-maroon);
        font-size: 1.4rem;
        word-break: break-word;
    }

    .rate-box small {
        display: block;
    }

.selectable-rate {
    cursor: pointer;
    transition: all 0.25s ease;
}

    .selectable-rate:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    .selectable-rate.active-rate {
        border: 2px solid #800000 !important;
        background: #fff5f5;
        transform: scale(1.03);
    }


/* =========================================================
   PNB BADGE
   ========================================================= */

.pnb-badge {
    background-color: var(--pnb-yellow);
    color: var(--pnb-maroon);
    font-weight: 700;
    white-space: normal;
}


/* =========================================================
   CUSTOMER TYPE
   ========================================================= */

.customer-type {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #800000;
    border: 2px solid #800000;
    margin-top: 2px;
}

.form-check-label {
    font-size: 12px;
    font-weight: 600;
    color: #800000;
    margin-left: 2px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Hide normal customer checkbox if required */
#normalCustomer {
    /* Your HTML currently uses display:none on its parent */
}


/* =========================================================
   CHECKBOX RESET
   ========================================================= */

input[type="checkbox"].form-check-input {
    appearance: auto;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

input[type="checkbox"]::before,
input[type="checkbox"]::after {
    content: none !important;
    display: none !important;
}

input[type="checkbox"].form-check-input:checked {
    accent-color: #800000;
}


/* =========================================================
   RADIO RESET
   ========================================================= */

input[type="radio"] {
    appearance: auto !important;
    -webkit-appearance: radio !important;
    -moz-appearance: radio !important;
}

    input[type="radio"]::before,
    input[type="radio"]::after {
        content: none !important;
        display: none !important;
    }


/* =========================================================
   FORM CONTROLS
   ========================================================= */

.form-control:focus {
    border-color: var(--pnb-maroon);
    box-shadow: none;
}

.form-range::-webkit-slider-thumb {
    background: var(--pnb-maroon);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn-primary {
    background-color: var(--pnb-maroon);
    border-color: var(--pnb-maroon);
    color: var(--pnb-white);
}

    .btn-primary:hover {
        background-color: var(--pnb-yellow);
        color: var(--pnb-maroon);
    }

.btn-outline-primary {
    border-color: var(--pnb-maroon) !important;
    color: var(--pnb-maroon) !important;
}

    .btn-outline-primary:hover {
        background-color: var(--pnb-maroon) !important;
        color: var(--pnb-white) !important;
    }

.btn-open-fd {
    background-color: var(--pnb-maroon);
    color: var(--pnb-white);
    border: 2px solid var(--pnb-yellow);
    font-weight: bold;
    letter-spacing: 1px;
}

    .btn-open-fd:hover {
        background-color: var(--pnb-yellow);
        color: var(--pnb-maroon);
        border-color: var(--pnb-maroon);
    }


/* =========================================================
   PREMIUM ACTION BUTTONS
   ========================================================= */

.fd-action-buttons {
    display: flex;
    gap: 14px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.premium-action-btn {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #2b1d00;
    background: linear-gradient(to bottom, #FFE87C, #F5C41F);
    transition: all 0.18s ease;
    box-shadow: 0 12px 20px rgba(242, 183, 5, 0.45), 0 6px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

    .premium-action-btn:hover {
        background: linear-gradient(to bottom, #FFF4A6, #FBD633);
        color: #2b1d00;
        transform: translateY(-2px);
        box-shadow: 0 14px 24px rgba(255, 232, 124, 0.5), 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .premium-action-btn:active {
        transform: scale(0.96);
        background: linear-gradient(to bottom, #FFE87C, #E5A400);
        box-shadow: 0 3px 6px rgba(242, 183, 5, 0.25);
    }

.resume-btn {
    background: linear-gradient(to bottom, #fff7d1, #f0d56b);
}


/* =========================================================
   ARROW
   ========================================================= */

.arrow-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.premium-action-btn:hover .arrow-icon {
    transform: translateX(4px);
}


/* =========================================================
   MATURITY DETAILS
   ========================================================= */

.maturity-details-panel {
    border: 2px solid var(--pnb-yellow);
    border-radius: 12px;
    padding: 20px;
    background-color: #fffaf0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: sticky;
    top: 20px;
}

    .maturity-details-panel:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }

    .maturity-details-panel h4,
    .maturity-details-panel h5 {
        color: var(--pnb-maroon);
        border-bottom: 2px solid var(--pnb-yellow);
    }

.maturity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
}

.maturity-box {
    background-color: var(--pnb-maroon);
    color: var(--pnb-white);
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0;
    box-sizing: border-box;
}

    .maturity-box:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    }

    .maturity-box .label {
        font-size: 13px;
        opacity: 0.85;
        margin-bottom: 6px;
    }

        .maturity-box .label i {
            margin-right: 6px;
            color: #2b6cb0;
            font-size: 14px;
        }

    .maturity-box .value {
        font-size: 20px;
        font-weight: bold;
    }

#maturityAmount {
    font-size: 22px;
    color: var(--pnb-yellow);
}


/* =========================================================
   ALERT
   ========================================================= */

#alertMessage {
    background-color: var(--pnb-yellow-light);
    color: var(--pnb-maroon);
    border: 1px solid var(--pnb-yellow);
}


/* =========================================================
   OPEN NOW BUTTON
   ========================================================= */

.btn-open-now {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 28px;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2b1d00;
    text-decoration: none;
    background: linear-gradient(to bottom, #FFE87C, #F5C41F);
    transition: all 0.18s ease;
    box-shadow: 0 12px 20px rgba(242, 183, 5, 0.45), 0 6px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

    .btn-open-now:hover {
        background: linear-gradient(to bottom, #FFF4A6, #FBD633);
        color: #2b1d00;
        transform: translateY(-2px);
        box-shadow: 0 14px 24px rgba(255, 232, 124, 0.5), 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .btn-open-now:active {
        transform: scale(0.96);
        background: linear-gradient(to bottom, #FFE87C, #E5A400);
        box-shadow: 0 3px 6px rgba(242, 183, 5, 0.25);
    }

    .btn-open-now:hover .arrow-icon {
        transform: translateX(4px);
    }


/* =========================================================
   LOADER
   ========================================================= */

#loaderOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}


/* =========================================================
   CKYC MODAL
   ========================================================= */

#yesCkycBtn:hover,
#noCkycBtn:hover {
    transform: scale(1.05);
    transition: 0.2s;
}


/* =========================================================
   BLINK ANIMATION
   ========================================================= */

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }

    25%, 75% {
        opacity: 0.5;
    }
}

.blink-button {
    animation: blink 1s infinite;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .fd-page {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        height: 250px;
        flex: none;
        border-radius: 20px 20px 0 0;
    }

    .right-panel {
        width: 100%;
        flex: none;
        padding: 15px;
        border-radius: 0 0 20px 20px;
    }

    .deposit-calculator-panel {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    #dynamicRateCards {
        row-gap: 10px;
    }

        #dynamicRateCards .col-12,
        #dynamicRateCards .col-sm-6,
        #dynamicRateCards .col-md-6 {
            padding-left: 5px;
            padding-right: 5px;
        }

    .rate-box {
        width: 100%;
        min-height: 90px;
        padding: 12px 8px;
        font-size: 14px;
    }

        .rate-box strong {
            font-size: 20px;
        }

        .rate-box small {
            font-size: 12px;
        }

    .pnb-badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    .maturity-details-panel {
        width: 100%;
        overflow: hidden;
    }

    .maturity-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .maturity-box {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        padding: 10px 6px;
        box-sizing: border-box;
    }

        .maturity-box .label {
            font-size: 11px;
        }

        .maturity-box .value {
            font-size: 15px;
            line-height: 1.3;
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

    #maturityAmount {
        font-size: 16px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .fd-action-buttons {
        flex-direction: column;
    }

    .premium-action-btn {
        width: 100%;
    }
}
