/* /public/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --nmb-blue: #004d99; /* A deeper blue similar to the screenshot's top bar */
    --nmb-light-blue: #007bff; /* For hover states or lighter accents */
    --nmb-green: #28a745; /* Success messages */
    --nmb-red: #dc3545;   /* Error messages */
    --nmb-grey-text: #343a40;
    --nmb-light-bg: #e9ecef; /* Subtle light background for the body */
    --nmb-card-bg: #ffffff;
    --nmb-border-color: #ced4da;
    --nmb-shadow-light: 0 4px 8px rgba(0, 0, 0, 0.05);
    --nmb-shadow-medium: 0 8px 16px rgba(0, 0, 0, 0.1); /* For the main card */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--nmb-grey-text);
    background-color: var(--nmb-light-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* Header/Top Bar - Styled to match screenshot */
header {
    background-color: var(--nmb-blue); /* Deep blue */
    padding: 20px 0;
    color: #fff;
    text-align: center;
    box-shadow: var(--nmb-shadow-medium); /* Add shadow to the header */
}

header .container {
    display: flex;
    flex-direction: column; /* Stack logo/title and subtitle */
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    margin-bottom: 10px; /* Space between logo/title and subtitle */
}

.logo-placeholder {
    width: 40px; /* Adjust size as needed for your actual logo */
    height: 40px;
    background-color: #fff; /* Placeholder background */
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--nmb-blue);
    overflow: hidden; /* Ensure image fits if used */
}
.logo-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


.logo-text {
    font-size: 28px; /* Larger title */
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.header-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* Navigation below the main header, integrated into a subtle nav bar */
nav {
    background-color: #ff3636; /* White background for the nav bar */
    padding: 10px 0;
    box-shadow: var(--nmb-shadow-light); /* Subtle shadow for nav */
    border-bottom: 1px solid #eee;
    margin-bottom: 30px; /* Space between nav and content */
}

nav .container {
    display: flex;
    justify-content: center; /* Center the nav items */
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin: 0 20px; /* Space between nav items */
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    padding: 8px 0; /* Add padding for click area */
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 3px solid transparent; /* For active indicator */
}

nav ul li a:hover,
nav ul li a.active {
    color: #f7ff75;
    border-bottom-color: var(--nmb-blue); /* Underline active/hovered link */
}

/* Main Content Area */
main {
    flex-grow: 1;
    padding: 0px 0 40px; /* Adjust top padding as nav is separate */
}

/* Card-like Sections - Inspired by screenshot */
.page-section {
    background-color: var(--nmb-card-bg);
    padding: 40px;
    border-radius: 12px; /* More rounded corners */
    box-shadow: var(--nmb-shadow-medium); /* Pronounced shadow */
    margin-bottom: 30px;
    border: 1px solid #f0f0f0; /* Subtle border */
    position: relative; /* For messages */
    margin: 15px;
}

h1, h2 {
    color: var(--nmb-blue);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}
.page-section p.subtitle {
    text-align: center;
    color: var(--nmb-grey-text);
    margin-bottom: 30px;
    font-size: 15px;
}


/* Forms */
form {
    display: grid;
    gap: 20px 30px; /* More horizontal gap */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--nmb-grey-text);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group input[type="number"] {
    padding: 12px 15px;
    border: 1px solid var(--nmb-border-color);
    border-radius: 8px; /* Slightly more rounded inputs */
    font-size: 16px;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fcfcfc; /* Slightly off-white input background */
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="file"]:focus,
.form-group input[type="number"]:focus {
    border-color: var(--nmb-light-blue);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); /* Softer focus glow */
    outline: none;
}

.form-group input[type="file"] {
    padding: 10px;
}

.form-group input[type="file"]::file-selector-button {
    background-color: var(--nmb-blue);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px; /* Match input rounding */
    cursor: pointer;
    margin-right: 15px;
    transition: background-color 0.3s ease;
}

.form-group input[type="file"]::file-selector-button:hover {
    background-color: var(--nmb-light-blue);
}


