/* Gallery grid and management UI: owned by this plugin, not Elementor HTML widgets. */
.vnf-gallery-shell{width:100%;max-width:1120px;margin:30px auto 55px;min-width:0}
.vnf-gallery-public{display:grid;grid-template-columns:repeat(var(--vnf-gallery-cols,4),minmax(0,1fr));gap:18px 12px;width:100%;align-items:start}
.vnf-gallery-item{margin:0;min-width:0}
.vnf-gallery-open{display:block;appearance:none;border:0!important;padding:0!important;margin:0;width:100%;aspect-ratio:4/3;cursor:zoom-in;background:#e8e7df!important;overflow:hidden;border-radius:3px;box-shadow:none;text-align:inherit}
.vnf-gallery-open img{display:block;width:100%!important;height:100%!important;object-fit:cover;object-position:center;transition:transform .2s ease}
.vnf-gallery-open:hover img{transform:scale(1.04)}
.vnf-gallery-open:focus-visible{outline:3px solid #a34d51;outline-offset:3px}
.vnf-gallery-item figcaption{font-family:var(--e-global-typography-text-font-family,Arial,Helvetica,sans-serif)!important;font-size:13px!important;line-height:1.5!important;font-weight:400!important;color:#686c66!important;margin:7px 1px 0;overflow-wrap:anywhere}
.vnf-gallery-pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px;margin:25px auto 0}
.vnf-gallery-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:33px;min-height:33px;padding:5px 9px;border:1px solid #d8d4cd;background:transparent;color:#394038;text-decoration:none;font-size:13px;line-height:1;border-radius:2px}
.vnf-gallery-pagination .page-numbers.current{background:#a34d51;color:#fff;border-color:#a34d51}
.vnf-gallery-pagination .page-numbers:hover:not(.current){background:#eae7df}
/* Native accessible dialog: arrows move among all images displayed on the current page. */
.vnf-gallery-lightbox{padding:0!important;border:0!important;background:#111b1cf5!important;color:white;max-width:none!important;max-height:none!important;width:100vw;height:100vh;inset:0;margin:auto}
.vnf-gallery-lightbox::backdrop{background:#101519ed}
.vnf-gallery-lightbox[open]{display:flex;align-items:center;justify-content:center}
.vnf-gallery-lightbox-inner{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%;padding:60px 76px 70px;box-sizing:border-box}
.vnf-gallery-large{object-fit:contain;max-width:100%;max-height:calc(100vh - 160px);width:auto;height:auto;box-shadow:none}
.vnf-gallery-lightbox button{position:absolute;z-index:1;color:white!important;border:0!important;background:rgba(255,255,255,.14)!important;border-radius:3px;padding:8px 14px!important;font-family:Arial,sans-serif!important;font-size:32px!important;line-height:1.1!important;cursor:pointer}
.vnf-gallery-close{right:20px;top:15px}.vnf-gallery-prev{left:18px;top:47%}.vnf-gallery-next{right:18px;top:47%}
.vnf-gallery-lightbox-footer{display:flex;gap:25px;align-items:center;justify-content:space-between;width:100%;max-width:980px;padding-top:14px;color:#eee;font-family:var(--e-global-typography-text-font-family,Arial,Helvetica,sans-serif);font-size:14px;line-height:1.4}
.vnf-gallery-lightbox-count{white-space:nowrap;color:#ccc}
/* Protected front-end management, twelve records per page. */
.vnf-upload-panel{padding:18px;margin:18px 0 26px;border:1px solid #d8d6d0;background:#fbfaf7;border-radius:4px}
.vnf-upload-panel h3{margin-top:0}
.vnf-gallery-edit-list{display:grid;gap:12px;margin-bottom:22px}
.vnf-gallery-edit-card{display:flex;gap:14px;padding:12px;border:1px solid #dedbd5;border-radius:4px;align-items:start;background:#fff}
.vnf-gallery-edit-thumb{flex:0 0 104px}
.vnf-gallery-edit-thumb img{display:block;width:104px;height:80px;object-fit:cover}
.vnf-gallery-edit-fields{flex:1;min-width:0}
.vnf-gallery-edit-fields textarea{display:block;width:100%;margin:7px 0}
.vnf-gallery-edit-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.vnf-gallery-edit-actions label{margin-left:auto;display:flex;gap:5px;align-items:center}
.vnf-gallery-pager{display:flex;flex-wrap:wrap;gap:6px;margin:15px 0}
.vnf-gallery-pager a{padding:5px 10px;border:1px solid #ccc;text-decoration:none}
.vnf-gallery-pager [aria-current]{font-weight:bold;background:#f4ede8}
.vnf-gallery-file-list{overflow-wrap:anywhere;font-size:13px;margin:10px 0}
@media(max-width:950px){.vnf-gallery-public{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px}}
@media(max-width:700px){.vnf-gallery-public{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 9px}.vnf-gallery-lightbox-inner{padding:55px 42px 65px}.vnf-gallery-lightbox button{font-size:24px!important;padding:7px!important}.vnf-gallery-prev{left:5px}.vnf-gallery-next{right:5px}}
@media(max-width:480px){.vnf-gallery-public{grid-template-columns:repeat(2,minmax(0,1fr))}.vnf-gallery-item figcaption{font-size:12px!important}.vnf-gallery-edit-card{flex-direction:column}.vnf-gallery-edit-thumb{flex:auto}.vnf-gallery-edit-thumb img{width:140px;height:105px}.vnf-gallery-lightbox-inner{padding:55px 25px 65px}}
@media(prefers-reduced-motion:reduce){.vnf-gallery-open img{transition:none}}

/* Upload actions adjacent to file picker; previews are ephemeral and never saved until submit. */
.vnf-gallery-upload-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:14px}
.vnf-gallery-upload-actions .vnf-primary:disabled{opacity:.5;cursor:not-allowed}
.vnf-gallery-clear{background:transparent!important;border:1px solid #c9c4be!important;border-radius:3px;padding:9px 13px!important;color:#684e4c!important;cursor:pointer}
.vnf-upload-previews{display:grid;grid-template-columns:repeat(auto-fill,minmax(85px,1fr));gap:10px;margin-top:12px}
.vnf-upload-preview{min-width:0;overflow:hidden}
.vnf-upload-preview img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:4px;background:#ebe8e2}
.vnf-upload-preview span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;margin-top:5px;color:#5f625e}
.vnf-file-count{font-size:13px;margin:8px 0 0;color:#454d44}

/* Progressive media queue with captions before submitting. */
.vnf-gallery-dropzone{border:2px dashed #c4b6ad;border-radius:6px;background:#f8f6f1;padding:22px 12px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;text-align:center;transition:background .15s,border-color .15s}
.vnf-gallery-dropzone.vnf-drag-over{background:#eee6df;border-color:#a34d51}
.vnf-dropzone-icon{width:38px;height:38px;border-radius:50%;background:#e4eee8;color:#407f58;font-size:27px;font-weight:bold;line-height:38px}
.vnf-gallery-browse{cursor:pointer;text-decoration:underline;color:#925051;font-weight:700}
#vnf-gallery-files{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#vnf-gallery-files:focus-visible~*{outline:2px solid #925051}
.vnf-upload-previews{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));align-items:start}
.vnf-upload-preview{border:1px solid #e1ded8;background:#fff;border-radius:5px;padding:8px;overflow:visible}
.vnf-upload-preview img{aspect-ratio:4/3}
.vnf-upload-preview span{font-size:11px}
.vnf-upload-preview label{display:block;font-size:11px;line-height:1.3;margin-top:8px}
.vnf-upload-preview textarea{display:block;width:100%;min-height:63px;box-sizing:border-box;padding:7px;font-size:13px;resize:vertical}
.vnf-queue-remove{border:1px solid #d2c4c0!important;background:#fff!important;color:#8a4949!important;font-size:12px!important;padding:5px 8px!important;margin-top:7px;cursor:pointer}
