/* ===== Inter Font & Desktop-Schriftgröße ===== */
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
@media (min-width: 992px) {
    body { font-size: 0.875rem; }
}

#calendar { min-height: 600px; background: white; padding: 10px; }
.fc-event { cursor: pointer; }
.fc-license-message { display: none; } /* Versteckt Lizenzhinweis für Trial/Dev */
/* Now Indicator deutlich hervorheben */
.fc-timegrid-now-indicator-line { 
    border-color: #ff0000 !important; 
    border-width: 2px !important; 
    z-index: 5 !important;
}
.fc-timegrid-now-indicator-arrow { border-color: #ff0000 !important; }

/* Hintergrund-Logik: Vergangenheit dezent gelb, Zukunft/Heute weiß */
.fc-day-past {
    background-color: #fffde7 !important; /* Helles Gelb für vergangene Tage */
}

.fc-day-today {
    background-color: #ffffff; /* Ohne !important, damit Hintergrund-Events sichtbar bleiben */
}

/* Toasts über Modals anzeigen (Bootstrap Modals haben z-index 1050) */
.toasts-top-right { z-index: 1100 !important; }

/* Ressourcen-Pagination Buttons (Plätze weiterschalten) */
.fc-prevResources-button, 
.fc-nextResources-button {
    background-color: #6c757d !important; /* Grau zur Abhebung vom Datum (Blau) */
    border-color: #6c757d !important;
    display: none; 
    font-size: 0.8rem !important;
    font-weight: bold !important;
    text-transform: uppercase;
}
.fc-prevResources-button:hover, 
.fc-nextResources-button:hover { 
    background-color: #5a6268 !important; 
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .fc-prevResources-button, .fc-nextResources-button { 
        display: inline-block; 
    }

    .fc .fc-toolbar-title {
        font-size: 1.1rem !important; /* Datum deutlich kleiner auf Handys */
        margin: 0 5px !important;
    }

    .fc .fc-toolbar {
        flex-direction: column; /* Toolbar in zwei Zeilen aufteilen wenn nötig */
        gap: 8px;
    }

    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* Optimierung der Toasts für mobile Endgeräte */
@media (max-width: 768px) {
    .toasts-top-right {
        top: 60px !important; /* Positionierung unterhalb der Navbar */
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
    }
}

/* Logo-Optimierung Sidebar & Brand */
.brand-link .brand-image {
    max-height: 33px;
    width: auto;
    margin-top: -3px;
}

/* Sicherstellen, dass der Kalender-Header unter der fixierten Navbar bleibt */
.fc-header-toolbar {
    background: #fff;
    z-index: 10;
    padding: 5px 0 !important;
}


/* ===== Kalender-Header: Titel + Live-Uhr ===== */
.content-header h1.calendar-title { font-size: 1.4rem; margin: 0; font-weight: bold; }
.calendar-clock { color: #333; }
body.dark-mode .calendar-clock { color: #fff; }

@media (max-width: 767px) {
    .content-header h1.calendar-title, .calendar-title { font-size: 1rem; }
}

/* ===== Gesperrte Events ===== */
.event-locked { cursor: default !important; opacity: 0.8; }

/* ===== FullCalendar Dark Mode Fixes ===== */
body.dark-mode .fc {
    background-color: #343a40 !important;
    color: #ffffff !important;
}

body.dark-mode .fc-header-toolbar,
body.dark-mode .fc-timegrid-axis,
body.dark-mode .fc-timegrid-axis-frame,
body.dark-mode .fc-col-header-cell,
body.dark-mode .fc-scrollgrid-sync-inner {
    background-color: #343a40 !important;
    color: #ffffff !important;
}

body.dark-mode .fc-theme-standard td,
body.dark-mode .fc-theme-standard th,
body.dark-mode .fc-theme-standard .fc-scrollgrid,
body.dark-mode .fc-theme-standard .fc-list {
    border-color: #79838b !important;
}

body.dark-mode .fc .fc-list-empty {
    background-color: #343a40;
}

body.dark-mode .fc-col-header-cell-cushion,
body.dark-mode .fc-timegrid-slot-label-cushion,
body.dark-mode .fc-daygrid-day-number,
body.dark-mode .fc-timegrid-axis-cushion,
body.dark-mode .fc-list-day-text,
body.dark-mode .fc-list-day-sidetext,
body.dark-mode .fc-col-header-cell a,
body.dark-mode .fc-toolbar-title,
body.dark-mode .fc-timegrid-slot-label,
body.dark-mode .fc-timegrid-axis-frame,
body.dark-mode .fc-daygrid-day-top a {
    color: #ffffff !important;
    text-decoration: none !important;
}

body.dark-mode .fc .fc-button-primary {
    background-color: #454d55;
    border-color: #6c757d;
}

body.dark-mode .fc-header-toolbar {
    background: #343a40;
}


/* ===== Dark Mode: Vereinsname in Sidebar-Brand ===== */
body.dark-mode .brand-link .brand-text {
    color: #fff !important;
}

/* ===== Navbar: Vereinsname ===== */
.navbar-brand-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}
body.dark-mode .navbar-brand-title {
    color: #fff !important;
}

/* ===== Chat: Navbar-Badge ===== */
#chatNavBadge {
    font-size: 0.58rem !important;
    padding: 2px 5px !important;
    min-width: 16px;
    line-height: 1.2;
}

/* ===== Chat: Dark Mode Anpassungen ===== */
body.dark-mode .chat-layout {
    background: var(--bs-body-bg);
}

body.dark-mode .chat-msg.mine .chat-msg-bubble {
    background: #0d6efd;
}

body.dark-mode .chat-input {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

body.dark-mode .chat-conv-item:hover {
    background: rgba(255,255,255,0.05);
}

body.dark-mode .chat-conv-item.active {
    background: rgba(13, 110, 253, 0.15);
}

/* ===== Chat: Seite als Vollbild auf mobilen Geräten ===== */
@media (max-width: 767px) {
    /* Seiteninhalt ohne extra Padding für Chat */
    .app-main:has(> .content > .container-fluid > .chat-layout) {
        padding: 0 !important;
    }
}

/* ===== Chat: Scrollbar-Styling ===== */
.chat-messages::-webkit-scrollbar,
.chat-conv-list::-webkit-scrollbar {
    width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb,
.chat-conv-list::-webkit-scrollbar-thumb {
    background: var(--bs-border-color);
    border-radius: 2px;
}
