body {
    background-color: skyblue;
}

/* Ereignis Drag & Drop Visualisierung */
.ereignis-drop-zone {
    min-height: 100px;
    border-radius: 4px;
}

.ereignis-drop-zone-column {
    min-height: 200px;
}

/* Visuelle Hinweise für gesamte Spalte */
.ereignis-drop-zone-column.drag-active {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-color: rgba(0, 123, 255, 0.5) !important;
}

.ereignis-drop-zone-column.drag-over {
    background-color: rgba(0, 123, 255, 0.15) !important;
    border: 2px solid rgba(0, 123, 255, 0.7) !important;
}

.ereignis-drop-zone-column.drop-success {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border: 2px solid rgba(40, 167, 69, 0.7) !important;
}

/* Visuelle Hinweise für Drop-Zone */
.ereignis-drop-zone.drag-active {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border: 2px dashed rgba(0, 123, 255, 0.5);
}

.ereignis-drop-zone.drag-over {
    background-color: rgba(0, 123, 255, 0.15) !important;
    border: 2px solid rgba(0, 123, 255, 0.7);
}

.ereignis-drop-zone.drop-success {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border: 2px solid rgba(40, 167, 69, 0.7);
}

.ereignis-ghost {
    opacity: 0.4;
    background-color: rgba(0, 123, 255, 0.2);
}

.ereignis-chosen {
    cursor: grabbing;
    transform: rotate(2deg);
}

.ereignis-drag {
    opacity: 0.8;
}

/* Responsive Tabellen als Karten */
@media (max-width: 768px) {
    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 0.75rem;
        box-shadow: 0 4px 12px rgba(15, 34, 58, 0.08);
        overflow: hidden;
    }

    .table-mobile-cards tbody tr:last-child {
        margin-bottom: 0;
    }

    .table-mobile-cards tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .table-mobile-cards tbody tr td:last-child {
        border-bottom: none;
    }

    .table-mobile-cards tbody tr td::before {
        content: attr(data-label);
        flex: 0 0 45%;
        font-weight: 600;
        text-transform: uppercase;
        color: #6c757d;
        margin-right: 0.5rem;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }

    .table-mobile-cards tbody tr td[data-label="Aktionen"] {
        justify-content: center;
    }

    .table-mobile-cards tbody tr td .btn-group {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
}

/* Ereignis-Formular: Anhänge (Pinterest-ähnliches Masonry per CSS-Spalten).
   Wichtig: Kein display:inline-block auf .ereignis-attachment-item — das bricht column-count
   und lässt Kacheln untereinander stapeln (Bootstrap d-inline-block nutzt !important). */
.ereignis-attachments-masonry {
    width: 100%;
    min-width: 0;
    column-count: 2;
    column-gap: 0.65rem;
}

@media (min-width: 576px) {
    .ereignis-attachments-masonry {
        column-count: 3;
    }
}

@media (min-width: 992px) {
    .ereignis-attachments-masonry {
        column-count: 4;
    }
}

/* Volle Ereignis-Edit-Seite: etwas luftiger auf großen Screens */
@media (min-width: 1200px) {
    .ereignis-attachments-masonry:not(.ereignis-attachments-masonry--compact) {
        column-count: 5;
    }
}

/* Modal: schmaler Viewport — max. 3 Spalten, wirkt „Pinterest“ ohne Mini-Thumbnails */
.ereignis-attachments-masonry--compact {
    column-count: 2;
}

@media (min-width: 400px) {
    .ereignis-attachments-masonry--compact {
        column-count: 3;
    }
}

.ereignis-attachments-masonry .ereignis-attachment-item {
    display: block;
    width: 100%;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 0.65rem;
}

.ereignis-attachments-masonry .ereignis-attachment-tile {
    display: block;
    border-radius: 0.4rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-body-bg, #fff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ereignis-attachments-masonry .ereignis-attachment-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ereignis-attachments-masonry .ereignis-attachment-tile img {
    width: 100%;
    height: auto;
    vertical-align: middle;
    display: block;
    object-fit: cover;
}

.ereignis-attachments-masonry .ereignis-attachment-tile .ereignis-attachment-tile-caption {
    display: block;
    padding: 0.35rem 0.45rem;
    font-size: 0.7rem;
    line-height: 1.25;
    color: var(--bs-secondary, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ereignis-edit-cover-current {
    max-height: 200px;
    width: 100%;
    object-fit: contain;
}

/* Plan-Titel: doppelt so groß (relativ zum Kontext) und fett */
.kanban-plan-page-title {
    font-weight: 700;
    font-size: calc(2 * 1.375rem);
    line-height: 1.15;
}

.kanban-plan-name-title {
    font-weight: 700;
    font-size: 2em;
    line-height: 1.2;
}

.ereignis-cover-drop-zone--hover {
    border-color: var(--bs-primary, #0d6efd) !important;
    background-color: var(--bs-primary-bg-subtle, rgba(13, 110, 253, 0.08)) !important;
}

/* /kanban: Plan-Kacheln in der Sidebar — 4px Abstand */
.list-group[data-controller~="plans-dnd"] > .list-group-item[data-plan-id] {
    margin: 4px;
    border-radius: var(--bs-border-radius, 0.375rem);
}

/* Hover-Vergrößerung nur auf der Kanban-Hauptseite, nicht auf /kanban/plans */
.list-group.list-group--kanban-plan-sidebar[data-controller~="plans-dnd"] {
    overflow: visible;
}

.list-group.list-group--kanban-plan-sidebar[data-controller~="plans-dnd"] > .list-group-item[data-plan-id] {
    position: relative;
    z-index: 1;
    transform-origin: center center;
    transition: transform 0.2s ease;
}

.list-group.list-group--kanban-plan-sidebar[data-controller~="plans-dnd"] > .list-group-item[data-plan-id]:hover {
    transform: scale(1.05);
    z-index: 2;
}

/* Kalender: Mobile Toolbar in 3 zentrierten Zeilen */
@media (max-width: 991.98px) {
    .planSimple-fullcalendar .fc .fc-toolbar.fc-header-toolbar {
        margin-bottom: 0.6rem !important;
    }

    /* In Mobile kommt die gewünschte Reihenfolge aus headerToolbar */
    .planSimple-fullcalendar .fc .fc-toolbar-title {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .planSimple-fullcalendar .fc .fc-button-group {
        margin-right: 0.35rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .planSimple-fullcalendar .fc .fc-toolbar-chunk .fc-button {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.8rem !important;
    }
}