button {
    background-color: var(--nmb-blue); /* Match primary color */
    color: #fff;
    padding: 15px 25px; /* Taller button */
    border: none;
    border-radius: 8px; /* More rounded button */
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    grid-column: 1 / -1; /* Button spans all columns */
    margin-top: 15px; /* More space above button */
    box-shadow: 0 4px 10px rgba(0, 77, 153, 0.3); /* Button shadow */
}

button:hover {
    background-color: var(--nmb-light-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 77, 153, 0.4);
}

button:disabled {
    background-color: var(--nmb-border-color); /* Greyed out */
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: none;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
    text-align: center;
    grid-column: 1 / -1;
    opacity: 0; /* Start hidden */
    transition: opacity 0.3s ease;
}
.message.show {
    opacity: 1; /* Show when message is present */
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loan Calculator specific */
#calculator-results {
    margin-top: 20px;
    background-color: var(--nmb-light-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--nmb-border-color);
    text-align: center;
}

#calculator-results p {
    font-size: 18px;
    margin-bottom: 10px;
}
#calculator-results p strong {
    color: var(--nmb-blue);
}

/* Application Tracking Dashboard */
#application-status-display {
    margin-top: 20px;
    padding: 25px;
    background-color: var(--nmb-light-bg);
    border-radius: 8px;
    border: 1px solid var(--nmb-border-color);
}

#application-status-display p {
    margin-bottom: 10px;
    font-size: 17px;
}

#application-status-display p strong {
    color: var(--nmb-blue);
}

#application-status-display .status-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: #fff;
    margin-left: 10px;
}

.status-tag.pending { background-color: #ffc107; } /* Orange */
.status-tag.approved { background-color: var(--nmb-green); }
.status-tag.declined { background-color: var(--nmb-red); }
.status-tag.processing { background-color: var(--nmb-blue); }
.status-tag.cancelled { background-color: var(--nmb-border-color); }


/* Footer */
footer {
    background-color: var(--nmb-grey-text);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header .container {
        padding: 15px;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 10px;
    }
    nav ul li {
        margin: 5px 10px;
    }
    .page-section {
        padding: 25px;
        margin: 15px;
    }
    form {
        grid-template-columns: 1fr;
    }
    button {
        grid-column: auto;
    }
    .form-group input[type="file"]::file-selector-button {
        display: block;
        width: 100%;
        margin: 10px 0 0 0;
    }
}
/* General Styling for Results Section */
#calculator-results {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.results-title {
    color: #003366; /* Dark blue, matching header */
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: bold;
}

.results-note {
    font-size: 0.9em;
    color: #555;
    margin-top: 25px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Grid Layout for Results */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three columns for top row */
    gap: 15px;
    border: 1px solid #c0c0c0; /* Light gray border for the grid container */
    border-radius: 5px;
    padding: 10px;
    background-color: #fff; /* White background for the grid */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.result-item {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #a0a0a0; /* Blue vertical line for separation */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Remove right border for the last item in each row */
.results-grid .result-item:nth-child(3n) {
    border-right: none;
}

/* Specific styling for the bigger result items (Total Loan, Monthly Installment)
    They appear to span two columns or are just wider/centrally placed */
.result-item-big {
    grid-column: span 1; /* Each takes 1 column, but they are placed on the second row */
    border-top: 1px solid #a0a0a0; /* Separator from top row */
}

/* Adjust grid for the second row (Total Loan, Monthly Installment, Eligibility) */
/* This requires a bit of specific placement if using grid like the image */
/* Let's try to make them span 2 columns then adjust the third one for eligibility */
@media (min-width: 768px) { /* Apply on larger screens for better layout */
    .results-grid {
        grid-template-areas:
            "item1 item2 item3"
            "item4 item5 item6"; /* item6 for eligibility */
    }
    .result-item:nth-child(1) { grid-area: item1; }
    .result-item:nth-child(2) { grid-area: item2; }
    .result-item:nth-child(3) { grid-area: item3; } /* This is Eligibility */
    .result-item:nth-child(4) { grid-area: item4; } /* This is Total Loan */
    .result-item:nth-child(5) { grid-area: item5; } /* This is Monthly Installment */

    .result-item-big {
        grid-column: span 1; /* Reset span for large items */
        border-right: 1px solid #a0a0a0;
    }
    /* Ensure no border for the last element in the second row (Eligibility) */
    .result-item-eligibility {
        border-right: none;
    }
    .result-item:nth-child(3) { /* Eligibility is the 3rd item */
        border-right: none;
    }
    /* Ensure Total Loan and Monthly installment items also have top border */
    .result-item:nth-child(4), .result-item:nth-child(5) {
        border-top: 1px solid #a0a0a0;
    }
}


.result-item .label {
    font-size: 0.9em;
    color: #333;
    margin-bottom: 5px;
    font-weight: normal; /* Labels are not bold in the screenshot */
}

.result-item .value {
    font-size: 1.1em;
    font-weight: bold;
    color: #000;
}

/* Eligibility Status Tag */
.eligibility-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    color: #fff;
    display: inline-block;
    min-width: 60px; /* Ensure a consistent size */
    text-align: center;
}

