/**
 * Style dla Kalendarza Wydarzenia Globalnych
 * Customer Management Plugin
 * 
 * Wzorowane na stylach tablicy dla spójności interfejsu
 */

/* ============================================
   KONTENER KALENDARZA
   ============================================ */

.cmp-wydarzenia-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   NOWY UKŁAD (WIDOK DZIENNY) – 2 KOLUMNY
   ============================================ */

.cmp-calendar-split {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1024px) {
    .cmp-calendar-split {
        grid-template-columns: 1fr;
    }
}

.cmp-calendar-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   MINI-KALENDARZ (MIESIĘCZNY)
   ============================================ */

.cmp-mini-calendar {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}

.cmp-mini-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.cmp-mini-calendar-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-weight: 700;
}

.cmp-mini-calendar-nav-btn:hover {
    background: #e8e8e8;
}

.cmp-mini-calendar-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cmp-mini-calendar-month {
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.cmp-mini-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.cmp-mini-calendar-weekday {
    padding: 8px 0;
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    color: #666;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.cmp-mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #eee;
}

.cmp-mini-calendar-day {
    background: #fff;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.cmp-mini-calendar-day:hover {
    background: #e3f2fd;
}

.cmp-mini-calendar-day.other-month {
    background: #f9f9f9;
    color: #bbb;
}

.cmp-mini-calendar-day.today {
    box-shadow: inset 0 0 0 2px #4caf50;
}

.cmp-mini-calendar-day.selected {
    background: #2271b1;
    color: #fff;
}

.cmp-mini-calendar-day.selected:hover {
    background: #1b5a8d;
}

/* ============================================
   FILTRY W SIDEBARZE
   ============================================ */

.cmp-sidebar-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 14px 16px;
}

.cmp-sidebar-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #333;
    margin-bottom: 12px;
}

.cmp-sidebar-types .cmp-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin: 8px 0;
}

.cmp-sidebar-types .cmp-filter-checkbox:hover {
    background: #f8f9fa;
}

/* ============================================
   WIDOK DNIA (PRAWA KOLUMNA)
   ============================================ */

.cmp-calendar-dayview {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}

.cmp-dayview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
}

.cmp-dayview-title {
    font-size: 18px;
    font-weight: 800;
    color: #333;
    text-align: center;
    flex: 1;
}

.cmp-dayview-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-weight: 800;
}

.cmp-dayview-nav-btn:hover {
    background: #e8e8e8;
}

