/* =========================================================
   CRM_COMPONENTS.CSS – KOMPONENTY I MODUŁY (MIGRACJA)
   Zakres: Messenger, Kalendarz, Ikony, Animacje, Drzewo
   ========================================================= */

/* =========================
   1. MESSENGER / INBOX
========================= */
.inbox_msg {
    border: 0px solid #c4c4c4;
    clear: both;
    overflow: hidden;
}

.incoming_msg_img {
    display: inline-block;
    width: 6%;
}

.received_msg {
    display: inline-block;
    padding: 0;
    vertical-align: top;
    width: 92%;
}

.received_withd_msg p {
    background: #fbfbfb;
    border: 1px solid #757575;
    border-radius: 0.3rem !important;
    margin: 0;
    padding: 15px;
    width: 100%;
}

.received_withd_msg_zew p {
    background: #F6FCFD;
    border: 1px solid #339966;
    border-radius: 0.3rem !important;
    margin: 0;
    padding: 15px;
    width: 100%;
}

.sent_msg p {
    background: #fbfbfb;
    border: 1px solid #757575;
    border-radius: 0.3rem !important;
    margin: 0;
    padding: 15px;
    width: 100%;
}

.sent_msg {
    float: right;
    width: 90%;
}

.time_date {
    color: #747474;
    display: block;
    font-size: 12px;
    margin: 8px 0 0;
}

.mesgs {
    float: left;
    padding: 0;
    width: 100%;
}

/* ===================================================
   NOWOCZESNY KALENDARZ - POPRAWIONE WYŚWIETLANIE
   =================================================== */

/* Kontener na zadania wewnątrz komórki */
.events-container {
    display: flex;
    flex-direction: column;
    gap: 3px; /* Odstęp między zadaniami */
    margin-top: 4px;
    width: 100%;
}
 
