/* style.css */

/* --- General Section Hiding/Showing --- */
/* Simple.css typically handles some of this, but explicit rules ensure consistency */
#dashboard-section,
#manage-skills-section,
#insights-section {
    display: block; /* Default to block for our JS to control */
}

/* Initially hide sections that are not the dashboard */
#manage-skills-section,
#insights-section {
    display: none;
}

/* --- Insights Section Styling --- */
#insights-section header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#insights-section header h2 {
    margin: 0;
}

/* --- Calendar Navigation --- */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background-color: var(--bg-color, #2a2a2a); /* Inherit from Simple.css dark theme or set explicitly */
    padding: 10px;
    border-radius: var(--radius);
}

.calendar-nav button {
    font-size: 1.2em;
    padding: 5px 10px;
    background: var(--button-color, #7289da); /* Example button color */
    color: var(--button-text-color, white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

#current-month-year {
    font-size: 1.5em;
    font-weight: bold;
}

/* --- Calendar Grid Layout --- */
.calendar-grid-container {
    background-color: var(--bg-color, #2a2a2a);
    padding: 15px;
    border-radius: var(--radius);
}

.calendar-header,
.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 columns for days of the week */
    gap: 5px;
    text-align: center;
}

.calendar-header span {
    font-weight: bold;
    padding: 8px 0;
    color: var(--text-color, #eee);
}

#calendar-grid .day-cell {
    padding: 15px 5px;
    border-radius: var(--radius);
    background-color: var(--secondary-bg-color, #333); /* Default day cell background */
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-height: 80px; /* Ensure cells have enough height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative; /* For positioning date number */
}

.day-cell.empty {
    background-color: transparent;
    cursor: default;
}

.day-cell .date-number {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 5px; /* Space between date and time */
    color: var(--text-color, #eee);
    position: absolute; /* Position date number top-left */
    top: 5px;
    left: 5px;
}

.day-cell .total-time {
    font-size: 0.9em;
    color: var(--secondary-text-color, #bbb);
    margin-top: 15px; /* Adjust to move time below date number */
}

/* --- Heatmap Effect (Placeholder classes for JS to add) --- */
/* These colors are examples, adjust to your preference for "heatmap" */
.day-cell.level-0 { background-color: var(--secondary-bg-color, #333); } /* No time */
.day-cell.level-1 { background-color: #4a2d73; } /* Low activity (e.g., < 1 hour) - a darker purple */
.day-cell.level-2 { background-color: #6a3e9c; } /* Medium activity (e.g., 1-3 hours) - a mid-purple */
.day-cell.level-3 { background-color: #8b4ed1; } /* High activity (e.g., 3-6 hours) - a brighter purple */
.day-cell.level-4 { background-color: #a665e8; } /* Very high activity (e.g., 6+ hours) - lightest purple */
.day-cell.goal-met { border: 2px solid var(--accent-color, #00ff00); } /* Green border for meeting goal */

/* --- Daily Summary View --- */
#daily-summary-view {
    background-color: var(--bg-color, #2a2a2a);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 20px;
}

#daily-summary-view h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color, #eee);
}

.summary-details p {
    margin: 5px 0;
    font-size: 1.1em;
    color: var(--text-color, #eee);
}
.summary-details p strong {
    color: var(--secondary-text-color, #bbb);
    margin-right: 5px;
}
.summary-details span {
    font-weight: bold;
    color: var(--accent-color, #7289da);
}

/* --- Charts Container --- */
.charts-container {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 20px;
    justify-content: center; /* Center charts if not enough to fill row */
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #444);
}

.chart-wrapper {
    flex: 1; /* Allows charts to grow and shrink */
    min-width: 280px; /* Minimum width before wrapping */
    max-width: 450px; /* Max width to control size */
    background-color: var(--secondary-bg-color, #333);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    min-width: 280px;
    max-width: 450px;
    height: 350px; /* Set a fixed height for the chart wrapper */
    display: flex; /* Use flexbox to center content vertically */
    flex-direction: column; /* Stack title and canvas vertically */
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    box-sizing: border-box; /* Ensure padding and border are included in the height */
}

.chart-wrapper h4 {
    margin-top: 10px;
    color: var(--text-color, #eee);
}

canvas {
    max-width: 100%;
    height: 100%;
}

/* --- Skill Breakdown List --- */
#daily-skill-breakdown-list {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #444);
}
#daily-skill-breakdown-list ul {
    list-style: none; /* Remove default list styling */
    padding: 0;
    margin: 0;
}
#daily-skill-breakdown-list li {
    background-color: var(--secondary-bg-color, #333);
    margin-bottom: 5px;
    padding: 10px 15px;
    border-radius: var(--radius);
    color: var(--text-color, #eee);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#daily-skill-breakdown-list li:last-child {
    margin-bottom: 0;
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .calendar-header span,
    #calendar-grid .day-cell {
        font-size: 0.8em; /* Smaller font on small screens */
        padding: 10px 2px;
        min-height: 60px;
    }
    .day-cell .date-number {
        font-size: 1em;
    }
    .day-cell .total-time {
        font-size: 0.75em;
    }
    .calendar-nav button {
        font-size: 1em;
    }
    #current-month-year {
        font-size: 1.2em;
    }
    .charts-container {
        flex-direction: column; /* Stack charts vertically on small screens */
        align-items: center;
    }
    .chart-wrapper {
        width: 90%; /* Take almost full width on small screens */
        height: 300px; /* Adjust height for smaller screens if necessary */
        margin-bottom: 20px; /* Add space between stacked charts */
    }
}