:root {
    --holiday-color: #dc3545;
    --restricted-color: #0d6efd;
}
[data-bs-theme="dark"] {
    --holiday-color: #ffc107;
    --restricted-color: #20c997;
}

.calendar-wrapper {
    margin-top: 0;
    border: 1px solid var(--bs-border-color);
    border-radius: 5px;
    overflow: hidden;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background-color: var(--bs-border-color);
}
.grid-header {
    background-color: var(--bs-tertiary-bg);
    text-align: center;
    font-weight: bold;
    padding: 10px 0;
    font-size: 0.9rem;
}

.calendar-cell {
    background-color: var(--bs-body-bg);
    min-height: 80px;
    padding: 4px;
    position: relative;
    font-size: 0.85rem;
    cursor: pointer;
    transition: filter 0.2s ease;
    overflow: hidden;
}
.calendar-cell:hover {
    filter: brightness(0.95);
}
[data-bs-theme="dark"] .calendar-cell:hover {
    filter: brightness(1.2);
}
@media (min-width: 768px) {
    .calendar-cell {
        min-height: 120px;
        padding: 8px;
        font-size: 1rem;
    }
}

.holiday-cell {
    background-color: rgba(220, 53, 69, 0.1) !important;
}
.restricted-cell {
    background-color: rgba(13, 110, 253, 0.1) !important;
}
.today-cell {
    border: 2px solid #198754 !important;
    box-shadow: inset 0 0 8px rgba(25, 135, 84, 0.2);
    z-index: 1;
}
.today-cell .date-number {
    color: #198754;
    font-size: 1.1rem;
}

.holiday-text {
    color: var(--holiday-color) !important;
}
.restricted-text {
    color: var(--restricted-color) !important;
}

.date-number {
    font-weight: bold;
    margin-bottom: 2px;
    display: inline-block;
}
.event-badge {
    display: block;
    padding: 3px 6px;
    margin-top: 3px;
    border-radius: 4px;
    color: white !important;
    font-size: 0.75rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sys-event,
.sys-rest {
    font-size: 0.7rem;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    word-break: break-word;
}
.sys-event {
    color: var(--holiday-color);
}
.sys-rest {
    color: var(--restricted-color);
}
.dimmed {
    opacity: 0.2;
}

.year-view-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    display: none;
}
@media (min-width: 768px) {
    .year-view-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.mini-calendar {
    border: 1px solid var(--bs-border-color);
    border-radius: 5px;
    overflow: hidden;
    background: var(--bs-body-bg);
}
.mini-header {
    background-color: #0d6efd;
    color: white;
    text-align: center;
    padding: 5px;
    font-weight: bold;
    cursor: pointer;
}
.mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
}
.mini-cell {
    padding: 5px;
    border-bottom: 1px solid var(--bs-border-color);
}
.mini-day-header {
    font-weight: bold;
    background: var(--bs-tertiary-bg);
    font-size: 0.75rem;
}

.cursor-pointer {
    cursor: pointer;
}
.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}
.color-swatch-red { background-color: #dc3545; }
.color-swatch-black { background-color: #000000; }
.color-swatch-blue { background-color: #0d6efd; }
.color-swatch-yellow { background-color: #ffc107; }
.color-swatch-gray { background-color: #6c757d; }
.color-swatch-green { background-color: #198754; }

.preset-badge {
    color: white;
}
.preset-blue { background-color: #0d6efd; }
.preset-green { background-color: #198754; }
.preset-teal { background-color: #20c997; }
.preset-pink { background-color: #d63384; }
.preset-gray { background-color: #6c757d; }
.preset-red { background-color: #dc3545; }
.preset-yellow { background-color: #ffc107; }

.add-event-fab {
    width: 50px;
    height: 50px;
    line-height: 1;
    font-size: 1.5rem;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.preset-dot,
.event-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.event-dot-large {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}
.small-caption {
    font-size: 0.75rem;
}
.mini-cell-holiday {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--holiday-color);
    font-weight: bold;
}
.mini-cell-restricted {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--restricted-color);
}
.mini-cell-today {
    border: 2px solid #198754;
    border-radius: 3px;
}
.mini-cell-has-event {
    border-bottom: 3px solid #4285F4;
    cursor: pointer;
}
.event-hidden {
    opacity: 0.5;
    text-decoration: line-through;
}
