/* Alle Event-Felder immer linksbündig, auch in der Listenansicht */
.fc-event-title,
.fc-event-time,
.fc-list-event-title,
.fc-list-event-time,
.fc-list-event,
.fc-list-item,
.fc-list-table td,
.fc-list-table th {
    text-align: left !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}
.fc-list-event-title,
.fc-list-event-time {
    display: block;
}
.fc-list-event .fc-list-event-title {
    width: 100%;
}
/* MS Graph FullCalendar Custom Styles */

:root {
    --fc-event-text-color: #323130;
}

/* === ADMIN SORTIERBARE TABELLE === */
#sortable-calendar-table .sortable-row {
    transition: all 0.2s ease;
}

#sortable-calendar-table .sortable-row:hover {
    background-color: #f8f9fa !important;
}

#sortable-calendar-table .sortable-row.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

#sortable-calendar-table .sort-handle {
    cursor: move;
    user-select: none;
    color: #666;
    font-weight: bold;
    transition: all 0.2s ease;
}

#sortable-calendar-table .sort-handle:hover {
    color: #0073aa;
    transform: scale(1.1);
}

#sortable-calendar-table .drop-placeholder {
    background: rgba(0, 115, 170, 0.2) !important;
    border: 2px dashed #0073aa !important;
}

/* === KALENDER CONTAINER === */
.msgraph-fullcalendar {
    max-width: 100%;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #ffffff;
}

