/* ============================================
   ACADEMIC PORTFOLIO - CALENDAR STYLES
   Version: 2.1.0
   ============================================ */

/* Container Layout */
.calendar-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .calendar-container {
        grid-template-columns: 1fr;
    }
}

/* Calendar Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.calendar-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Legend */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--primary-gray);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Calendar Grid */
.calendar-grid {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Week Headers */
.calendar-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day-header {
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary-gray);
}

/* Days Grid */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

/* Individual Day */
.calendar-day {
    min-height: 100px;
    padding: 0.5rem;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition-speed);
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background: var(--background);
}

.calendar-day.empty {
    background: var(--background);
    opacity: 0.5;
    cursor: default;
}

.calendar-day.today {
    background: rgba(0, 119, 182, 0.05);
}

.calendar-day.has-events {
    cursor: pointer;
}

/* Day Number */
.day-number {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary-gray);
    display: inline-block;
    margin-bottom: 0.25rem;
}

.today-number {
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Day Events */
.day-events {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 0.25rem;
}

.day-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.more-events {
    font-size: 0.625rem;
    color: var(--text-muted);
    padding-left: 2px;
}

/* Sidebar */
.calendar-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Deadline Item */
.deadline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.deadline-item:last-child {
    border-bottom: none;
}

.deadline-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.deadline-info strong {
    font-size: 0.875rem;
    color: var(--primary-navy);
}

.deadline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.deadline-days {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Activity Stats */
.activity-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

/* Compliance Summary */
.compliance-summary {
    padding: 0.5rem 0;
}

.progress-bar-container {
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

/* Text Utilities */
.text-muted {
    color: var(--text-muted);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-success {
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }

    .day-events {
        display: none;
    }

    .calendar-day-header {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .day-number {
        font-size: 0.75rem;
    }

    .today-number {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    .calendar-legend {
        display: none;
    }
}

/* Dark Mode Adjustments */
[data-theme-mode="dark"] .calendar-day {
    border-color: var(--border-color);
}

[data-theme-mode="dark"] .calendar-day:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme-mode="dark"] .calendar-day.today {
    background: rgba(0, 119, 182, 0.15);
}

[data-theme-mode="dark"] .day-number {
    color: var(--primary-gray);
}
