/* ==========================================================
   KURSPORTAL
   Kalender
========================================================== */
/* ==========================================================
   WRAPPER
========================================================== */
.calendar-container {
    position: relative;
}
.calendar-page {
    max-width: 1200px;
    margin: 0 auto;
}
.calendar-card {
    padding: 28px;
    border:
        1px solid #e9ecef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow:
        0 2px 5px rgba(0, 0, 0, .02),
        0 15px 40px rgba(0, 0, 0, .06);
}
/* ==========================================================
   HEADER
========================================================== */
.calendar-head {
    margin-bottom: 24px;
}
.calendar-head h1 {
    margin: 0;
    color: #212529;
    font-size:
        clamp(1.45rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.03em;
}
.calendar-head p {
    margin:
        7px 0 0;
    color: #6c757d;
    font-size: .95rem;
    line-height: 1.55;
}
/* ==========================================================
   SUCHE
========================================================== */
.calendar-search-wrapper {
    position: relative;
    margin-bottom: 18px;
}
.calendar-search-box {
    position: relative;
}
.calendar-search-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    z-index: 2;
    color: #868e96;
    pointer-events: none;
    transform:
        translateY(-50%);
}
#calendarSearch {
    height: 52px;
    padding-left: 46px;
    padding-right: 46px;
    border:
        1px solid #dee2e6;
    border-radius: 14px;
    background: #f8f9fa;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}
