﻿/* =========================================================
   KALENDER TOOLBAR
   ========================================================= */

.calendar-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-current-month {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    text-transform: capitalize;
    color: #ffffff;
}

.calendar-filter {
    display: flex;
    justify-content: flex-end;
}

    .calendar-filter .mud-input-control {
        width: 260px;
    }


/* =========================================================
   LEGENDE
   ========================================================= */

.calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    margin: 0 0 16px 0;
    padding: 0 4px;
    color: #a9bdd6;
    font-size: 13px;
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
}

.calendar-legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.calendar-dot-holiday {
    background: #ef5350;
}

.calendar-dot-vacation {
    background: #42a5f5;
}

.calendar-dot-sick {
    background: #ffa726;
}

.calendar-dot-today {
    background: #4ade80;
}


/* =========================================================
   KALENDER CONTAINER
   ========================================================= */

.calendar-container {
    width: 100%;
    overflow: hidden;
    background: #0e1a2d !important;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
}


/* =========================================================
   WOCHENTAGE
   ========================================================= */

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #132239;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

    .calendar-weekdays > div {
        padding: 14px 10px;
        color: #91a8c5;
        font-size: 11px;
        font-weight: 700;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }


/* =========================================================
   KALENDER GRID
   ========================================================= */

.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100%;
}


/* =========================================================
   EINZELNER TAG
   ========================================================= */

.calendar-day {
    position: relative;
    min-width: 0;
    min-height: 135px;
    padding: 10px;
    background: #0e1a2d;
    border-right: 1px solid rgba(148, 163, 184, 0.11);
    border-bottom: 1px solid rgba(148, 163, 184, 0.11);
    color: #dce8f7;
    transition: background 0.15s ease, border-color 0.15s ease;
}

    .calendar-day:nth-child(7n) {
        border-right: none;
    }

    .calendar-day:hover {
        background: #13233a;
    }

.calendar-day-other-month {
    background: #0a1423;
    opacity: 0.45;
}

.calendar-day-weekend {
    background: #0b1728;
}


/* =========================================================
   HEUTE
   ========================================================= */

.calendar-day-today {
    background: rgba(37, 99, 235, 0.08);
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.7);
}


/* =========================================================
   TAG HEADER
   ========================================================= */

.calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}

.calendar-day-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #dce8f7;
}

.calendar-day-today .calendar-day-number {
    background: #3b82f6;
    color: #ffffff;
}

.calendar-today-label {
    color: #60a5fa;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* =========================================================
   EVENTS
   ========================================================= */

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.calendar-event {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 6px 7px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
}

    .calendar-event span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .calendar-event .mud-icon-root {
        flex-shrink: 0;
    }


/* =========================================================
   FEIERTAG
   ========================================================= */

.calendar-event-holiday {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.13);
    border-left: 3px solid #ef4444;
}


/* =========================================================
   URLAUB
   ========================================================= */

.calendar-event-vacation {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.13);
    border-left: 3px solid #3b82f6;
}


/* =========================================================
   KRANK
   ========================================================= */

.calendar-event-sick {
    color: #fdba74;
    background: rgba(249, 115, 22, 0.13);
    border-left: 3px solid #f97316;
}


/* =========================================================
   LOADING
   ========================================================= */

.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
/* =========================================================
   ERFASSUNGSPANEL
   ========================================================= */

.calendar-entry-panel {
    overflow: hidden;
    background: #101d31 !important;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
}

.calendar-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
}

.calendar-entry-content {
    padding: 20px;
}

.calendar-entry-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}


/* =========================================================
   KALENDERTAG
   ========================================================= */

.calendar-day {
    cursor: pointer;
}


/* =========================================================
   URLAUB BEANTRAGT
   ========================================================= */

.calendar-event-vacation-pending {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 6px 7px;
    border-radius: 5px;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.13);
    border-left: 3px solid #8b5cf6;
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
}

    .calendar-event-vacation-pending span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.calendar-dot-pending {
    background: #8b5cf6;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .calendar-day {
        min-height: 115px;
    }

    .calendar-toolbar {
        grid-template-columns: 1fr;
    }

    .calendar-navigation,
    .calendar-filter {
        justify-content: center;
    }

    .calendar-current-month {
        order: -1;
    }
}


@media (max-width: 750px) {

    .calendar-container {
        overflow-x: auto;
    }

    .calendar-weekdays,
    .calendar-grid {
        min-width: 850px;
    }
}