.eligibility-status.approved { /* For 'Yes' */
    background-color: #4CAF50; /* Green */
}

.eligibility-status.declined { /* For 'No' */
    background-color: #f44336; /* Red */
}

/* Download Application Form Button */
.download-application-form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 25px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.download-application-form-button:hover {
    background-color: #45a049;
}

.download-application-form-button i {
    margin-left: 10px;
    font-size: 1.2em;
}

/* Eligibility Message Banner */
.eligibility-banner {
    background-color: #e6ffe6; /* Light green */
    color: #338833; /* Darker green text */
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 25px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    border: 1px solid #c8ecc8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive adjustments for results grid */
@media (max-width: 767px) {
    .results-grid {
        grid-template-columns: 1fr; /* Stack items on small screens */
    }
    .result-item {
        border-right: none; /* Remove vertical borders on small screens */
        border-bottom: 1px solid #a0a0a0; /* Add horizontal borders */
    }
    .result-item:last-child {
        border-bottom: none; /* No border for the very last item */
    }
    .result-item-big, .result-item-eligibility {
        grid-column: span 1; /* Reset span */
        border-top: none; /* No top border if stacking */
    }
}
.header-container {
    display: flex;        /* Enables Flexbox */
    align-items: center;      /* Vertically centers items */
    /* Removed justify-content: flex-start; as default is fine for being close */
    padding: 10px;
    border: 1px solid #eee; /* Just for visual separation */
    background-color: #000080;
    flex-wrap: wrap;          /* Allows items to wrap to the next line on smaller screens */
    gap: 10px;                /* **Reduced gap between logo and text** */
    /* You can even set gap: 0; if you want them to touch initially */
}

.logo {
    flex-shrink: 0;            /* Prevents the logo from shrinking */
    /* Adjust max-width based on your logo's actual size and desired visual weight */
    max-width: 80px;           /* **Slightly reduced default logo size to encourage closeness** */
    height: auto;              /* Maintains aspect ratio */
}

.logo img {
    max-width: 100%;           /* Ensures the image scales within its container */
    height: auto;
    border-radius: 50%;
    background: white;             /* Maintains aspect ratio */
    display: block;            /* Removes extra space below the image */
}

.text-content {
    flex-grow: 1;              /* Allows the text content to take up available space */
    color: #333;
    text-align: left;          /* Align text to the left */
    /* min-width to prevent text from wrapping too aggressively on wide screens if you want to keep them on one line */
    min-width: fit-content; /* Helps text stay on one line unless forced to wrap */
}

.text-content h1 {
    font-size: 2.5em;          /* Makes the text bigger */
    font-weight: bold;         /* Makes the text bold */
    margin: 0;
    color:#fff;                  /* **Crucial: Remove default margin from h1 to bring it closer** */
    line-height: 1.2;          /* Adjust line height if needed */
    white-space: nowrap;       /* **Prevents text from wrapping on a single line initially** */
    /* This will force the entire header-container to overflow if necessary,
        then the media query will handle the wrap for smaller screens. */
}

/* Media Queries for responsiveness */

/* For screens where items should still be side-by-side but perhaps logo or text is smaller */
@media (max-width: 900px) { /* Added a wider breakpoint if you want to control sizing sooner */
    .logo {
        max-width: 70px;
    }
    .text-content h1 {
        font-size: 2.2em;
        color: #fff;
    }
}

@media (max-width: 768px) {
    .logo {
        max-width: 60px; /* Slightly smaller logo */
    }
    .text-content h1 {
        font-size: 1.8em; /* Adjust for medium screens */
        color: #fff;
    }
}

@media (max-width: 600px) {
    .header-container {
        flex-direction: column; /* **Stacks items vertically on small screens** */
        align-items: center; /* Centers items horizontally when stacked */
        text-align: center; /* Center text when stacked */
        gap: 5px; /* Adjust gap when stacked */
        background-color: #000080;
    }

    .logo {
        margin-bottom: 5px; /* Add some space below the logo when stacked */
        max-width: 80px; /* Can make logo a bit bigger when it has more vertical space */
    }

    .text-content h1 {
        font-size: 1.5em; /* Adjust font size for smaller screens */
        white-space: normal; /* **Allow text to wrap on small screens when stacked** */
        color: #fff;
    }
}

@media (max-width: 400px) {
    .logo {
        max-width: 60px; /* Further reduce logo size on very small screens */
    }
    .text-content h1 {
        font-size: 1.1em; /* Further reduce font size for very small screens */
        color: #fff;
    }
}
/* --- Styling the Label and Value Display for the Range Input --- */
.form-group label {
    display: block; /* Ensures the label takes its own line */
    margin-bottom: 10px; /* Space below the label */
    font-family: Arial, sans-serif;
    font-size: 1em; /* Adjust as needed */
    color: #333;
    text-align: center; /* Center the label text */
}

#loanTenureValue {
    color: #007bff; /* Highlight the current value */
    font-weight: bold;
}

