/* Date Difference Calculator - Visual Calendar Styles */

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Month Calendar */
.month-calendar {
    background: var(--bs-body-bg);
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid var(--bs-border-color);
}

.month-header {
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: var(--bs-primary);
    font-size: 1rem;
}

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

/* Day Header */
.day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--bs-secondary);
    padding: 0.25rem;
    background: var(--bs-secondary-bg);
    border-radius: 3px;
}

/* Day Cell */
.day-cell {
    text-align: center;
    padding: 0.5rem;
    border-radius: 3px;
    position: relative;
    font-size: 0.875rem;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.day-cell:not(.empty):hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.day-cell.empty {
    background: transparent;
}

/* Date Range Styles */
.day-cell.start-date {
    background: #052c65;
    color: white;
    font-weight: bold;
}

.day-cell.end-date {
    background: #198754;
    color: white;
    font-weight: bold;
}

.day-cell.in-range {
    background: rgba(5, 44, 101, 0.2);
}

.day-cell.in-range.weekend {
    background: rgba(255, 193, 7, 0.3);
}

.day-cell.weekend:not(.in-range):not(.start-date):not(.end-date) {
    background: rgba(108, 117, 125, 0.1);
}

/* Calendar Legend */
.calendar-legend {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    font-size: 0.875rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-color.start {
    background: #052c65;
}

.legend-color.end {
    background: #198754;
}

.legend-color.range {
    background: rgba(5, 44, 101, 0.2);
}

.legend-color.weekend {
    background: rgba(255, 193, 7, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .month-calendar {
        padding: 0.5rem;
    }

    .day-cell {
        padding: 0.35rem;
        font-size: 0.75rem;
        min-height: 28px;
    }

    .month-header {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .calendar-legend {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .legend-color {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 576px) {
    .day-cell {
        padding: 0.25rem;
        font-size: 0.7rem;
        min-height: 24px;
    }

    .day-header {
        font-size: 0.65rem;
        padding: 0.2rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .month-calendar {
        border-color: rgba(255, 255, 255, 0.1);
    }

    .day-header {
        background: rgba(255, 255, 255, 0.05);
    }

    .day-cell:not(.empty):hover {
        box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
    }
}

/* Animation for calendar appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.month-calendar {
    animation: fadeInUp 0.3s ease-out;
}

.month-calendar:nth-child(1) { animation-delay: 0s; }
.month-calendar:nth-child(2) { animation-delay: 0.05s; }
.month-calendar:nth-child(3) { animation-delay: 0.1s; }
.month-calendar:nth-child(4) { animation-delay: 0.15s; }
.month-calendar:nth-child(5) { animation-delay: 0.2s; }
.month-calendar:nth-child(6) { animation-delay: 0.25s; }
