/* Calendar Generator Styles */

/* Preview Container */
.calendar-preview {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.calendar-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Calendar Table */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.calendar-header {
    text-align: center;
    padding: 20px 10px;
    margin-bottom: 20px;
}

.calendar-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--calendar-primary, #052c65);
}

.calendar-subtitle {
    font-size: 16px;
    color: var(--bs-secondary-color);
    margin: 0;
}

/* Calendar Grid */
.calendar-table th {
    background: var(--calendar-primary, #052c65);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.calendar-table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    height: 80px;
    vertical-align: top;
    text-align: left;
    background: white;
    position: relative;
}

.calendar-table td.week-number {
    background: #f8f9fa;
    text-align: center;
    vertical-align: middle;
    font-weight: 600;
    color: var(--bs-secondary-color);
    font-size: 12px;
    width: 40px;
}

.calendar-table td.empty {
    background: #f8f9fa;
}

.calendar-table td.today {
    background: var(--calendar-light, rgba(5, 44, 101, 0.1));
}

.calendar-table td.weekend {
    background: #f8f9fa;
}

.calendar-table td.holiday {
    background: var(--calendar-holiday, rgba(220, 53, 69, 0.1));
}

/* Date Number */
.date-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--bs-body-color);
    margin-bottom: 4px;
}

.weekend .date-number {
    color: var(--calendar-primary, #052c65);
}

.holiday .date-number {
    color: #dc3545;
}

.today .date-number {
    color: var(--calendar-primary, #052c65);
    background: var(--calendar-primary, #052c65);
    color: white;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Holiday Label */
.holiday-label {
    font-size: 10px;
    color: #dc3545;
    font-weight: 600;
    margin-top: 2px;
}

/* Notes Section */
.calendar-notes {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 10px;
}

.calendar-notes h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--calendar-primary, #052c65);
}

.calendar-notes p {
    font-size: 12px;
    margin: 0;
    white-space: pre-wrap;
}

/* Yearly Layout */
.calendar-yearly {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.calendar-yearly .calendar-month {
    break-inside: avoid;
}

.calendar-yearly .calendar-table td {
    height: auto;
    padding: 4px;
    font-size: 11px;
}

.calendar-yearly .date-number {
    font-size: 13px;
}

.calendar-yearly .calendar-title {
    font-size: 16px;
    margin-bottom: 4px;
}

.calendar-yearly th {
    padding: 6px 4px;
    font-size: 11px;
}

/* Font Sizes */
.font-small .calendar-title { font-size: 24px; }
.font-small .calendar-table th { font-size: 12px; padding: 8px 6px; }
.font-small .calendar-table td { padding: 6px; height: 70px; }
.font-small .date-number { font-size: 14px; }

.font-large .calendar-title { font-size: 32px; }
.font-large .calendar-table th { font-size: 16px; padding: 14px 10px; }
.font-large .calendar-table td { padding: 10px; height: 90px; }
.font-large .date-number { font-size: 18px; }

/* Color Schemes */
.color-blue {
    --calendar-primary: #052c65;
    --calendar-light: rgba(5, 44, 101, 0.1);
    --calendar-holiday: rgba(220, 53, 69, 0.1);
}

.color-green {
    --calendar-primary: #198754;
    --calendar-light: rgba(25, 135, 84, 0.1);
    --calendar-holiday: rgba(220, 53, 69, 0.1);
}

.color-red {
    --calendar-primary: #dc3545;
    --calendar-light: rgba(220, 53, 69, 0.1);
    --calendar-holiday: rgba(220, 53, 69, 0.2);
}

.color-purple {
    --calendar-primary: #6f42c1;
    --calendar-light: rgba(111, 66, 193, 0.1);
    --calendar-holiday: rgba(220, 53, 69, 0.1);
}

.color-orange {
    --calendar-primary: #fd7e14;
    --calendar-light: rgba(253, 126, 20, 0.1);
    --calendar-holiday: rgba(220, 53, 69, 0.1);
}

.color-gray {
    --calendar-primary: #495057;
    --calendar-light: rgba(73, 80, 87, 0.1);
    --calendar-holiday: rgba(108, 117, 125, 0.1);
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .calendar-preview,
    .calendar-preview * {
        visibility: visible;
    }
    
    .calendar-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        padding: 0;
    }
    
    .calendar-table {
        page-break-inside: avoid;
    }
    
    .calendar-yearly .calendar-month {
        page-break-inside: avoid;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-yearly {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .calendar-table td {
        height: 60px;
        padding: 6px;
    }
    
    .date-number {
        font-size: 14px;
    }
    
    .calendar-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .calendar-yearly {
        grid-template-columns: 1fr;
    }
    
    .calendar-preview {
        padding: 10px;
    }
    
    .calendar-table th {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    .calendar-table td {
        padding: 4px;
        height: 50px;
    }
    
    .date-number {
        font-size: 12px;
    }
}

/* Dark Mode */
[data-bs-theme="dark"] .calendar-preview {
    background: #1a1d23;
}

[data-bs-theme="dark"] .calendar-table td {
    background: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .calendar-table td.empty {
    background: #343a40;
}

[data-bs-theme="dark"] .calendar-table td.weekend {
    background: #2d3239;
}

[data-bs-theme="dark"] .calendar-notes {
    background: #343a40;
}

[data-bs-theme="dark"] .calendar-table td.week-number {
    background: #343a40;
}