.celso-media-dims {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #000 !important;
    color: #fff !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    padding: 1px 0 !important;
    text-align: center !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    text-shadow: none !important;
    opacity: 1 !important;
    display: block !important;
}

.attachment-preview {
    position: relative !important;
}

/* Ne asigurăm că overlay-ul este vizibil peste thumbnail */
.attachment-preview .thumbnail {
    z-index: 1;
}

.attachment-preview .celso-media-dims {
    z-index: 100;
}

.attachment.celso-orientation-p .thumbnail {
    /* Optional: evidențiere pentru portret */
}

.attachment.celso-orientation-l .thumbnail {
    /* Optional: evidențiere pentru landscape */
}

/* Stiluri pentru noul filtru de orientare și coloane */
#celso-orientation-filter,
#celso-columns-filter {
    margin-right: 10px;
    vertical-align: middle;
}

/* Ascundere etichete */
.media-toolbar label,
.media-search-input-label,
.media-frame-content .media-search-input-label,
.media-frame-toolbar label,
.attachments-browser .media-toolbar label,
.media-toolbar-secondary label {
    display: none !important;
}

/* Media toolbar secondary full width and all boxes on the same row */
.media-frame-toolbar .media-toolbar,
.attachments-browser .media-toolbar,
.media-modal .media-toolbar {
    height: auto !important;
    min-height: 56px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    padding: 10px 16px !important;
}

.media-toolbar-secondary {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 0 !important;
}

.media-toolbar-secondary > * {
    flex: 0 1 auto !important;
    margin: 0 !important;
    min-width: 0 !important;
}

.media-toolbar-secondary select,
.media-toolbar-secondary input[type="search"],
.media-toolbar-secondary .search {
    width: auto !important;
    max-width: 180px !important;
    box-sizing: border-box !important;
}

.media-toolbar-primary {
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

/* Stiluri lățime coloane thumbnails (7 / 4 / 2 coloane) */
.media-modal-content:not([data-celso-columns]) .attachments .attachment,
.attachments-browser:not([data-celso-columns]) .attachments .attachment,
.elementor-media-modal:not([data-celso-columns]) .attachments .attachment,
.media-frame-content:not([data-celso-columns]) .attachments .attachment,
.media-modal-content[data-celso-columns="7"] .attachments .attachment,
.attachments-browser[data-celso-columns="7"] .attachments .attachment,
.elementor-media-modal[data-celso-columns="7"] .attachments .attachment,
.media-frame-content[data-celso-columns="7"] .attachments .attachment {
    width: 14.2857% !important;
}

.media-modal-content[data-celso-columns="4"] .attachments .attachment,
.attachments-browser[data-celso-columns="4"] .attachments .attachment,
.elementor-media-modal[data-celso-columns="4"] .attachments .attachment,
.media-frame-content[data-celso-columns="4"] .attachments .attachment {
    width: 25% !important;
}

.media-modal-content[data-celso-columns="2"] .attachments .attachment,
.attachments-browser[data-celso-columns="2"] .attachments .attachment,
.elementor-media-modal[data-celso-columns="2"] .attachments .attachment,
.media-frame-content[data-celso-columns="2"] .attachments .attachment {
    width: 50% !important;
}

/* Filtrare bazată pe clasa și atributul de container */
.attachments-browser[data-celso-filter="l"] .attachment:not(.celso-orientation-l),
.elementor-media-modal[data-celso-filter="l"] .attachment:not(.celso-orientation-l),
.media-frame-content[data-celso-filter="l"] .attachment:not(.celso-orientation-l) {
    display: none !important;
}
.attachments-browser[data-celso-filter="p"] .attachment:not(.celso-orientation-p),
.elementor-media-modal[data-celso-filter="p"] .attachment:not(.celso-orientation-p),
.media-frame-content[data-celso-filter="p"] .attachment:not(.celso-orientation-p) {
    display: none !important;
}
.attachments-browser[data-celso-filter="s"] .attachment:not(.celso-orientation-s),
.elementor-media-modal[data-celso-filter="s"] .attachment:not(.celso-orientation-s),
.media-frame-content[data-celso-filter="s"] .attachment:not(.celso-orientation-s) {
    display: none !important;
}

@media only screen and (max-width: 900px) {
    #celso-orientation-filter,
    #celso-columns-filter {
        margin-top: 5px;
        width: 100%;
    }
}
