/* ===== SIDEBAR KALENDER ===== */

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.cal-header {
    margin-bottom: 2px;
}

.cal-head {
    text-align: center;
    font-size: .65rem;
    font-weight: 700;
    color: #888;
    padding: 2px 0;
}

.cal-cell {
    position: relative;
    text-align: center;
    padding: 2px 0;
    font-size: .75rem;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-day-plain {
    color: #555;
}

.cal-today .cal-day-plain,
.cal-today .cal-day-link {
    background: #0d6efd;
    color: #fff !important;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.cal-has-event {
    /* Tag mit Event */
}

/* Event-Tag Link */
.cal-event-dot {
    color: #dc3545;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.3);
    transition: background .2s;
}

.cal-event-dot:hover {
    background: rgba(220, 53, 69, 0.25);
    color: #dc3545;
}

/* CSS Tooltip */
.cal-tooltip-wrap {
    position: relative;
    display: inline-block;
}

.cal-tooltip {
    display: none;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: .72rem;
    white-space: nowrap;
    z-index: 999;
    min-width: 140px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.cal-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.cal-tooltip-wrap:hover .cal-tooltip {
    display: block;
}

/* Modal Overlay */
.cal-modal-open .cal-modal-box {
    display: block;
}

.cal-modal {
    display: none;
}

.cal-modal-open {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    max-width: 380px;
    width: 90%;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

.cal-modal-close {
    position: absolute;
    top: .5rem;
    right: .75rem;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    text-decoration: none;
    font-weight: 700;
}

.cal-modal-close:hover {
    color: #000;
}

/* Legende */
.cal-empty {
    /* leer */
}