/* Dynamiczne kolory zgodne z legendą (klasy PHP) */
/* Jeśli w bazie masz np. 'bg-info', CSS to obsłuży */
.calendar-event.bg-blue, .calendar-event.bg-primary { background-color: #4e73df !important; border-left: 3px solid #2e59d9 !important; }
.calendar-event.bg-green, .calendar-event.bg-success { background-color: #1cc88a !important; border-left: 3px solid #17a673 !important; }
.calendar-event.bg-red, .calendar-event.bg-danger { background-color: #e74a3b !important; border-left: 3px solid #be2617 !important; }
.calendar-event.bg-yellow, .calendar-event.bg-warning { background-color: #f6c23e !important; border-left: 3px solid #dda20a !important; color: #fff !important; }
.calendar-event.bg-gray, .calendar-event.bg-secondary { background-color: #858796 !important; border-left: 3px solid #717384 !important; }
.calendar-event.bg-info { background-color: #36b9cc !important; border-left: 3px solid #2c9faf !important; }

/* Kropki w legendzie - dopasowanie promienia */
.dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

/* =========================
   3. DRZEWO DOKUMENTÓW (TREE)
========================= */
.tree li {
    list-style-type: none;
    margin: 0;
    padding: 10px 5px 0 5px;
    position: relative;
}

.tree li::before, .tree li::after {
    content: '';
    left: -20px;
    position: absolute;
    right: auto;
}

.tree li::before {
    border-left: 1px solid #999;
    bottom: 50px;
    height: 100%;
    top: 0;
    width: 1px;
}

.tree li::after {
    border-top: 1px solid #999;
    height: 20px;
    top: 25px;
    width: 25px;
}

/* =========================
   4. IKONY I PRZYCISKI KOŁOWE
========================= */
.icon-circle-plus {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #d4edda;
    color: #28a745; 
    font-weight: 100 !important;
    padding: 0 !important;
}

.icon-circle-minus {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #f8d7da;
    color: #dc3545;
    padding: 0 !important;
}

.fa-ellipsis-v {
    padding: 0px 5px 0px 10px !important;
    cursor: pointer;
}

/* =========================
   5. ANIMACJE I EFEKTY
========================= */
.iconAlert {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
    animation-iteration-count: 5;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.zoomin:hover, .zoom:hover, .zoomout:hover {
    transform: scale(1.1);
    transition: transform .2s;
}

/* =========================
   6. INNE MODUŁY
========================= */
#map {
    width: 100%;
    height: 600px;
}

.note-editor {
    box-shadow: none !important;
    border: 1px solid #ced4da !important;
}

.borderRariusRight {
    border-top-right-radius: 12px !important;
}

.ar-poziomJeden {
    background-color: #D4EDDA !important;
}

.ar-poziomDwa {
    background-color: #FFF3CD !important;
}

.ar-poziomTrzy {
    background-color: #FFE699 !important;
}

.ar-poziomCztery {
    background-color: #FFD966 !important;
}

.ar-poziomPiec {
    background-color: #F8D7DA !important;
}

.calendar-day {
    height: 130px;
    border: 1px solid #dee2e6; /* Neutralny szary */
    position: relative;
    padding: 5px;
    width: 14.28%; /* 100% / 7 dni tygodnia */
}

.calendar-day:hover {
    background-color: #f5f5f5; /* Jasnoszary */
}

.events {
    position: absolute;
    top: 30px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    overflow: hidden;
    font-size: 0.6rem;
    border-radius: 5px; /* Zaokrąglone rogi */
}

.event-days-later {
    background-color: #ff6d00; /* Zielone tło dla wydarzeń "Zakończono" */
    color: white; /* Biały kolor tekstu dla kontrastu */
    padding: 3px 6px;
    margin-top: 5px;
    border-radius: 5px; /* Zaokrąglone rogi */
}

.today {
    color: #000000;
    border: 2px solid #00a99d !important;
}

.event-zielony {
    background-color: #d1e7dd; /* Zielone tło dla wydarzeń "Zakończono" */
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px; /* Zaokrąglone rogi */
    text-align: left;
}

.event-pomaranczowy {
    background-color: #ffcdd2; /* Pomadanczowy tło dla wydarzeń "Zakończono" */
    color: white; /* Biały kolor tekstu dla kontrastu */
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px; /* Zaokrąglone rogi */
    text-align: left;
}

.event-niebieski {
    background-color: #cfe2ff; /* Niebeiski tło dla wydarzeń "Zakończono" */
    color: #000000; /* Biały kolor tekstu dla kontrastu */
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px; /* Zaokrąglone rogi */
    text-align: left;
}

.event-pomaranczowy {
    background-color: #ffcc66;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-fioletowy {
    background-color: #ffccff;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-czerwony {
    background-color: #ffcdd2;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-brazowy {
    background-color: #fee5d7e6;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-doZatwierdzenia{
    background-color: #FEF9C2;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-szary {
    background-color: #e3e3e3;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-seledynowy {
    background-color: #e0f7fa;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-rozowy {
    background-color: #F4C1C6;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-jasnoszary {
    background-color: #E2E2E2;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.event-ciemnozielony {
    background-color: #a9c8bb;
    color: #000000;
    padding: 6px 0px 6px 6px;
    margin-top: 5px;
    border-radius: 5px;
    text-align: left;
}

.dot-zielony {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #d1e7dd; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-pomaranczowy {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #ffcdd2; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-niebieski {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #cfe2ff; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-czerwony{
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #ffcdd2; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-pomaranczowy {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #ffcc66; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-fioletowy {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #ffccff; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-brazowy {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #F5CCB0; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-szary {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #CDCDCD; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-seledynowy{
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #b2ebf2; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-doZatwierdzenia {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #FEF9C2; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-zatwierdzone {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #DCFCE7; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-odrzucone {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #E7E5E4; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-rozowy {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #F4C1C6; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-jasnoszary {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #E2E2E2; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}

.dot-ciemnozielony {
    width: 15px;          /* Szerokość kropki */
    height: 15px;         /* Wysokość kropki */
    background-color: #a9c8bb; /* Kolor kropki */
    border-radius: 50%;   /* Kształt kropki (okrągły) */
    display: inline-block; /* Aby działało w linii z innymi elementami */
}  

/* 1. RESET I NADPISANIE ROZMIARU */
.modal-dialog {
    max-width: 900px !important; /* Rezygnujemy z 1300px dla czytelności */
    /*display: flex !important;*/
    align-items: center !important;
    min-height: calc(100% - 3.5rem) !important;
    margin: 1.75rem auto !important;
}

/* 2. KONTENER - KLUCZ DO USUNIĘCIA PODWÓJNYCH RAM */
.modal-content, 
.modal-content-notatka {
    position: relative !important;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column !important;
    width: 100% !important;
    background-color: #fff !important;
    /* CAŁKOWITE USUNIĘCIE STARYCH OBRYSÓW */
    border: 0 !important; 
    border: none !important;
    outline: 0 !important;
    /* NOWY STYL */
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25) !important;
    overflow: hidden !important;
    pointer-events: fill;
    
    
}

/* 3. PASEK BRANDOWY - JEDYNA DOZWOLONA "RAMA" NA GÓRZE */
.modal-content::before, 
.modal-content-notatka::before {
    content: "" !important;
    display: block !important;
    height: 6px !important;
    background-color: #077876 !important;
    width: 100% !important;
}

/* 4. HEADER - USUNIĘCIE DOLNEJ KRESKI DLA LEKKOŚCI */
.modal-header {
    border-bottom: 1px solid #edf2f7 !important;
    padding: 25px 40px !important;
    background: #fff !important;
}

.modal-title {
    font-weight: 700 !important;
    color: #1a202c !important;
    font-size: 1.25rem !important;
}

/* 5. BODY - ODDECH DLA POWAŻNYCH TREŚCI */
.modal-body {
    padding: 35px 45px !important;
    color: #4a5568 !important;
    line-height: 1.6 !important;
    background: #fff !important;
}

/* 6. STOPKA - CZYSTA I BEZ SZAREGO TŁA */
.modal-footer {
    border-top: 1px solid #edf2f7 !important;
    padding: 20px 45px !important;
    background-color: #fcfdfe !important;
}
 

/* Przycisk zamknij (X) */
.modal-header .close {
    margin: -1rem -1rem -1rem auto !important;
    opacity: 0.5 !important;
}

/* 3. PASEK BRANDOWY - ZABEZPIECZENIE PRZED DUBLOWANIEM */
.modal-content::before, 
.modal-content-notatka::before {
    content: "" !important;
    display: block !important;
    height: 10px !important;
    background-color: #077876 !important;
    width: 100% !important;
}

/* BLOKADA DLA ZAGNIEŻDŻONYCH ELEMENTÓW */
/* Jeśli w środku jednego modal-content jest drugi, usuń pasek z tego wewnętrznego */
.modal-content .modal-content::before,
.modal-content-notatka .modal-content-notatka::before,
.modal-content .modal-content-notatka::before {
    display: none !important;
    height: 0 !important;
}

/* DODATKOWE WYCZYSZCZENIE RAMKI WEWNĘTRZNEJ */
.modal-content .modal-content {
    border: none !important;
    box-shadow: none !important;
}

.modal-dialog {
  max-width: 1300px !important;
}




/* --- Video Player Wrapper --- */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* --- Autocomplete Search --- */
.autocomplete-container { position: relative; }
.autocomplete-list {
    position: absolute;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    width: 100% !important;
    display: none;
    border: 1px solid #ced4da;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.175);
    background-color: #fff;
    margin-top: 1px;
}
.autocomplete-list .list-group-item {
    background-color: #f8f9fa;
    color: #000000 !important;
    padding: .2rem 1rem;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}
.autocomplete-list .list-group-item.active {
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #000000 !important;
}
.autocomplete-container.is-loading .autocomplete-list,
.autocomplete-container.is-loading textarea {
    cursor: wait;
}
.autocomplete-container.is-loading .autocomplete-list {
    opacity: 0.7;
}



/* =========================
   IKONY STATYSTYK (iconStat)
========================= */

.iconStat {
    color: #007e8c;           /* Twój morski kolor przewodni */
    font-size: 2.5rem;        /* Rozmiar dopasowany do kart statystyk */
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-circle {
  width: 30px;
  height: 30px;
  padding: 6px 0px;
  border-radius: 15px;
  text-align: center;
  background-color: #eaecee;
  border: 0px;
    border-top-color: currentcolor;
    border-right-color: currentcolor;
    border-bottom-color: currentcolor;
    border-left-color: currentcolor;
  color: #000000;
  font-size: .80rem !important;
}

.btn-menu {
    font-size: .80rem !important;
    padding: 0rem;
    margin-right: .5rem;
    background-color: transparent;
}

.btn-paddingZero {
    padding: 0px;
}
 