/* Ensure html and body take full height */
html {
    min-height: 100%;
    font-family: 'Courier New', Courier, monospace;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Apply background image to the body */
body {
    background: #f8f9fa;
    /* Fallback color */
    background-image: url("Background.jpg");
    /* Ensure this path is correct */
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

footer {
    color: black;
    text-align: center;
    background: white;
    /* White background for the content */
    padding: 5px;
    display: inline-block;
    margin: 5px auto;
    /* Centers the footer */
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    opacity: 90%;
}

.file-input-container {
    margin-bottom: 10px;
}

.file-preview {
    margin-top: 5px;
}

/* Style for the container */
.container {
    background: white;
    /* White background for the content */
    padding: 20px;
    border-radius: 50px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    /* Add some space at the bottom */
    max-width: 75%;
}

h1,
h2,
h3 {
    color: #000;
}

.btn {
    margin-right: 5px;
    border-radius: 15px;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #e92d30;
    --bs-btn-border-color: #e92d30;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #e92d30;
    --bs-btn-hover-border-color: #e43b3e;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #e43b3e;
    --bs-btn-active-border-color: #e92d30;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #e92d30;
    --bs-btn-disabled-border-color: #e92d30;
}

.btn-info {
    --bs-btn-color: #000;
    --bs-btn-bg: #e92d30;
    --bs-btn-border-color: #e92d30;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #ea4c4f;
    --bs-btn-hover-border-color: #ca282a;
    --bs-btn-focus-shadow-rgb: 11, 172, 204;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #ea4c4f;
    --bs-btn-active-border-color: #ca282a;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #e92d30;
    --bs-btn-disabled-border-color: #e92d30;
}

.table {
    background: white;
}

.table th {
    background: #e92d30;
    color: white;
}

#prfChart {
    display: block;
    /* Prevents inline default */
    max-width: 100% !important;
    /* Ensures responsiveness */
    height: auto !important;
    /* Let Chart.js control the height */
    margin: auto;
    /* Centers the chart */
    background: #f8f9fa;
    /* Light background */
    border-radius: 10px;
    /* Rounded corners */
    padding: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    /* Optional: Add shadow */
}

#ReqprfChart {
    display: block;
    /* Prevents inline default */
    max-width: 50% !important;
    /* Ensures responsiveness */
    height: 50% !important;
    /* Let Chart.js control the height */
    margin: auto;
    /* Centers the chart */
    background: #f8f9fa;
    /* Light background */
    border-radius: 10px;
    /* Rounded corners */
    padding: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    /* Optional: Add shadow */
}

#RprfChart {
    display: block;
    /* Prevents inline default */
    max-width: 100% !important;
    /* Ensures responsiveness */
    height: auto !important;
    /* Let Chart.js control the height */
    margin: auto;
    /* Centers the chart */
    background: #f8f9fa;
    /* Light background */
    border-radius: 10px;
    /* Rounded corners */
    padding: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    /* Optional: Add shadow */
}

.charts-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.chart-box {
    width: 50%;    /* or try 30% */
    max-width: 40%; /* prevents them from getting too large */
}

#prfChart, #RprfChart {
    width: 100% !important;
    height: auto !important;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
}

#poChart {
    display: block;
    /* Prevents inline default */
    max-width: 100% !important;
    /* Ensures responsiveness */
    height: auto !important;
    /* Let Chart.js control the height */
    margin: auto;
    /* Centers the chart */
    background: #f8f9fa;
    /* Light background */
    border-radius: 10px;
    /* Rounded corners */
    padding: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    /* Optional: Add shadow */
}

/* The main loading overlay */
.loading-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* Slightly transparent black */
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

/* Spinner animation */
.loading-spinner .spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

/* Animation for the spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Fade-in effect for the overlay */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Design for Phones */
@media (max-width: 768px) {
    body {
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }

    .container {
        padding: 15px;
        margin: 10px;
        border-radius: 25px;
    }

    .card {
        width: 90% !important;
        height: auto !important;
        margin: 10px auto;
    }

    h1,
    h2,
    h3 {
        font-size: 1.2rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .status-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .stage {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        margin-bottom: 10px;
    }

    .stage:not(.last)::after {
        display: none;
    }

    .circle {
        width: 20px;
        height: 20px;
        font-size: 12px;
        margin-bottom: 0;
        margin-right: 10px;
    }

    .stage-label {
        font-size: 12px;
    }

    footer {
        font-size: 12px;
        padding: 8px;
        width: 100%;
        margin: 10px 0;
    }

    #prfChart,
    #poChart {
        padding: 5px;
        border-radius: 8px;
        font-size: 12px;
    }

    .loading-overlay {
        font-size: 18px;
    }

    .loading-spinner .spinner {
        width: 40px;
        height: 40px;
    }
}