.cmp-day-all-day {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cmp-all-day-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cmp-all-day-pill:hover {
    background: #f0f7ff;
    border-color: #c9def1;
}

.cmp-day-schedule {
    position: relative;
}

.cmp-day-schedule-grid {
    position: relative;
}

.cmp-time-row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.cmp-time-row-end {
    border-bottom: none;
}

.cmp-time-label {
    padding: 10px 10px 0 10px;
    font-size: 12px;
    color: #666;
    text-align: right;
    box-sizing: border-box;
}

.cmp-time-slot {
    flex: 1;
    position: relative;
    transition: background 0.12s;
}

.cmp-time-slot.is-clickable {
    cursor: pointer;
}

.cmp-time-slot.is-clickable:hover {
    background: rgba(34, 113, 177, 0.08);
}

.cmp-time-slot.is-disabled {
    background: #fafafa;
}

.cmp-schedule-events-layer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.cmp-schedule-event {
    position: absolute;
    border-radius: 10px;
    padding: 6px 8px;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #2271b1;
    background: rgba(34, 113, 177, 0.14);
}

.cmp-schedule-event:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.cmp-schedule-event-time {
    font-size: 11px;
    font-weight: 800;
    color: #333;
    line-height: 1.1;
}

.cmp-schedule-event-title {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kolory po typie */
.cmp-schedule-event.type-meeting { border-left-color: #219EC5; background: rgba(33, 158, 197, 0.18); }
.cmp-schedule-event.type-short_call { border-left-color: #2e7d32; background: rgba(46, 125, 50, 0.16); }
.cmp-schedule-event.type-training { border-left-color: #ff9800; background: rgba(255, 152, 0, 0.18); }
.cmp-schedule-event.type-webinar { border-left-color: #9c27b0; background: rgba(156, 39, 176, 0.18); }
.cmp-schedule-event.type-workshop { border-left-color: #607d8b; background: rgba(96, 125, 139, 0.18); }
.cmp-schedule-event.type-other { border-left-color: #795548; background: rgba(121, 85, 72, 0.18); }
.cmp-schedule-event.type-event { border-left-color: #2271b1; background: rgba(34, 113, 177, 0.14); }

/* Rozróżnienie źródła spotkań */
.cmp-schedule-event.user-meeting { border-left-color: #219EC5; }
.cmp-schedule-event.individual-meeting { border-left-color: #00bcd4; }

.cmp-wydarzenia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cmp-wydarzenia-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

/* ============================================
   NAWIGACJA KALENDARZA
   ============================================ */

.cmp-calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.cmp-calendar-nav-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s;
}

.cmp-calendar-nav-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.cmp-calendar-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cmp-calendar-month-year {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* ============================================
   SIATKA KALENDARZA
   ============================================ */

.cmp-calendar-grid {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}

/* Nagłówki dni tygodnia */
.cmp-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
}

.cmp-calendar-weekday {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Siatka dni */
.cmp-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
}

.cmp-calendar-day {
    background: #fff;
    min-height: 120px;
    padding: 10px;
    position: relative;
    cursor: default;
    transition: all 0.2s;
    width: 100%;
    overflow: hidden;
}

/* Dzień z innego miesiąca */
.cmp-calendar-day.other-month {
    background: #f9f9f9;
    color: #999;
}

.cmp-calendar-day.other-month .cmp-day-number {
    color: #ccc;
}

/* Dzisiejsza data - zielone tło */
.cmp-calendar-day.today {
    background: #4caf50;
}

.cmp-calendar-day.today .cmp-day-number {
    color: #fff;
    font-weight: 700;
}

/* Dzień z wydarzeniami - niebieski kolor tła */


.cmp-calendar-day.has-events .cmp-day-number {
    color: #262626;
    font-weight: 600;
}

/* Hover dla admina */
.cmp-calendar-day.admin-hover:hover {
    background: #e3f2fd;
    cursor: pointer;
}



/* Numer dnia */
.cmp-day-number {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* Dropdown w dniu kalendarza */
.cmp-day-dropdown {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    pointer-events: none; /* Pozwól kliknięciom przechodzić przez dropdown */
}

/* Przycisk toggle dropdownu (strzałka) */
.cmp-dropdown-toggle {
    width: 24px;
    height: 24px;
    background: #2271b1 !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0;
    pointer-events: auto; /* Przycisk musi być klikalny */
}

.cmp-dropdown-toggle:hover {
    opacity: 1 !important;
    background: #135e96 !important;
    transform: scale(1.05);
}

.cmp-dropdown-toggle .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

/* Menu dropdownu */
.cmp-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    display: none;
    z-index: 1000;
    pointer-events: auto; /* Menu musi być klikalne */
}

.cmp-dropdown-menu.show {
    display: block;
}

/* Przycisk "Dodaj wydarzenie" w dropdown */
.cmp-dropdown-menu .cmp-add-event-btn {
    width: 100%;
    padding: 10px 15px;
    background: #fff;
    color: #333;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    border-radius: 6px;
}

.cmp-dropdown-menu .cmp-add-event-btn:hover {
    background: #f0f0f0;
    color: #2271b1;
}

/* Lista wydarzeń w dniu */
.cmp-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 5px;
    position: relative;
    z-index: 10; /* Wydarzenia nad dropdown */
}

.cmp-day-event-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid #2271b1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.cmp-day-event-item:hover {
    background: rgba(34, 113, 177, 0.15);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-left-width: 4px;
    z-index: 5;
}

.cmp-event-time {
    font-weight: 600;
    color: #333;
}

.cmp-event-title {
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    min-width: 0;
}

/* Wydarzenie całodniowe */
.cmp-day-event-item.all-day {
    border-left-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

/* Spotkanie użytkownika (is_global = 2) */
.cmp-day-event-item.user-meeting {
    border-left-color: #219EC5;
    background: #219EC540;
}

.cmp-day-event-item.user-meeting:hover {
    background: rgba(156, 39, 176, 0.2);
}

/* Spotkanie użytkownika całodniowe */
.cmp-day-event-item.user-meeting.all-day {
    border-left-color: #9C27B0;
    background: rgba(156, 39, 176, 0.15);
}

/* Spotkanie indywidualne - jasnoniebieski z ikoną użytkownika */
.cmp-day-event-item.individual-meeting {
    border-left-color: #00bcd4;
    background: rgba(0, 188, 212, 0.15);
    border-left-width: 4px;
}

.cmp-day-event-item.individual-meeting:hover {
    background: rgba(0, 188, 212, 0.25);
    transform: translateX(3px);
}

/* Spotkanie indywidualne całodniowe */
.cmp-day-event-item.individual-meeting.all-day {
    border-left-color: #0097a7;
    background: rgba(0, 151, 167, 0.2);
}

/* "Zobacz wszystkie" link */
.cmp-see-all-events {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #2271b1;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

.cmp-see-all-events:hover {
    color: #135e96;
}

/* ============================================
   POPUP - DODAWANIE WYDARZENIA
   ============================================ */

.cmp-wydarzenie-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmp-wydarzenie-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cmp-wydarzenie-popup-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header popupu */
.cmp-wydarzenie-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.popup-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.popup-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.popup-user-details {
    display: flex;
    flex-direction: column;
}

.popup-user-details strong {
    font-size: 15px;
    color: #333;
}

.popup-action-text {
    font-size: 13px;
    color: #666;
}

.cmp-wydarzenie-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 28px;
    color: #666;
}

.cmp-wydarzenie-popup-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Body popupu */
.cmp-wydarzenie-popup-body {
    padding: 24px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.cmp-wydarzenie-form .form-group {
    margin-bottom: 20px;
}

.cmp-wydarzenie-form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.cmp-wydarzenie-input,
.cmp-wydarzenie-textarea,
.cmp-wydarzenie-time {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    transition: all 0.2s;
}

.cmp-wydarzenie-input:focus,
.cmp-wydarzenie-textarea:focus,
.cmp-wydarzenie-time:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.cmp-wydarzenie-input::placeholder,
.cmp-wydarzenie-textarea::placeholder {
    color: #999;
}

.cmp-wydarzenie-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox całodniowy */
.cmp-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cmp-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cmp-checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

/* Footer popupu */
.cmp-wydarzenie-popup-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.cmp-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cmp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cmp-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.cmp-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.cmp-btn-cancel:hover {
    background: #e8e8e8;
}

.cmp-btn-primary {
    background: #2271b1;
    color: #fff;
}

.cmp-btn-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.cmp-btn-primary:active {
    transform: translateY(0);
}

.cmp-btn-danger {
    background: #dc3545;
    color: #fff;
}

.cmp-btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Przycisk usuwania (śmietnik) */
.cmp-btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 20px;
    color: #dc3545;
}

.cmp-btn-delete:hover {
    background: #fee;
}

/* ============================================
   POPUP - SZCZEGÓŁY WYDARZENIA
   ============================================ */

.cmp-event-details {
    padding: 20px 0;
}

.cmp-event-detail-row {
    margin-bottom: 15px;
}

.cmp-event-detail-label {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cmp-event-detail-value {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.cmp-event-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e3f2fd;
    color: #2271b1;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.cmp-event-badge.all-day {
    background: #fff3e0;
    color: #ff9800;
}

/* ============================================
   POPUP - WSZYSTKIE WYDARZENIA DNIA
   ============================================ */

.cmp-all-events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cmp-event-list-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
    cursor: pointer;
    transition: all 0.2s;
}

.cmp-event-list-item:hover {
    background: #e3f2fd;
    transform: translateX(4px);
}

.cmp-event-list-item.all-day {
    border-left-color: #ff9800;
}

.cmp-event-list-time {
    font-weight: 600;
    color: #2271b1;
    font-size: 14px;
    margin-bottom: 5px;
}

.cmp-event-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.cmp-event-list-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */

@media (max-width: 768px) {
    .cmp-calendar-day {
        min-height: 80px;
        padding: 5px;
    }
    
    .cmp-day-number {
        font-size: 14px;
    }
    
    .cmp-day-event-item {
        font-size: 10px;
        padding: 3px 5px;
    }
    
    .cmp-add-event-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .cmp-wydarzenie-popup-content {
        width: 95%;
        max-width: none;
    }
}

/* ============================================
   LEGENDA TYPÓW WYDARZEŃ
   ============================================ */

.cmp-calendar-legend {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cmp-legend-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-right: 10px;
}

.cmp-legend-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.cmp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
}

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

.cmp-legend-label {
    white-space: nowrap;
}

/* Responsywność legendy */
@media (max-width: 768px) {
    .cmp-calendar-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cmp-legend-items {
        gap: 12px;
    }
}

/* ============================================
   KOLOROWANIE WYDARZEŃ WEDŁUG TYPU
   ============================================ */

/* Wydarzenie (event) - niebieski (domyślny) */
.cmp-day-event-item[data-event-type="event"] {
    border-left-color: #2271b1;
    background: rgba(34, 113, 177, 0.1);
}

.cmp-day-event-item[data-event-type="event"]:hover {
    background: rgba(34, 113, 177, 0.2);
}

/* Spotkanie (meeting) - zielony */
.cmp-day-event-item[data-event-type="meeting"] {
    border-left-color: #00a32a;
    background: rgba(0, 163, 42, 0.1);
}

.cmp-day-event-item[data-event-type="meeting"]:hover {
    background: rgba(0, 163, 42, 0.2);
}

/* Szkolenie (training) - czerwony */
.cmp-day-event-item[data-event-type="training"] {
    border-left-color: #d63638;
    background: rgba(214, 54, 56, 0.1);
}

.cmp-day-event-item[data-event-type="training"]:hover {
    background: rgba(214, 54, 56, 0.2);
}

/* Webinar (webinar) - fioletowy */
.cmp-day-event-item[data-event-type="webinar"] {
    border-left-color: #9b51e0;
    background: rgba(155, 81, 224, 0.1);
}

.cmp-day-event-item[data-event-type="webinar"]:hover {
    background: rgba(155, 81, 224, 0.2);
}

/* Warsztat (workshop) - pomarańczowy */
.cmp-day-event-item[data-event-type="workshop"] {
    border-left-color: #f6a623;
    background: rgba(246, 166, 35, 0.1);
}

.cmp-day-event-item[data-event-type="workshop"]:hover {
    background: rgba(246, 166, 35, 0.2);
}

/* Inne (other) - szary */
.cmp-day-event-item[data-event-type="other"] {
    border-left-color: #646970;
    background: rgba(100, 105, 112, 0.1);
}

.cmp-day-event-item[data-event-type="other"]:hover {
    background: rgba(100, 105, 112, 0.2);
}

/* Style dla selecta typu wydarzenia */
.cmp-wydarzenie-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.2s;
    font-family: inherit;
}

.cmp-wydarzenie-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.cmp-wydarzenie-select option {
    padding: 10px;
}


/* ============================================
   PANEL FILTRÓW
   ============================================ */

.cmp-calendar-filters {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.cmp-filters-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 15px;
}

.cmp-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cmp-filter-group label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cmp-filter-group label svg {
    color: #646970;
}

/* Wyszukiwanie */
.cmp-filter-search {
    flex: 1;
    min-width: 250px;
}

.cmp-filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.cmp-filter-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Checkboxy typów */
.cmp-filter-types {
    flex: 2;
}

.cmp-filter-checkboxes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cmp-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.cmp-filter-checkbox:hover {
    background: #e8e8e8;
}

.cmp-filter-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.cmp-filter-checkbox span {
    user-select: none;
}

/* Select statusu */
.cmp-filter-status {
    min-width: 180px;
}

.cmp-filter-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.cmp-filter-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Przycisk resetowania */
.cmp-filter-actions {
    justify-content: flex-end;
}

.cmp-btn-reset-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.cmp-btn-reset-filters:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.cmp-btn-reset-filters svg {
    width: 16px;
    height: 16px;
}

/* Licznik wyników */
.cmp-filter-results {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

#cmp-filter-results-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsywność filtrów */
@media (max-width: 1024px) {
    .cmp-filters-row {
        flex-direction: column;
    }
    
    .cmp-filter-search,
    .cmp-filter-types,
    .cmp-filter-status {
        width: 100%;
        min-width: 100%;
    }
    
    .cmp-filter-actions {
        width: 100%;
    }
    
    .cmp-btn-reset-filters {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .cmp-filter-checkboxes {
        flex-direction: column;
    }
    
    .cmp-filter-checkbox {
        width: 100%;
    }
}

/* Ukrywanie wydarzeń przez filtry */
.cmp-day-event-item.cmp-filtered-out {
    display: none !important;
}

/* Wyróżnienie wyszukiwanego tekstu */
.cmp-event-highlight {
    background: #fff59d;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* ============================================
   PRZESZŁE DNI - NIEKLIKALNE
   ============================================ */

/* Przeszłe dni - przyciemnione */
.cmp-calendar-day.past-day {
    background: #f5f5f5;
    opacity: 0.6;
    cursor: default;
    pointer-events: none; /* Blokada wszystkich interakcji */
}

.cmp-calendar-day.past-day .cmp-day-number {
    color: #999;
}

/* Przeszłe dni - wydarzenia są widoczne ale przyciemnione */
.cmp-calendar-day.past-day .cmp-day-event-item {
    opacity: 0.7;
    pointer-events: auto; /* Wydarzenia są klikalne (można zobaczyć szczegóły) */
    cursor: pointer;
}

/* Przeszłe dni - brak hover effectu */
.cmp-calendar-day.past-day:hover {
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

/* Przeszłe dni - ukryj przycisk + (już ukryty w HTML, ale na wszelki wypadek) */
.cmp-calendar-day.past-day .cmp-add-event-btn {
    display: none !important;
}

/* Dzisiejszy dzień - wyróżniony mimo że może być w "przeszłości" */
.cmp-calendar-day.today {
    pointer-events: auto !important;
    opacity: 1 !important;
    background: #e3f2fd !important;
}

.cmp-calendar-day.today .cmp-day-number {
    color: #2271b1 !important;
    font-weight: 700;
}

/* Dzisiejszy dzień - przycisk + jest widoczny */
.cmp-calendar-day.today .cmp-add-event-btn {
    display: flex !important;
}