:root {
    --sidebar-gap: 12px;
    --sidebar-radius: 12px;
}

/* Desktop – gap + zaokrąglenie i cień */
@media (min-width: 992px) {
    .sidebar-wrapper {
        padding-left: var(--sidebar-gap);
    }

    #kt_app_sidebar {
        border-radius: var(--sidebar-radius);
        overflow: clip;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
        background: var(--bs-body-bg);
    }
}

/* Mobile – zero “upiększaczy”, żeby nie prześwitywało */
@media (max-width: 991.98px) {
    .sidebar-wrapper {
        padding-left: 0;
    }

    #kt_app_sidebar {
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        background: var(--bs-body-bg);
    }
}


.app-sidebar-user {
    position: sticky;
    bottom: 0;
    margin-top: auto;
}

/* ✅ Poprawa wyglądu Select2 multiple - ikonki usuwania */
.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__choice {
    background-color: #f1f1f2;
    border: 1px solid #e4e6ef;
    border-radius: 0.475rem;
    padding: 0.375rem 0.75rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    font-size: 0.925rem;
    font-weight: 500;
}

.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #a1a5b7;
    margin-right: 0.5rem;
    font-weight: bold;
    float: left;
    cursor: pointer;
}

.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #f1416c;
}

/* Dla dark mode */
[data-bs-theme="dark"] .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__choice {
    background-color: #1e1e2d;
    border-color: #2b2b40;
    color: #92929f;
}

[data-bs-theme="dark"] .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #565674;
}

[data-bs-theme="dark"] .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #f1416c;
}

.global-search-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.global-search-toggle.btn-primary {
    box-shadow: 0 0 0 3px rgba(80, 165, 241, 0.2);
}

/* Adjust search input padding when button is present */
[data-kt-filemanager-table-filter="search"] {
    padding-right: 50px !important;
}

/* Make parent position relative */
.d-flex.align-items-center.position-relative {
    position: relative !important;
}

.file-name-truncate {
    display: block; /* musi być blok */
    max-width: 100%; /* nie wychodzimy poza kontener */
    overflow: hidden; /* obetnij nadmiar */
    white-space: nowrap; /* bez zawijania */
    text-overflow: ellipsis; /* dodaj "..." */
}

/* Baza – spójne z ikonami Quilla */
.ql-toolbar .ql-attach .ql-ki-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Metronic-like smoothness */
    transition:
        transform .18s ease,
        color .18s ease,
        filter .18s ease,
        opacity .18s ease;
    opacity: .85;
}

/* Duotone – bazowy kolor z tekstu toolbara */
.ql-toolbar .ql-attach .ql-ki-icon .path1,
.ql-toolbar .ql-attach .ql-ki-icon .path2 {
    transition: fill .18s ease, stroke .18s ease;
}

/* Hover – Metronic vibe: lekki zoom, podbity kolor, delikatny glow */
.ql-toolbar .ql-attach:hover .ql-ki-icon {
    transform: scale(1.12) translateY(-1px);
    opacity: 1;
    color: var(--bs-primary); /* Metronicowa zmienna */
    filter: drop-shadow(0 0 4px rgba(59, 125, 221, 0.45)); /* delikatny glow */
}

/* Jeśli chcesz też podbić duotone ścieżki pod primary */
.ql-toolbar .ql-attach:hover .ql-ki-icon .path1,
.ql-toolbar .ql-attach:hover .ql-ki-icon .path2 {
    fill: var(--bs-primary);
    stroke: var(--bs-primary);
}

/* Focus via klawiatura – bardziej dostępne */
.ql-toolbar .ql-attach:focus-visible .ql-ki-icon {
    outline: none;
    transform: scale(1.12) translateY(-1px);
    filter: drop-shadow(0 0 4px rgba(59, 125, 221, 0.7));
}

/* 1) BAZA: wszystkie przyciski w toolbarze Quilla */
.ql-toolbar button {
    position: relative;
    transition:
        background-color .18s ease,
        color .18s ease,
        box-shadow .18s ease;
    outline: none;
}

/* 2) BAZA IKON: Quill SVG + nasza KI-ikonka – rozmiar + smooth animacja */
.ql-toolbar button svg,
.ql-toolbar button .ql-ki-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 18px;

    transition:
        transform .18s ease,
        filter .18s ease,
        opacity .18s ease;
    opacity: .85;
}

/* 3) Kolory wewnątrz SVG Quilla – stroke/fill */
/* Quill standardowo używa klas .ql-stroke, .ql-fill itd. */
.ql-toolbar button .ql-stroke {
    stroke: currentColor;
    transition: stroke .18s ease;
}

.ql-toolbar button .ql-fill {
    fill: currentColor;
    transition: fill .18s ease;
}

/* 4) Bazowy kolor ikon – szary jak w Metronicu */
.ql-toolbar {
    color: #7e8299; /* możesz spiąć z jakąś zmienną Metronica, np. var(--bs-gray-600) */
}

/* 5) HOVER / FOCUS – efekt Metronic-like dla WSZYSTKICH klawiszy */
.ql-toolbar button:hover svg,
.ql-toolbar button:hover .ql-ki-icon,
.ql-toolbar button:focus-visible svg,
.ql-toolbar button:focus-visible .ql-ki-icon {
    transform: scale(1.12) translateY(-1px);
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(59, 125, 221, 0.45)); /* delikatny glow */
}

/* 6) Zmiana koloru na primary przy hover/focus */
.ql-toolbar button:hover,
.ql-toolbar button:focus-visible {
    color: var(--bs-primary);
}

/* Duotone KI – jeśli chcesz, żeby oba pathy też się podbarwiały */
.ql-toolbar button:hover .ql-ki-icon .path1,
.ql-toolbar button:hover .ql-ki-icon .path2,
.ql-toolbar button:focus-visible .ql-ki-icon .path1,
.ql-toolbar button:focus-visible .ql-ki-icon .path2 {
    fill: var(--bs-primary);
    stroke: var(--bs-primary);
}

/* 7) Aktywny przycisk (np. bold włączony) – lekko podkreślony */
.ql-toolbar button.ql-active {
    color: var(--bs-primary);
}

.ql-toolbar button.ql-active svg,
.ql-toolbar button.ql-active .ql-ki-icon {
    opacity: 1;
}

/* 8) Extra: konkretnie attach (możesz, ale nie musisz zostawiać – ujednoliciliśmy resztę) */
.ql-toolbar .ql-attach .ql-ki-icon {
    font-size: 18px;
}

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ellipsis-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-attachment {
    overflow: hidden;              /* nic nie wyjdzie poza szary box */
}

.note-attachment-name {
    display: block;
    max-width: calc(100% - 0.5rem);  /* ✨ obcinamy ~8px przed krawędzią */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