/* --- Styling the Range Input (the beautiful part!) --- */
input[type="range"] {
    appearance: none;
    -webkit-appearance: none; /* Removes default WebKit styles (Chrome, Safari, Edge) */
    width: 100%; /* Full width within its container */
    height: 8px; /* Height of the track */
    background: transparent; /* Makes the range background transparent so track can be styled */
    outline: none; /* Remove blue focus border */
    margin: 10px 0; /* Add some vertical spacing around the slider */
}

/* --- Styling the Track (the bar) --- */

/* For WebKit (Chrome, Safari, Edge) */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #e0e0e0; /* Light gray track */
    border-radius: 5px; /* Rounded corners for the track */
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); /* Subtle inner shadow */
}

/* For Mozilla Firefox */
input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #e0e0e0; /* Light gray track */
    border-radius: 5px; /* Rounded corners for the track */
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

/* For Microsoft Edge (old versions) - these are for compatibility with older Edge/IE */
input[type="range"]::-ms-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: transparent; /* Must be transparent for ms-fill-lower/upper */
    border-color: transparent;
    color: transparent; /* Hide border and color */
}
input[type="range"]::-ms-fill-lower {
    background: #007bff; /* Blue filled part for lower value */
    border-radius: 5px;
}
input[type="range"]::-ms-fill-upper {
    background: #e0e0e0; /* Gray unfilled part for upper value */
    border-radius: 5px;
}


/* --- Styling the Thumb (the draggable circle) --- */

/* For WebKit (Chrome, Safari, Edge) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; /* Removes default WebKit thumb styles */
    border: none; /* No border for the thumb */
    height: 20px; /* Size of the thumb */
    width: 20px; /* Size of the thumb */
    border-radius: 50%; /* Makes it a circle */
    background: #007bff; /* Blue color for the thumb */
    cursor: pointer;
    margin-top: -6px; /* Adjusts thumb vertical position to sit on the track */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Subtle shadow for depth */
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Smooth transitions */
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #0056b3; /* Darker blue on hover */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3); /* More pronounced shadow on hover */
}

/* For Mozilla Firefox */
input[type="range"]::-moz-range-thumb {
    border: none; /* No border for the thumb */
    height: 20px; /* Size of the thumb */
    width: 20px; /* Size of the thumb */
    border-radius: 50%; /* Makes it a circle */
    background: #007bff; /* Blue color for the thumb */
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #0056b3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* For Microsoft Edge (old versions) */
input[type="range"]::-ms-thumb {
    border: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-top: 0; /* No negative margin needed for Edge */
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

input[type="range"]::-ms-thumb:hover {
    background: #0056b3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* --- Focus states for accessibility and visual feedback --- */
input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5), 0 2px 4px rgba(0,0,0,0.2); /* Blue ring on focus */
}

input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5), 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]:focus::-ms-thumb {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5), 0 2px 4px rgba(0,0,0,0.2);
}

