/*
 * Liam Blue – Kalender Übersicht  |  kalender-style.css
 * -------------------------------------------------------
 * Alle Werte können hier überschrieben werden.
 * Eigene Anpassungen am besten am Ende dieser Datei einfügen
 * oder per style.css des Child-Themes mit höherer Spezifität.
 *
 * CSS Custom Properties (leicht anpassbar):
 */

:root {
    --lbk-accent:         #187ea8;
    --lbk-accent-hover:   #7c3aed;
    --lbk-bg:             #ffffff;
    --lbk-sidebar-bg:     #f8f7ff;
    --lbk-topbar-bg:      #f3f4f6;
    --lbk-text:           #1f2937;
    --lbk-text-muted:     #6b7280;
    --lbk-border:         #e5e7eb;
    --lbk-item-radius:    8px;
    --lbk-sidebar-width:  200px;
    --lbk-gap:            16px;
    --lbk-font:           inherit;
}

/* ── WRAPPER ── */
.lbk-wrapper {
    font-family: var(--lbk-font);
    color: var(--lbk-text);
    background: var(--lbk-bg);
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.lbk-wrapper *,
.lbk-wrapper *::before,
.lbk-wrapper *::after {
    box-sizing: border-box;
}

/* ── TOP BAR ── */
.lbk-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--lbk-topbar-bg);
    border: 1px solid var(--lbk-border);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
}

.lbk-format-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lbk-text-muted);
    margin-right: 6px;
}

.lbk-format-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lbk-format-btn {
    background: transparent;
    color: var(--lbk-text-muted);
    border: 1px solid var(--lbk-border);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lbk-format-btn:hover {
    border-color: var(--lbk-accent);
    color: var(--lbk-accent);
}

.lbk-format-btn.active {
    background: var(--lbk-accent);
    border-color: var(--lbk-accent);
    color: #111;
    font-weight: 600;
}

.lbk-total-info {
    font-size: 0.88rem;
    color: var(--lbk-text-muted);
    text-align: right;
    white-space: nowrap;
}

.lbk-total-info strong {
    color: var(--lbk-accent);
    font-size: 1.05rem;
}

.lbk-total-of {
    font-size: 0.8rem;
    color: var(--lbk-text-muted);
}

/* ── HAUPTBEREICH ── */
.lbk-main {
    display: grid;
    grid-template-columns: var(--lbk-sidebar-width) 1fr var(--lbk-sidebar-width);
    gap: var(--lbk-gap);
    align-items: start;
}

/* ── SIDEBARS ── */
.lbk-sidebar {
    background: var(--lbk-sidebar-bg);
    border: 1px solid var(--lbk-border);
    border-radius: 8px;
    padding: 16px;
    position: sticky;
    top: 20px;
}

.lbk-sidebar-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lbk-accent);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--lbk-border);
}

.lbk-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 520px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--lbk-border) transparent;
}

.lbk-filter-list::-webkit-scrollbar {
    width: 4px;
}

.lbk-filter-list::-webkit-scrollbar-thumb {
    background: var(--lbk-border);
    border-radius: 2px;
}

.lbk-filter-list li {
    margin: 0;
    padding: 0;
}

.lbk-filter-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 4px;
    cursor: pointer;
    font-size: 0.84rem;
    color: var(--lbk-text);
    border-radius: 4px;
    transition: background 0.15s;
    line-height: 1.3;
}

.lbk-filter-label:hover {
    background: rgba(255,255,255,0.05);
}

/* Custom Checkbox */
.lbk-filter-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    min-width: 14px;
    border: 1px solid var(--lbk-text-muted);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
    flex-shrink: 0;
}

.lbk-filter-label input[type="checkbox"]:checked {
    background: var(--lbk-accent);
    border-color: var(--lbk-accent);
}

