/* Lucys Gallery Enhancer v2 — aggressive, partial effect even without JS */

/* === 1. WIDEN ANY VISIBLE MODAL (pure CSS, no JS needed) === */
body .modal.show .modal-dialog,
body .modal.in .modal-dialog,
body .modal-dialog.modal-lg,
body .modal.fade.show .modal-dialog,
body .modal.fade.in .modal-dialog {
    max-width: 95vw !important;
    width: 95vw !important;
    margin: 2vh auto !important;
}

body .modal.show .modal-content,
body .modal.in .modal-content {
    height: 92vh !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 10px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25) !important;
    overflow: hidden !important;
}

body .modal.show .modal-body,
body .modal.in .modal-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    padding: 12px !important;
}

body .modal.show .modal-header,
body .modal.show .modal-footer {
    flex-shrink: 0 !important;
}

/* === 2. FOLDER TREE UL/LI styling === */
body .modal.show ul li,
body .lge-tree li {
    padding: 3px 6px !important;
    border-radius: 5px !important;
    transition: background 0.12s !important;
    cursor: pointer !important;
}

body .modal.show ul li:hover,
body .lge-tree li:hover {
    background: #eff6ff !important;
}

body .lge-group-header {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #6b7280 !important;
    padding: 10px 4px 4px !important;
    border-top: 1px dashed #e5e7eb !important;
    margin-top: 6px !important;
    list-style: none !important;
    background: transparent !important;
    cursor: default !important;
    pointer-events: none !important;
}

body .lge-group-header:first-child {
    border-top: none !important;
    margin-top: 0 !important;
}

/* === 3. IMAGE GRID — more columns on wider screens === */
@media (min-width: 1200px) {
    body .modal.show .col-md-3,
    body .modal.show .col-sm-3 {
        width: 16.6667% !important;
    }
}

@media (min-width: 1600px) {
    body .modal.show .col-md-3,
    body .modal.show .col-sm-3 {
        width: 12.5% !important;
    }
}

body .modal.show .col-md-3,
body .modal.show .col-md-4,
body .modal.show .col-sm-3 {
    padding: 5px !important;
    transition: transform 0.15s, box-shadow 0.15s !important;
}

body .modal.show .col-md-3:hover,
body .modal.show .col-md-4:hover,
body .modal.show .col-sm-3:hover {
    transform: translateY(-2px);
}

/* === 4. FILTER BAR (injected by JS) === */
.lge-filter-bar {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
    flex-shrink: 0 !important;
}

.lge-filter-bar input {
    flex: 1;
    max-width: 320px;
    height: 30px;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

.lge-filter-bar input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.lge-sort-group {
    display: inline-flex !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.lge-sort-btn {
    padding: 4px 10px !important;
    border: none !important;
    background: transparent !important;
    font-size: 12px !important;
    cursor: pointer !important;
    color: #4b5563 !important;
    border-right: 1px solid #e5e7eb !important;
}

.lge-sort-btn:last-child { border-right: none !important; }

.lge-sort-btn.active {
    background: #2563eb !important;
    color: #fff !important;
    font-weight: 500 !important;
}

.lge-count {
    margin-left: auto !important;
    font-size: 12px !important;
    color: #6b7280 !important;
    white-space: nowrap;
}

.lge-hidden { display: none !important; }