/* --- Submission Overlay Styles --- */
.submission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of everything */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.submission-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.submission-content {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.submission-overlay.visible .submission-content {
    transform: translateY(0);
    opacity: 1;
}

.submission-content p {
    font-size: 1.2em;
    color: var(--nmb-grey-text);
    margin-top: 20px;
    font-weight: 500;
}

/* Spinner Animation */
.spinner {
    border: 6px solid #f3f3f3; /* Light grey */
    border-top: 6px solid var(--nmb-blue); /* Blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Tick Animation */
.success-tick {
    color: var(--nmb-green); /* Green color for success */
    font-size: 60px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin: 0 auto; /* Center the tick */
}

.success-tick.show {
    opacity: 1;
    transform: scale(1);
}

/* Icon specific adjustments for Font Awesome */
 
/* Submission Overlay Styles */
.submission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of everything */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.submission-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.submission-content {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    min-width: 300px; /* Adjust as needed */
}

.submission-content p {
    font-size: 1.2rem;
    color: var(--nmb-dark-grey);
    margin-top: 20px;
    font-weight: 500;
}

/* Spinner Styles */
.spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid var(--nmb-blue); /* Blue spinner */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto; /* Center the spinner */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Tick Container Animation */
.success-tick {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    margin: 0 auto; /* Center the tick */
    visibility: hidden; /* Ensure container starts hidden */
    display: flex; /* Use flexbox to center image easily */
    justify-content: center;
    align-items: center;
    width: 60px; /* Define a fixed size for the container */
    height: 60px;
}

.success-tick.show {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

/* New CSS for the actual tick image */
.tick-image {
    width: 100%; /* Make image fill its container */
    height: 100%;
    object-fit: contain; /* Ensure the image scales nicely within the container */
}
/* --- Track Info Overlay Specific Styles --- */
/* Reuse .submission-overlay and .submission-content for basic structure */

#track-info-overlay .submission-content {
    /* You can make this slightly narrower or different if desired */
    max-width: 400px;
}

#track-info-icon {
    margin-bottom: 20px;
}

#track-info-icon .fas {
    /* For Font Awesome icons within the overlay */
    font-size: 60px; /* Adjust size as needed */
}

#track-info-message {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--nmb-grey-text);
    margin-bottom: 25px;
}

#track-info-close-btn {
    background-color: var(--nmb-blue); /* Or a neutral grey/red for errors */
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto; /* Allow button to size to content */
    grid-column: auto; /* Override form button spanning */
    margin-top: 0; /* Remove default margin from form button */
    box-shadow: none; /* Remove default button shadow */
}

#track-info-close-btn:hover {
    background-color: var(--nmb-light-blue);
    transform: none; /* Remove translateY from general button hover */
    box-shadow: none;
}



:root {
    --nmb-blue: #004d99; /* Dark blue from logo */
    --nmb-green: #4CAF50; /* Green for success/approval */
    --nmb-red: #f44336; /* Red for errors/cancellation */
    --nmb-yellow: #ffc107; /* Yellow for warnings */
    --nmb-light-blue: #e0f2f7; /* Light blue for sections */
    --text-color: #333;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center; /* Center horizontally */
    background-color: var(--nmb-blue);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.header-container .logo img {
    height: 60px; /* Adjust as needed */
    margin-right: 20px;
}

.header-container .text-content h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: bold;
}

nav {
    background-color: #fff;
    box-shadow: 0 2px 5px var(--shadow-color);
    margin-bottom: 20px;
    padding: 10px 0;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: var(--nmb-blue);
    font-weight: bold;
    padding: 10px 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 5px;
    display: block;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--nmb-blue);
    color: white;
}

main {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

.page-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-color);
    margin-bottom: 20px;
}

.page-section.hidden {
    display: none;
}