.lbk-filter-label input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    position: absolute;
    top: 1px;
    left: 4px;
    width: 4px;
    height: 7px;
    border: 2px solid #111;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.lbk-label-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lbk-count {
    font-size: 0.75rem;
    color: var(--lbk-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.lbk-reset-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 6px 0;
    background: transparent;
    border: 1px solid var(--lbk-border);
    border-radius: 4px;
    color: var(--lbk-text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.lbk-reset-btn:hover {
    border-color: var(--lbk-accent);
    color: var(--lbk-accent);
}

.lbk-empty-note {
    font-size: 0.8rem;
    color: var(--lbk-text-muted);
    font-style: italic;
}

/* ── CONTENT (GRID + PAGER) ── */
.lbk-content {
    position: relative;
    min-height: 200px;
}

/* ── GRID ── */
.lbk-grid {
    display: grid;
    grid-template-columns: repeat( 4, 1fr );
    gap: var(--lbk-gap);
    transition: opacity 0.25s ease;
}

.lbk-grid.lbk-loading {
    opacity: 0.35;
    pointer-events: none;
}

/* Kein-Ergebnis-Block nimmt alle 4 Spalten */
.lbk-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--lbk-text-muted);
    font-size: 0.95rem;
}

/* ── KALENDER-ITEM ── */
.lbk-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--lbk-item-radius);
    background: #dbdbdb;
    aspect-ratio: 3 / 4;   /* Standard-Hochformat – passt sich an */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lbk-item:hover {
    transform: translateY( -4px );
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.lbk-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.lbk-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.lbk-item:hover img {
    transform: scale(1.04);
}

/* Querformat-Bilder: aspect-ratio überschreiben */
.lbk-item img[src*="553"],
.lbk-item.lbk-quer {
    aspect-ratio: 4 / 3;
}

/* Overlay mit Titel beim Hover */
.lbk-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 10px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lbk-item:hover .lbk-item-overlay {
    opacity: 1;
}

.lbk-item-title {
    display: block;
    font-size: 0.78rem;
    color: #fff;
    line-height: 1.3;
    text-align: center;
}

/* Fallback wenn kein Bild */
.lbk-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--lbk-text-muted);
    background: #2a2a2a;
}

/* ── LOADING OVERLAY ── */
.lbk-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.lbk-loading-overlay.active {
    display: flex;
}

.lbk-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--lbk-border);
    border-top-color: var(--lbk-accent);
    border-radius: 50%;
    animation: lbk-spin 0.7s linear infinite;
}

@keyframes lbk-spin {
    to { transform: rotate(360deg); }
}

/* ── PAGINATION ── */
.lbk-pagination {
    margin-top: 24px;
}

.lbk-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.lbk-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid var(--lbk-border);
    border-radius: 6px;
    color: var(--lbk-text-muted);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lbk-page-btn:hover {
    border-color: var(--lbk-accent);
    color: var(--lbk-accent);
}

.lbk-page-btn.lbk-active {
    background: var(--lbk-accent);
    border-color: var(--lbk-accent);
    color: #111;
    font-weight: 700;
    cursor: default;
}

.lbk-page-btn.lbk-prev,
.lbk-page-btn.lbk-next {
    font-size: 1.1rem;
    font-weight: 600;
}

.lbk-page-ellipsis {
    color: var(--lbk-text-muted);
    padding: 0 4px;
    user-select: none;
}

/* ── RESPONSIVE ── */

/* Tablet: Sidebars unter das Grid */
@media ( max-width: 1024px ) {
    .lbk-main {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "left  right"
            "content content";
    }

    .lbk-sidebar-left  { grid-area: left; }
    .lbk-sidebar-right { grid-area: right; }
    .lbk-content       { grid-area: content; }

    .lbk-sidebar {
        position: static;
    }
}

/* Kleiner Tablet: 3 Spalten Grid */
@media ( max-width: 900px ) {
    .lbk-grid {
        grid-template-columns: repeat( 3, 1fr );
    }
}

/* Mobil */
@media ( max-width: 600px ) {
    .lbk-main {
        grid-template-columns: 1fr;
        grid-template-areas:
            "left"
            "right"
            "content";
    }

    .lbk-grid {
        grid-template-columns: repeat( 2, 1fr );
    }

    .lbk-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .lbk-total-info {
        text-align: left;
    }
}

/* =====================================================
   EIGENE ANPASSUNGEN  ↓  hier einfügen
   ===================================================== */

/* ── FORMAT-BUTTON: keine Treffer in aktueller Filterauswahl ── */
.lbk-format-btn.lbk-format-empty {
    opacity: 0.35;
    cursor: not-allowed;
}

.lbk-format-btn.lbk-format-empty:hover {
    border-color: var(--lbk-border);
    color: var(--lbk-text-muted);
}
