



/* Standard Layout (groß und sehr klein): Bild unten */
a.jh-calendar-event-item {
    display: block;
    background:white;
    text-decoration: none;
    transition: background-color 0.2s ease;
    padding: 10px 10px 7px 10px;
    position: relative;
}

a.jh-calendar-event-item * {
    color: #444;
    z-index: 2;
}

a.jh-calendar-event-item:hover {    
    background-color: #eee;
    text-decoration: none;
}

.jh-calendar-event-day {
    display:block;
}
.jh-calendar-event-date {
    display: block;
    font-size: 0.9rem;
    line-height: 120%;
    color: #444;
    margin-top:6px;
}

.jh-calendar-event-location {
    display: block;
    font-size: 0.8rem;
    line-height: 120%;
    color: #555 !important;
    margin-top:3px;
}

.jh-calendar-event-title {
    margin-top:10px;
    display: inline-block;
    padding:3px 8px;
    color: #fff !important;
    font-weight: bold;
    word-break: break-all;
    overflow-wrap: anywhere;
}

td.jh-calendar-has-event:hover .jh-calendar-event-item * {
    text-decoration: none;
    color: #444; /* Textfarbe bei Hover angepasst */
}

/* Kalender-Monatsübersicht */
.jh-calendar {
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
}

/* Kalendertabelle */
.jh-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.jh-calendar-month {
    text-align: left;
    font-weight: bold;
}

.jh-calendar-nav {
    text-align: right !important;
    white-space: nowrap;
}

.jh-calendar-prev,
.jh-calendar-next {
    display: inline-block;
    padding: 5px 10px;
    color: #444;
    text-decoration: none;
    border-radius: 4px;
}
.jh-calendar-prev:hover,
.jh-calendar-next:hover {
    color:white;
    text-decoration: none;
    background:#444;
}

.jh-calendar-dropdown {
    display: inline-block;
    margin: 5px 5px;
}

.jh-calendar-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.jh-calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Fixe Breite für Zellen */
    margin-top: 10px;
}

.jh-calendar-table th, 
.jh-calendar-table td {
    text-align: left;
    padding: 10px;
    vertical-align: top;
    border: 1px solid #ddd;
    width: 14.2857% !important; /* Gleiche Breite für alle Spalten (100% / 7) */
    box-sizing: border-box;
}

.td-inner {
    min-height: 100px;
}


.jh-calendar-table thead th {
    background-color: #f6f6f6;
    font-weight: bold;
}

/* Tage des vorherigen Monats */
.jh-calendar-prev-month {
    color: #aaa;
    background-color: #f6f6f6;
}

.jh-calendar-day {
    font-weight: bold;
    margin-bottom: 5px;
}

.jh-calendar .jh-calendar-event-item {
    margin: 0 -10px -10px -10px;
    border-radius: 0;
}

.jh-calendar .jh-calendar-event-container {
    padding: 10px;
}

td.jh-calendar-has-event .td-inner > span {
    font-weight:bold;
}

td.jh-calendar-today {
    border:2px solid #999;
    border-radius:2px;
}

@media (min-width: 768px) {
    .jh-calendar .jh-calendar-event-container {
        padding-top: 4px;
    }
}

/* Responsive Design - Tabelle zu Blöcken transformieren */
@media (max-width: 767.98px) {

    /* Nur Zellen mit Terminen anzeigen */
    .jh-calendar-table td:not(.jh-calendar-has-event) {
        display: none;
    }
    
    /* Tage vom Vormonat ausblenden */
    .jh-calendar-prev-month {
        display: none !important;
    }
    
    /* Horizontale Linien zwischen Terminen */
    .jh-calendar-table td.jh-calendar-has-event {
        border:none;
        border-top: 1px solid #ccc;
    }
    .jh-calendar-table {
        border-bottom: 1px solid #ccc;
    }
    
    /* Tageszahl ausblenden bei Event */
    .jh-calendar-has-event > div:not(.td-inner) {
        display: none;
    }

    .jh-calendar-table thead {
        display: none;
    }

    /* Tabelle und ihre Elemente in Block-Elemente umwandeln */
    .jh-calendar-table,
    .jh-calendar-table theader,
    .jh-calendar-table tbody,
    .jh-calendar-table tr,
    .jh-calendar-table th,
    .jh-calendar-table td {
        display: block;
        width: 100% !important;
    }

    .jh-calendar-table td {
        margin-bottom: 5px;
        min-height: 50px;
    }
    
    /* Datumsformat in der Mobilansicht */
    .jh-calendar-day {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
}

@media (max-width: 479.98px) {

    .jh-calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .jh-calendar-nav {
        align-self: flex-end;
        text-align: right;
        margin-top: 10px;
    }
}