h2 {
    color: var(--nmb-blue);
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1em;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: calc(100% - 20px);
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.form-group input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px 0; /* Adjust padding for file input */
}

.form-group input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    border-radius: 5px;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--nmb-blue);
    cursor: pointer;
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--nmb-blue);
    cursor: pointer;
}

button[type="submit"],
button[type="button"] {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--nmb-blue);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

button[type="submit"]:hover,
button[type="button"]:hover {
    background-color: #003366; /* Darker blue on hover */
}

button[type="submit"]:disabled,
button[type="button"]:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Specific button styles */
.cancel-button {
    background-color: var(--nmb-red);
}

.cancel-button:hover {
    background-color: #cc0000;
}

.edit-button {
    background-color: #007bff; /* A standard blue for edit */
    margin-right: 10px; /* Space from cancel button */
}

.edit-button:hover {
    background-color: #0056b3;
}

/* Dashboard Actions container for buttons */
.dashboard-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 15px; /* Space between buttons */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.dashboard-actions button {
    width: auto; /* Allow buttons to size based on content */
    min-width: 150px; /* Ensure a minimum width */
    flex-grow: 1; /* Allow them to grow */
    max-width: 250px; /* Max width to prevent them from becoming too wide */
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.message.hidden {
    display: none;
    opacity: 0;
}

.message.show {
    display: block;
    opacity: 1;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Calculator Results */
#calculator-results {
    background-color: var(--nmb-light-blue);
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid var(--nmb-blue);
}

#calculator-results .results-title {
    color: var(--nmb-blue);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column */
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr 1fr; /* Two columns on larger screens */
    }
    .result-item-big {
        grid-column: span 2; /* Span two columns for larger items */
    }
}

.result-item {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow content to wrap */
}

.result-item .label {
    font-weight: bold;
    color: var(--nmb-blue);
    margin-right: 10px;
}

.result-item .value {
    font-size: 1.1em;
    color: var(--text-color);
}

.result-item-eligibility .value {
    font-weight: bold;
    font-size: 1.2em;
}

.eligibility-status.approved {
    color: #ffffff;
}

.eligibility-status.declined {
    color: var(--nmb-red);
}

.results-note {
    text-align: center;
    font-style: italic;
    color: #777;
    margin-top: 20px;
    font-size: 0.95em;
}

.download-application-form-button {
    display: block;
    width: fit-content; /* Adjust width to content */
    margin: 25px auto 0 auto;
    padding: 12px 25px;
    background-color: var(--nmb-green);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
}

.download-application-form-button:hover {
    background-color: #388e3c; /* Darker green on hover */
}

.download-application-form-button i {
    margin-left: 8px;
}

