﻿body {
    font-family: Arial, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin-top: 50px;
    width: 90%;
    max-width: 1200px;
}

.input-section, .output-section {
    flex: 1;
}

/* Updated input-section for two inputs per row */
.input-section {
    background-color: #fefefe;
    padding: 15px;
    border-radius: 12px;
    border-right: 6px solid #007bff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    max-width: 800px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

    /* Each input-group takes ~45% width to fit 2 per row */
    .input-section > .input-group {
        flex: 1 1 45%;
        display: flex;
        flex-direction: column; /* label above input */
        margin-bottom: 20px;
    }

    .input-section h2 {
        color: #004085;
        margin-bottom: 20px;
        border-bottom: 2px solid #cce5ff;
        padding-bottom: 8px;
    }

.input-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    display: block;
}

.input-group input,
.input-group select {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

    .input-group input:focus,
    .input-group select:focus {
        border-color: #007bff;
        outline: none;
    }

.input-group button {
    padding: 12px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: flex-start;
}

    .input-group button:hover {
        background-color: #0056b3;
    }

h2, h3 {
    margin-top: 0;
    color: #333;
}

.result-item {
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
}

#result {
    margin-bottom: 20px;
    background-color: #d1ecf1;
    border-left: 5px solid #0c5460;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
}

.output-section {
    background-color: #e9f7ef;
    padding: 25px;
    border-radius: 12px;
    border-left: 6px solid #28a745;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2e7d32;
    max-width: 400px;
    margin: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

    .output-section h3 {
        color: #1b5e20;
        margin-bottom: 15px;
        border-bottom: 2px solid #c8e6c9;
        padding-bottom: 5px;
    }

    .output-section div {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #d4edda;
    }

    .output-section .result-item {
        margin-top: 15px;
        font-weight: 500;
        background: #d0f0dc;
        padding: 10px;
        border-radius: 6px;
        border: 1px dashed #28a745;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

#disbursalDuration {
    font-weight: bold;
    color: #1b5e20;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
    width: 600px;
    position: relative;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 20px;
    cursor: pointer;
}
/* Modal container */
#investmentModal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Overlay effect */
    font-family: 'Segoe UI', sans-serif;
}

/* Modal content box */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px 40px;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close button */
.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 12px;
    right: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

    .close:hover {
        color: #e00;
    }

/* Heading */
.modal-content h3 {
    margin-top: 0;
    font-size: 22px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

/* Input group styling */
.input-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

    .input-group label {
        font-weight: 500;
        margin-bottom: 6px;
        color: #444;
    }

    .input-group input[type="number"] {
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 16px;
        transition: border 0.2s;
    }

        .input-group input[type="number"]:focus {
            border-color: #007bff;
            outline: none;
        }

/* Submit button */
.modal-content button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .modal-content button:hover {
        background-color: #0056b3;
    }
/* Styling for small inline button next to investment input */
.investment-inline-button {
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 14px;
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-self: flex-start;
    transition: background-color 0.3s;
}

    .investment-inline-button:hover {
        background-color: #117a8b;
    }

/* Booster fields layout */
#boosterFields {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

    #boosterFields .input-group {
        flex: 1 1 30%;
    }
.form-actions {
    width: 100%;
    display: flex;
    justify-content: center; /* or 'flex-end' if you want it right-aligned */
    margin-top: 20px;
}

.booster-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

    .booster-section .input-group {
        flex: 1 1 45%;
        display: flex;
        flex-direction: column;
    }
.input-group span {
    margin-top: 4px;
}
#investment {
    transition: border 0.3s ease;
}