#calendarSearch:hover {
    border-color: #ced4da;
}
#calendarSearch:focus {
    border-color: #adb5bd;
    background: #ffffff;
    box-shadow:
        0 0 0 4px
        rgba(33, 37, 41, .05);
}
/* ==========================================================
   SUCHE LÖSCHEN
========================================================== */
.calendar-search-clear {
    position: absolute;
    top: 50%;
    right: 11px;
    display: none;
    width: 32px;
    height: 32px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #868e96;
    cursor: pointer;
    transform:
        translateY(-50%);
    transition:
        background-color .15s ease,
        color .15s ease;
}
.calendar-search-clear:hover,
.calendar-search-clear:focus {
    background: #e9ecef;
    color: #212529;
}
.calendar-search-clear:focus-visible {
    outline:
        2px solid #0d6efd;
    outline-offset: 2px;
}
/* ==========================================================
   SUCHERGEBNISSE
========================================================== */
#searchResults {
    position: absolute;
    top:
        calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 1000;
    display: none;
    max-height: 360px;
    overflow-y: auto;
    border:
        1px solid #e9ecef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, .12);
}
#searchResults .list-group-item {
    padding:
        13px 16px;
    border-right: 0;
    border-left: 0;
    transition:
        background-color .15s ease;
}
#searchResults .list-group-item:first-child {
    border-top: 0;
}
#searchResults .list-group-item:last-child {
    border-bottom: 0;
}
#searchResults .list-group-item:hover,
#searchResults .list-group-item:focus {
    background: #f8f9fa;
}
/* ==========================================================
   LEGENDE
========================================================== */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding:
        6px 10px;
    border-radius: 999px;
    background: #f8f9fa;
    color: #495057;
    font-size: .8rem;
    white-space: nowrap;
}
.calendar-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex:
        0 0 8px;
    border-radius: 50%;
}
.legend-green {
    background: #198754;
}
.legend-red {
    background: #dc3545;
}
.legend-gray {
    background: #6c757d;
}
/* ==========================================================
   FULLCALENDAR
========================================================== */
#calendar {
    min-height: 450px;
}
.fc {
    --fc-border-color: #edf0f2;
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: #f8f9fa;
    --fc-today-bg-color: rgba(25, 135, 84, .05);
    font-family: inherit;
}
/* ==========================================================
   KALENDERRAHMEN
========================================================== */
.fc .fc-scrollgrid {
    overflow: hidden;
    border:
        1px solid #edf0f2 !important;
    border-radius: 14px;
}
/* ==========================================================
   TOOLBAR
========================================================== */
.fc .fc-toolbar {
    gap: 12px;
    margin-bottom:
        18px !important;
}
.fc .fc-toolbar-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.fc .fc-button {
    padding:
        .48rem .75rem !important;
    border:
        1px solid #dee2e6 !important;
    border-radius:
        9px !important;
    background:
        #ffffff !important;
    color:
        #343a40 !important;
    box-shadow:
        none !important;
    font-size:
        .84rem !important;
    font-weight:
        500 !important;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        transform .15s ease;
}
.fc .fc-button:hover {
    border-color:
        #ced4da !important;
    background:
        #f8f9fa !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active {
    border-color:
        #212529 !important;
    background:
        #212529 !important;
    color:
        #ffffff !important;
}
.fc .fc-button:focus {
    box-shadow:
        0 0 0 3px
        rgba(33, 37, 41, .08)
        !important;
}
/* ==========================================================
   WOCHENTAGE
========================================================== */
.fc .fc-col-header-cell {
    background: #fafafa;
}
.fc .fc-col-header-cell-cushion {
    padding:
        12px 5px;
    color: #868e96;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-decoration: none;
    text-transform: uppercase;
}
/* ==========================================================
   TAGE
========================================================== */
.fc .fc-daygrid-day-number {
    padding: 8px;
    color: #495057;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
}
/* ==========================================================
   HEUTIGER TAG
========================================================== */
.fc .fc-day-today .fc-daygrid-day-number {
    display: inline-flex;
    width: 28px;
    height: 28px;
    margin: 4px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #212529;
    color: #ffffff;
}
/* ==========================================================
   EVENTS
========================================================== */
.fc .fc-daygrid-event {
    margin:
        2px 4px;
    padding:
        4px 7px;
    border:
        0 !important;
    border-radius:
        7px !important;
    font-size: .75rem;
    cursor: pointer;
    transition:
        transform .15s ease,
        box-shadow .15s ease;
}
.fc .fc-daygrid-event:hover {
    transform:
        translateY(-1px);
    box-shadow:
        0 4px 10px
        rgba(0, 0, 0, .14);
}
.fc .fc-event-title {
    font-weight: 600;
}
/* ==========================================================
   LISTENANSICHT
========================================================== */
.fc .fc-list {
    border:
        0 !important;
}
.fc .fc-list-table {
    border-collapse: separate;
    border-spacing: 0;
}
.fc .fc-list-day-cushion {
    padding:
        10px 14px !important;
    background:
        #f8f9fa !important;
    font-size: .83rem;
    font-weight: 600;
}
.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
    color: #495057;
    text-decoration: none;
}
.fc .fc-list-event {
    cursor: pointer;
}
.fc .fc-list-event td {
    padding-top:
        14px !important;
    padding-bottom:
        14px !important;
}
.fc .fc-list-event:hover td {
    background:
        #f8f9fa !important;
}
.fc .fc-list-event-title a {
    color:
        #212529 !important;
    font-weight: 600;
    text-decoration: none;
}
/* ==========================================================
   NÄCHSTE KURSE
========================================================== */
.calendar-upcoming {
    padding-top: 28px;
    border-top:
        1px solid #edf0f2;
}
.upcoming-course {
    display: flex;
    min-height: 82px;
    align-items: center;
    gap: 14px;
    padding:
        12px 15px;
    border:
        1px solid #e9ecef;
    border-radius: 14px;
    background: #ffffff;
    color: #212529;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        border-color .15s ease;
}
.upcoming-course:hover,
.upcoming-course:focus {
    border-color: #ced4da;
    color: #212529;
    transform:
        translateY(-2px);
    box-shadow:
        0 8px 20px
        rgba(0, 0, 0, .06);
}
.upcoming-course:focus-visible {
    outline:
        2px solid #0d6efd;
    outline-offset: 2px;
}
/* ==========================================================
   DATUM
========================================================== */
.upcoming-date {
    display: flex;
    min-height: 56px;
    flex:
        0 0 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f3f5f4;
}
.upcoming-day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}
.upcoming-month {
    margin-top: 4px;
    color: #6c757d;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
}
/* ==========================================================
   KURSINHALT
========================================================== */
.upcoming-content {
    min-width: 0;
    flex: 1;
}
.upcoming-title {
    overflow: hidden;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
}
.upcoming-meta {
    margin-top: 4px;
    color: #868e96;
    font-size: .76rem;
}
.upcoming-course > .bi {
    flex-shrink: 0;
    color: #adb5bd;
    font-size: .8rem;
}
/* ==========================================================
   TABLET / MOBILE
========================================================== */
@media (max-width: 767.98px) {
    .calendar-container {
        padding-right:
            12px !important;
        padding-left:
            12px !important;
    }
    .calendar-card {
        padding:
            17px 12px;
        border-radius: 17px;
        box-shadow:
            0 5px 20px
            rgba(0, 0, 0, .05);
    }
    /* ======================================================
       HEADER
    ====================================================== */
    .calendar-head {
        margin-bottom: 18px;
    }
    .calendar-head h1 {
        font-size: 1.45rem;
    }
    .calendar-head p {
        font-size: .88rem;
    }
    /* ======================================================
       SUCHE
    ====================================================== */
    #calendarSearch {
        height: 48px;
        /*
         * 16px verhindert bei iOS typischerweise
         * automatisches Hineinzoomen beim Fokus.
         */
        font-size: 16px;
    }
    /* ======================================================
       LEGENDE
    ====================================================== */
    .calendar-legend {
        gap: 6px;
        margin-bottom: 16px;
    }
    .calendar-legend-item {
        padding:
            5px 8px;
        font-size: .75rem;
    }
    /* ======================================================
       FULLCALENDAR TOOLBAR
    ====================================================== */
    .fc .fc-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .fc .fc-toolbar-chunk:nth-child(1) {
        order: 2;
    }
    .fc .fc-toolbar-chunk:nth-child(2) {
        width: 100%;
        order: 1;
        margin-bottom: 4px;
        text-align: center;
    }
    .fc .fc-toolbar-chunk:nth-child(3) {
        order: 3;
        margin-left: auto;
    }
    .fc .fc-toolbar-title {
        font-size: 1.08rem;
    }
    .fc .fc-button {
        padding:
            .42rem .62rem !important;
        font-size:
            .78rem !important;
    }
    /* ======================================================
       LISTENANSICHT
    ====================================================== */
    .fc .fc-list-day-cushion {
        padding:
            9px 10px !important;
    }
    .fc .fc-list-event td {
        padding-top:
            14px !important;
        padding-bottom:
            14px !important;
    }
    .fc .fc-list-event-title {
        padding-right:
            8px !important;
    }
    .fc .fc-list-event-title a {
        font-size: .91rem;
    }
    /* ======================================================
       NÄCHSTE KURSE
    ====================================================== */
    .calendar-upcoming {
        padding-top: 23px;
    }
}
/* ==========================================================
   SEHR KLEINE HANDYS
========================================================== */
@media (max-width: 420px) {
    .calendar-card {
        padding:
            14px 9px;
    }
    .calendar-head h1 {
        font-size: 1.3rem;
    }
    .fc .fc-toolbar-title {
        font-size: 1rem;
    }
    .calendar-legend-item {
        font-size: .72rem;
    }
    .upcoming-course {
        gap: 10px;
        padding:
            10px 11px;
    }
    .upcoming-date {
        flex-basis: 48px;
        min-height: 52px;
    }
    .upcoming-day {
        font-size: 1.15rem;
    }
}
/* ==========================================================
   REDUCED MOTION
========================================================== */
@media (prefers-reduced-motion: reduce) {
    .fc .fc-daygrid-event,
    .upcoming-course,
    .calendar-search-clear {
        transition: none;
    }
    .fc .fc-daygrid-event:hover,
    .upcoming-course:hover {
        transform: none;
    }
}