/* 
Author: AROCKIA ALWIN A
Project: Modern Easy Data Analysis Dashboard
Version: 1.0
Date: August 07, 2025
Description: CSS styles for the dashboard application.
*/

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --chart-bg: rgba(166, 189, 219, 0.5); /* Lighter muted blue for numerical charts */
    --chart-border: rgba(166, 189, 219, 1);
    --header-bg: #f4f4f4;
    --button-bg: #007bff;
    --button-hover: #0056b3;
}

body.dark {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --border-color: #555555;
    --chart-bg: rgba(166, 189, 219, 0.5); /* Lighter muted blue for dark mode */
    --chart-border: rgba(166, 189, 219, 1);
    --header-bg: #333333;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-bg);
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    margin: 0;
    font-size: 24px;
}

#dropZone {
    border: 2px dashed var(--border-color);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: border-color 0.3s;
}

#dropZone:hover {
    border-color: var(--button-bg);
}

#previewTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

#previewTable th, #previewTable td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: left;
}

#previewTable th {
    background-color: var(--header-bg);
    position: sticky;
    top: 0;
}

#dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-container {
    border: 1px solid var(--border-color);
    padding: 15px;
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.chart-container h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.chart-container select {
    margin-bottom: 10px;
    padding: 5px;
    width: 100%;
}

.chart-container canvas {
    width: 100% !important;
    height: 200px !important;
    max-height: 300px;
    aspect-ratio: 4 / 3;
}

.chart-container button {
    margin: 5px;
}

.stats {
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--text-color);
}

button {
    padding: 10px 15px;
    background-color: var(--button-bg);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

button i {
    font-size: 1.1em;
}

button:hover {
    background-color: var(--button-hover);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#exportToolbar {
    position: sticky;
    bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background-color: var(--bg-color);
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.chart-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-container.fullscreen canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 70vh;
    aspect-ratio: 4 / 3;
}

.chart-container.fullscreen .stats {
    font-size: 1em;
}

footer {
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
    color: var(--text-color);
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 600px) {
    #dashboard {
        grid-template-columns: 1fr;
    }
    header {
        flex-direction: column;
        gap: 10px;
    }
    h1 {
        font-size: 20px;
    }
    .chart-container canvas {
        height: 150px !important;
    }
    footer {
        margin-top: 10px;
    }
}