.eligibility-banner {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.eligibility-banner.hidden {
    display: none;
}

.eligibility-banner.approved-banner {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.eligibility-banner.declined-banner {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Submission Overlay */
.submission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.submission-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.submission-overlay.hidden {
    display: none; /* Ensure it doesn't take up space when hidden */
}

.submission-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    position: relative; /* For close button positioning */
}

.submission-content p {
    font-size: 1.2em;
    margin-top: 20px;
    color: var(--text-color);
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--nmb-blue);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.spinner.hidden {
    display: none;
}

.success-tick {
    display: none; /* Initially hidden, controlled by JS */
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease-in-out;
}

.success-tick.show {
    display: block;
    opacity: 1;
    transform: scale(1);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.success-tick .tick-image {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

/* Track Info Overlay specific styles (reuses submission-overlay structure) */
#track-info-overlay .overlay-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

#track-info-overlay .overlay-close-btn:hover {
    color: #333;
}

#track-info-overlay .status-icon i {
    font-size: 60px;
    margin-bottom: 15px;
}

/* Customer Dashboard styles */
.dashboard-content {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.dashboard-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.dashboard-content strong {
    color: var(--nmb-blue);
}

.status-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    color: #fff;
    margin-left: 10px;
    font-size: 0.9em;
    text-transform: capitalize;
}

/* Status-specific colors */
.status-tag.submitted,
.status-tag.pending-review {
    background-color: #ffc107; /* Yellow for pending/submitted */
}

.status-tag.approved {
    background-color: var(--nmb-green); /* Green for approved */
}

.status-tag.declined,
.status-tag.cancelled {
    background-color: var(--nmb-red); /* Red for declined/cancelled */
}

.status-tag.processing {
    background-color: #17a2b8; /* Info blue for processing */
}

/* Uploaded Documents Info */
.uploaded-docs-info {
    margin-top: 25px;
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}

.uploaded-docs-info h3 {
    color: var(--nmb-blue);
    font-size: 1.2em;
    margin-bottom: 15px;
}

.uploaded-docs-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uploaded-docs-info li {
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uploaded-docs-info li:last-child {
    border-bottom: none;
}

.uploaded-docs-info li a {
    color: var(--nmb-blue);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.uploaded-docs-info li a:hover {
    color: #003366;
}

.uploaded-docs-info li a i {
    margin-left: 5px;
    font-size: 0.9em;
}

/* Progress Steps Styling */
.application-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    position: relative;
    padding: 0 10px; /* Add some padding to edges */
    overflow-x: auto; /* Enable horizontal scrolling if steps overflow */
}

.application-progress-steps::-webkit-scrollbar {
    height: 8px;
}

.application-progress-steps::-webkit-scrollbar-thumb {
    background-color: var(--nmb-blue);
    border-radius: 4px;
}

.application-progress-steps::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

.application-progress-steps .step {
    flex: 1; /* Distribute space evenly */
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px; /* Minimum width for each step */
}

.application-progress-steps .step .circle {
    width: 50px;
    height: 50px;
    background-color: #ccc; /* Default grey */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    transition: background-color 0.3s ease;
    z-index: 2; /* Bring circle above line */
    border: 3px solid #ccc;
}

.application-progress-steps .step p {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    font-weight: bold;
}

.application-progress-steps .line {
    flex: 1; /* Allow line to stretch */
    height: 4px;
    background-color: #eee; /* Default grey line */
    position: relative;
    z-index: 1; /* Behind circles */
    margin: 0 -25px; /* Adjust to connect lines */
}

/* Active & Completed Step Styles */
.application-progress-steps .step.active .circle {
    background-color: var(--nmb-blue);
    border-color: var(--nmb-blue);
    animation: pulse 1s infinite alternate; /* subtle animation for current step */
}

.application-progress-steps .step.completed .circle {
    background-color: var(--nmb-green);
    border-color: var(--nmb-green);
}

/* Connect the lines */
.application-progress-steps .step.active + .line {
    background: linear-gradient(to right, var(--nmb-blue) 50%, #eee 50%);
}

.application-progress-steps .step.completed + .line {
    background-color: var(--nmb-green);
}

/* Special status styling for Cancelled/Declined */
.application-progress-steps .step.cancelled-step .circle,
.application-progress-steps .step.declined-step .circle {
    background-color: var(--nmb-red);
    border-color: var(--nmb-red);
}

.application-progress-steps .step.cancelled-step p,
.application-progress-steps .step.declined-step p {
    color: var(--nmb-red);
}

/* Smaller screen adjustments */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    .header-container .logo img {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .header-container .text-content h1 {
        font-size: 1.8em;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav ul li {
        margin: 5px 0;
    }
    .page-section {
        padding: 20px;
    }
    .form-group input[type="text"],
    .form-group input[type="number"],
    .form-group input[type="file"] {
        width: calc(100% - 20px);
    }
    .application-progress-steps {
        flex-wrap: nowrap; /* Prevent wrapping to force horizontal scroll */
        justify-content: flex-start;
        padding-bottom: 10px; /* Space for scrollbar */
    }
    .application-progress-steps .step {
        flex-shrink: 0; /* Don't shrink steps */
    }
    .application-progress-steps .line {
        margin: 0 -15px; /* Adjust margin for lines */
    }
}

/* Animation for active step */
@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Current file path display for edit mode */
.current-file-path {
    display: inline-block;
    font-size: 0.8em;
    color: #555;
    margin-left: 10px;
    padding: 5px 8px;
    background-color: #f0f0f0;
    border-radius: 3px;
    margin-top: 5px; /* Space from input field */
}
.current-file-path.hidden {
    display: none;
}