/* === HEADER STYLING === */
.msgraph-fullcalendar .fc-header-toolbar {
    background: linear-gradient(135deg, #A13F40 0%, #680000 100%);
    padding: 15px 20px;
    border-bottom: none;
    margin-bottom: 0;
}

.msgraph-fullcalendar .fc-toolbar-title {
    color: #ffffff !important;
    font-size: 1.5em !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* === BUTTONS === */
.msgraph-fullcalendar .fc-button {
    background: #680000 !important;
    border: 1px solid #A13F40 !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    margin: 0 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.msgraph-fullcalendar .fc-button:hover {
    background: #A13F40 !important;
    border-color: #680000 !important;
}

.msgraph-fullcalendar .fc-button:focus,
.msgraph-fullcalendar .fc-button:active {
    background: #ffffff !important;
    color: #A13F40 !important;
    border-color: #A13F40 !important;
    box-shadow: 0 0 0 2px rgba(161, 63, 64, 0.2) !important;
}

/* === AKTIONS-DIALOG === */
.msgraph-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.msgraph-action-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-align: left !important;
    transition: all 0.2s ease !important;
    min-height: 50px !important;
}

.msgraph-btn-icon {
    margin-right: 12px;
    font-size: 20px;
}

.msgraph-btn-outline {
    background: transparent !important;
    border: 2px solid #ddd !important;
    color: #333 !important;
}

.msgraph-btn-outline:hover {
    background: #f5f5f5 !important;
    border-color: #A13F40 !important;
    color: #A13F40 !important;
    transform: translateY(-1px);
}

.msgraph-fullcalendar .fc-button:active,
.msgraph-fullcalendar .fc-button-active {
    background: #ffffff !important;
    border-color: #A13F40 !important;
    color: #A13F40 !important;
    box-shadow: inset 0 2px 4px rgba(161, 63, 64, 0.2) !important;
}

.msgraph-fullcalendar .fc-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* === KALENDER GRID === */
.msgraph-fullcalendar .fc-view-harness {
    background: #ffffff;
}

.msgraph-fullcalendar .fc-col-header {
    background: #f8f9fa;
    border-bottom: 2px solid #A13F40;
}

.msgraph-fullcalendar .fc-col-header-cell {
    padding: 12px 8px;
    font-weight: 600;
    color: #323130;
    border-right: 1px solid #edebe9;
}

.msgraph-fullcalendar .fc-col-header-cell:last-child {
    border-right: none;
}

/* === TAGE === */
.msgraph-fullcalendar .fc-daygrid-day {
    border: 1px solid #edebe9;
    min-height: 100px;
    transition: background-color 0.2s ease;
}

/* Prevent daygrid events/text from overflowing into adjacent days */
.msgraph-fullcalendar .fc-daygrid-day-frame,
.msgraph-fullcalendar .fc-daygrid-day-events {
    overflow: hidden !important;
}

.msgraph-fullcalendar .fc-daygrid-event {
    max-width: 100% !important;
    overflow: hidden !important;
}

.msgraph-fullcalendar .fc-daygrid-event .fc-event-main,
.msgraph-fullcalendar .fc-daygrid-event .fc-event-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.msgraph-fullcalendar .fc-daygrid-day:hover {
    background-color: #f3f2f1;
}

.msgraph-fullcalendar .fc-daygrid-day-number {
    padding: 8px;
    font-weight: 500;
    color: #323130;
}

.msgraph-fullcalendar .fc-day-today {
    background-color: #5e5c5c !important;
    border-color: #A13F40 !important;
}

.msgraph-fullcalendar .fc-day-today .fc-daygrid-day-number {
    background: #A13F40;
    color: #ffffff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
}

/* === EVENTS === */
.msgraph-fullcalendar .fc-event {
    border: none !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    margin: 2px !important;
    background: #f8f9fa !important;
    color: #323130 !important;
    border-left: 3px solid #A13F40 !important;
    font-size: 0.85em !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.msgraph-fullcalendar .fc-event:hover {
    background: #A13F40 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(161, 63, 64, 0.3) !important;
}

.msgraph-fullcalendar .fc-event.fc-event-selected,
.msgraph-fullcalendar .fc-event:focus {
    background: #A13F40 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 2px #680000 !important;
}

.msgraph-fullcalendar .fc-event-title {
    font-weight: 500 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* === EVENT LAYOUT - Flexibel: nebeneinander oder untereinander === */
.msgraph-fullcalendar .fc-event-main-frame {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
}

.msgraph-fullcalendar .fc-event-time {
    font-size: 0.75em !important;
    font-weight: 600 !important;
    opacity: 0.9 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.msgraph-fullcalendar .fc-event-title-container {
    flex: 1 !important;
    min-width: 0 !important;
}

.msgraph-fullcalendar .fc-event-title {
    font-weight: 500 !important;
    font-size: 0.85em !important;
    line-height: 1.3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* === Bei zu wenig Platz: untereinander anordnen === */
@container (max-width: 120px) {
    .msgraph-fullcalendar .fc-event-main-frame {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1px !important;
    }
    
    .msgraph-fullcalendar .fc-event-time {
        margin-bottom: 1px !important;
    }
}

/* === Fallback für Browser ohne Container Queries === */
.msgraph-fullcalendar .fc-daygrid-day[style*="width: 1"] .fc-event-main-frame,
.msgraph-fullcalendar .fc-daygrid-day[style*="width: 2"] .fc-event-main-frame,
.msgraph-fullcalendar .fc-daygrid-day[style*="width: 3"] .fc-event-main-frame,
.msgraph-fullcalendar .fc-daygrid-day[style*="width: 4"] .fc-event-main-frame,
.msgraph-fullcalendar .fc-daygrid-day[style*="width: 5"] .fc-event-main-frame {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1px !important;
}

/* === EVENT KATEGORIEN === */
.msgraph-fullcalendar .fc-event[data-category="Demo"] {
    border-left-color: #8764b8 !important;
}

.msgraph-fullcalendar .fc-event[data-category="Demo"]:hover {
    background: #8764b8 !important;
    color: #ffffff !important;
}

.msgraph-fullcalendar .fc-event[data-category="Meeting"] {
    border-left-color: #16a085 !important;
}

.msgraph-fullcalendar .fc-event[data-category="Meeting"]:hover {
    background: #16a085 !important;
    color: #ffffff !important;
}

.msgraph-fullcalendar .fc-event[data-category="Workshop"] {
    border-left-color: #e67e22 !important;
}

.msgraph-fullcalendar .fc-event[data-category="Workshop"]:hover {
    background: #e67e22 !important;
    color: #ffffff !important;
}

/* === WOCHENANSICHT === */
.msgraph-fullcalendar .fc-timegrid-slot {
    border-color: #edebe9;
    height: 40px;
}

.msgraph-fullcalendar .fc-timegrid-axis {
    background: #f8f9fa;
    color: #605e5c;
    font-size: 0.85em;
    font-weight: 500;
}

.msgraph-fullcalendar .fc-timegrid-event {
    border-radius: 4px !important;
    padding: 2px 6px !important;
}

/* === TIMEGRID EVENT LAYOUT === */
.msgraph-fullcalendar .fc-timegrid-event .fc-event-main-frame {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    height: 100% !important;
    gap: 3px !important;
}

.msgraph-fullcalendar .fc-timegrid-event .fc-event-time {
    font-size: 0.7em !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.msgraph-fullcalendar .fc-timegrid-event .fc-event-title {
    font-size: 0.75em !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* === Schmale Timegrid-Events: untereinander === */
.msgraph-fullcalendar .fc-timegrid-event[style*="width: 1"] .fc-event-main-frame,
.msgraph-fullcalendar .fc-timegrid-event[style*="width: 2"] .fc-event-main-frame,
.msgraph-fullcalendar .fc-timegrid-event[style*="width: 3"] .fc-event-main-frame,
.msgraph-fullcalendar .fc-timegrid-event[style*="width: 4"] .fc-event-main-frame {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1px !important;
}

.msgraph-fullcalendar .fc-timegrid-event[style*="width: 1"] .fc-event-title,
.msgraph-fullcalendar .fc-timegrid-event[style*="width: 2"] .fc-event-title,
.msgraph-fullcalendar .fc-timegrid-event[style*="width: 3"] .fc-event-title,
.msgraph-fullcalendar .fc-timegrid-event[style*="width: 4"] .fc-event-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    white-space: normal !important;
}

/* === LISTENANSICHT === */
.msgraph-fullcalendar .fc-list-event {
    border-left: 4px solid #dee2e6 !important;
    padding: 12px !important;
    transition: all 0.2s ease;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f3f4 !important;
}

.msgraph-fullcalendar .fc-list-event:hover {
    background-color: #A13F40 !important;
    border-left-color: #680000 !important;
}

.msgraph-fullcalendar .fc-list-event:hover .fc-list-event-title {
    color: #ffffff !important;
}

.msgraph-fullcalendar .fc-list-event:hover .fc-list-event-time {
    color: #f8f9fa !important;
}

.msgraph-fullcalendar .fc-list-event-title {
    font-weight: 600 !important;
    color: #323130 !important;
    transition: color 0.2s ease !important;
}

.msgraph-fullcalendar .fc-list-event-time {
    color: #605e5c !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}

/* === POPOVER === */
.msgraph-fullcalendar .fc-popover {
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    background: #ffffff !important;
}

.msgraph-fullcalendar .fc-popover-header {
    background: #A13F40 !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
}

.msgraph-fullcalendar .fc-popover-body {
    padding: 8px !important;
}

/* === MODALE DIALOGE === */
.msgraph-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.msgraph-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.msgraph-modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

.msgraph-modal-header {
    background: linear-gradient(135deg, #A13F40 0%, #680000 100%);
    color: #ffffff;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.msgraph-modal-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0;
    color: #ffffff !important;
}

.msgraph-modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.msgraph-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.msgraph-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.msgraph-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
}

.msgraph-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px;
}

.msgraph-btn-primary {
    background: #A13F40;
    color: #ffffff;
}

.msgraph-btn-primary:hover {
    background: #680000;
}

.msgraph-btn-secondary {
    background: #f8f9fa;
    color: #323130;
    border: 1px solid #dee2e6;
}

.msgraph-btn-secondary:hover {
    background: #e9ecef;
}

/* === MODAL SPEZIELLE VERBESSERUNGEN === */
/* Booking Modal spezielle Anpassungen für bessere Usability */
.msgraph-modal-content {
    /* Verbesserte maximale Höhe für bessere Nutzung des Bildschirms */
    max-height: min(90vh, 700px);
}

/* Booking-Formulare sind oft länger - extra Anpassungen */
[id$='-booking-modal'] .msgraph-modal-content {
    max-width: 600px;
}

/* Smooth Scrolling für bessere Benutzererfahrung */
.msgraph-modal-body {
    scroll-behavior: smooth;
}

/* Schatten am oberen und unteren Rand des scrollbaren Bereichs */
.msgraph-modal-body::-webkit-scrollbar {
    width: 8px;
}

.msgraph-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.msgraph-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.msgraph-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Anpassungen für mobile Geräte */
@media (max-width: 768px) {
    .msgraph-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 2.5vh auto;
    }
    
    .msgraph-modal-header {
        padding: 15px;
    }
    
    .msgraph-modal-body {
        padding: 15px;
    }
    
    .msgraph-modal-footer {
        padding: 10px 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .msgraph-btn {
        width: 100%;
        justify-content: center;
    }
}

.msgraph-form-group {
    margin-bottom: 15px;
}

.msgraph-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #323130;
}

.msgraph-form-input,
.msgraph-form-textarea,
.msgraph-form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.msgraph-form-input:focus,
.msgraph-form-textarea:focus,
.msgraph-form-select:focus {
    outline: none;
    border-color: #A13F40;
    box-shadow: 0 0 0 2px rgba(161, 63, 64, 0.2);
}

.msgraph-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.msgraph-event-details {
    line-height: 1.6;
}

.msgraph-event-details strong {
    color: #A13F40;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .msgraph-fullcalendar .fc-toolbar {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .msgraph-fullcalendar .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
    }
    
    .msgraph-fullcalendar .fc-button {
        padding: 6px 12px !important;
        font-size: 0.9em !important;
    }
    
    .msgraph-fullcalendar .fc-toolbar-title {
        font-size: 1.2em !important;
    }
    
    .msgraph-fullcalendar .fc-daygrid-day {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .msgraph-fullcalendar {
        margin: 10px 5px;
        border-radius: 4px;
    }
    
    .msgraph-fullcalendar .fc-header-toolbar {
        padding: 10px 15px;
    }
    
    .msgraph-fullcalendar .fc-button {
        padding: 4px 8px !important;
        font-size: 0.8em !important;
    }
    
    .msgraph-fullcalendar .fc-daygrid-day {
        min-height: 60px;
    }
    
    .msgraph-fullcalendar .fc-event {
        font-size: 0.75em !important;
        padding: 2px 4px !important;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .msgraph-fullcalendar {
        background: #1e1e1e;
        color: #ffffff;
    }
    
    .msgraph-fullcalendar .fc-view-harness {
        background: #1e1e1e;
    }
    
    .msgraph-fullcalendar .fc-col-header {
        background: #2d2d30;
        border-bottom-color: #A13F40;
    }
    
    .msgraph-fullcalendar .fc-col-header-cell {
        color: #ffffff;
        border-right-color: #3e3e42;
    }
    
    .msgraph-fullcalendar .fc-daygrid-day {
        border-color: #3e3e42;
        background: #1e1e1e;
    }
    
    .msgraph-fullcalendar .fc-daygrid-day:hover {
        background-color: #2d2d30;
    }
    
    .msgraph-fullcalendar .fc-daygrid-day-number {
        color: #ffffff;
    }
    
    .msgraph-fullcalendar .fc-day-today {
        background-color: #4a2e2e !important;
    }
    
    .msgraph-fullcalendar .fc-timegrid-axis {
        background: #2d2d30;
        color: #d4d4d4;
    }
    
    .msgraph-fullcalendar .fc-timegrid-slot {
        border-color: #3e3e42;
    }
}

/* === PRINT STYLES === */
@media print {
    .msgraph-fullcalendar {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .msgraph-fullcalendar .fc-header-toolbar {
        background: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .msgraph-fullcalendar .fc-event {
        background: #666 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}


.fc-h-event .fc-event-main:hover {
    color: white;
}
.fc .fc-list-event td {
    border: none !important;
}
.fc .fc-list-event:hover td {
    background-color: inherit;
}

/* === EVENT LIST STYLES === */
.msgraph-event-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.msgraph-event-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.msgraph-event-item:last-child {
    border-bottom: none;
}

.event-color-indicator {
    width: 4px;
    height: 40px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 2px;
}

.event-content {
    flex: 1;
}

.event-location {
    color: #666;
    font-size: 0.9em;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

.event-source {
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 10px;
}

.event-description {
    color: #888;
    font-size: 0.9em;
    font-style: italic;
    margin-top: 5px;
    display: block;
}

/* === KALENDER CONTAINER UND LEGENDE === */
.wpocal-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Listen-Container spezielle Styles */
.wpocal-list-container {
    max-width: 100%;
    margin: 20px 0;
}

.wpocal-list-legend {
    margin-bottom: 20px;
}

/* Kalender-Legende Styles */
.wpocal-legend {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.wpocal-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.wpocal-legend-item {
    display: flex;
    align-items: center;
}

.wpocal-legend-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    margin: 0;
    user-select: none;
}

.wpocal-legend-checkbox {
    margin: 0;
    cursor: pointer;
}

.wpocal-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
    display: inline-block;
    flex-shrink: 0;
}

.wpocal-legend-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wpocal-legend-type {
    font-size: 11px;
    opacity: 0.7;
}

/* Deaktivierte Kalenderquelle */
.wpocal-legend-item.disabled .wpocal-legend-label {
    opacity: 0.5;
}

.wpocal-legend-item.disabled .wpocal-legend-color {
    opacity: 0.3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpocal-legend-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* === FULLCALENDAR EVENT STYLES === */
/* 
 * Farben werden jetzt über JavaScript mit eventDidMount und !important gesetzt
 * Dies verhindert Konflikte mit Theme-CSS und stellt sicher, dass
 * Kalenderquellen-Farben korrekt angezeigt werden
 */

/* Spezielle Styles für Ortsanzeige in Listenansicht */
.fc-list-event-title {
    font-weight: 500 !important;
}

/* Emoji-Icons in Event-Titeln besser lesbar machen */
.fc-event-title {
    line-height: 1.3 !important;
}

.fc-list-event .fc-list-event-title {
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* === TAG SELECTOR STYLES === */
.msgraph-tag-selector {
    position: relative;
    width: 100%;
}

.msgraph-tag-input-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 40px;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    cursor: pointer;
    background: white;
    align-items: center;
}

.msgraph-tag-input-container:focus-within {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.msgraph-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
}

.msgraph-selected-tag {
    background: #0073aa;
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.msgraph-tag-remove {
    cursor: pointer;
    font-weight: bold;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.msgraph-tag-remove:hover {
    background: rgba(255,255,255,0.5);
}

.msgraph-tag-input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 100px;
    padding: 4px;
    cursor: pointer;
}

.msgraph-tag-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.msgraph-tag-option {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.msgraph-tag-option:hover {
    background: #f5f5f5;
}

.msgraph-tag-option.selected {
    background: #e8f4f8;
    color: #0073aa;
    font-weight: 500;
}

.msgraph-tag-option:last-child {
    border-bottom: none;
}

.msgraph-tag-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* === FULLCALENDAR CUSTOM BUTTON STYLES === */
.msgraph-fullcalendar .fc-timeToggleBtn-button {
    background-color: #28a745 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 0.85em !important;
    transition: opacity 0.3s ease, display 0.3s ease !important;
}

.msgraph-fullcalendar .fc-timeToggleBtn-button:hover {
    background-color: #1e7e34 !important;
    border-color: #155724 !important;
    color: white !important;
}

.msgraph-fullcalendar .fc-timeToggleBtn-button:focus {
    background-color: #1e7e34 !important;
    border-color: #155724 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3) !important;
}

.msgraph-fullcalendar .fc-timeToggleBtn-button:active {
    background-color: #155724 !important;
    border-color: #0d4133 !important;
}

.msgraph-fullcalendar .fc-createEventBtn-button {
    background-color: #0073aa !important;
    border-color: #005a87 !important;
    color: white !important;
    font-weight: 500 !important;
}

.msgraph-fullcalendar .fc-createEventBtn-button:hover {
    background-color: #005a87 !important;
    border-color: #004368 !important;
    color: white !important;
}

.msgraph-fullcalendar .fc-createEventBtn-button:focus {
    background-color: #005a87 !important;
    border-color: #004368 !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3) !important;
}

.msgraph-fullcalendar .fc-createEventBtn-button:active {
    background-color: #004368 !important;
    border-color: #003a5c !important;
}

.msgraph-fullcalendar .fc-bookingBtn-button {
    background-color: #ff9800 !important;
    border-color: #f57c00 !important;
    color: white !important;
    font-weight: 500 !important;
}

.msgraph-fullcalendar .fc-bookingBtn-button:hover {
    background-color: #f57c00 !important;
    border-color: #ef6c00 !important;
    color: white !important;
}

.msgraph-fullcalendar .fc-bookingBtn-button:focus {
    background-color: #f57c00 !important;
    border-color: #ef6c00 !important;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.3) !important;
}

.msgraph-fullcalendar .fc-bookingBtn-button:active {
    background-color: #ef6c00 !important;
    border-color: #e65100 !important;
}

/* === BOOKING CONFIRMATION STYLES === */
.msgraph-booking-summary {
    max-height: 400px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
}

.booking-summary-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.booking-summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.booking-summary-section h4 {
    margin: 0 0 10px 0;
    color: #A13F40;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-summary-section p {
    margin: 5px 0;
    line-height: 1.5;
    color: #323130;
}

.booking-summary-section p strong {
    color: #A13F40;
    font-weight: 600;
}

.btn-orange{
    background-color: #ff9800 !important;
    border-color: #f57c00 !important;
    color: white !important;
    font-weight: 500 !important;
}

/* Zeit-Toggle Button Styles */
.wpocal-time-toggle-container {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.wpocal-time-toggle-btn {
    background-color: #0078d4;
    color: white;
    border: 1px solid #106ebe;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.wpocal-time-toggle-btn:hover {
    background-color: #106ebe;
    border-color: #005a9e;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wpocal-time-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Lade-Animation Styles */
.wpocal-loading-overlay {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background-color: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wpocal-loading-content {
    text-align: center;
    color: #6c757d;
}

.wpocal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #0078d4;
    border-radius: 50%;
    animation: wpocal-spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes wpocal-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wpocal-loading-text {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
}

/* Smooth Transition für Container */
.wpocal-container {
    transition: opacity 0.3s ease-in-out;
}


.fc-event {
    text-align:left;
}

.fc-list-event-title {
   margin: 12px !important;
}