.event-images-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-top:0;margin-bottom:12px}
.event-image-card{border:1px solid #ddd;border-radius:4px;padding:10px;min-width:0}
.event-image-card strong{display:block;margin-bottom:8px}
.event-image-preview{display:block;width:100%;aspect-ratio:3/2;object-fit:contain;background:#f5f5f5;border-radius:3px}
.event-image-preview.is-main{object-fit:cover}
.event-image-card small{display:block;margin-top:8px}
.event-image-controls{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.event-images-error:not(:empty){margin:10px 0}
.event-images-add{margin:0}
.event-images-actions{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.event-images-actions[hidden],.event-images-error:empty,.event-images-status:empty,.event-images-grid:empty{display:none}
.event-images-count{margin-bottom:12px}
.event-gallery-main{display:block;position:relative;width:fit-content;max-width:100%;margin:0 auto}
.event-gallery-main img{display:block;max-width:100%;height:auto}
.event-gallery-overlay{position:absolute;right:10px;bottom:10px;padding:8px 12px;background:rgba(0,0,0,.7);color:#fff;border-radius:4px}
.event-gallery-thumb{display:inline-block;margin:8px 4px 0}
.event-gallery-thumb img{width:72px;height:48px;object-fit:cover;border-radius:3px}
@media(max-width:600px){.event-images-grid{grid-template-columns:1fr}
}


.event-thumbnail-editor {width:640px;max-width:calc(100vw - 32px);max-height:90vh;overflow:auto;padding:20px;border:1px solid #ddd;border-radius:6px;color:#626e73;box-sizing:border-box;box-shadow:0 8px 30px #0004;}
.event-thumbnail-editor::backdrop {background:rgba(0,0,0,.55);}
.event-thumbnail-header {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;}
.event-thumbnail-header h3 {margin:0;font-size:22px;}
.event-thumbnail-close {border:0;background:transparent;color:inherit;font-size:28px;line-height:1;}
.event-thumbnail-stage {text-align:center;}
.event-thumbnail-stage .crop-wrapper {display:inline-block;position:relative;vertical-align:top;max-width:100%;}
.event-thumbnail-editor .event-thumbnail-stage .crop-wrapper img.crop-image {display:block;width:auto;height:auto;max-width:100%;max-height:55vh;}
.event-thumbnail-stage .crop-selection {outline:2px solid white;box-shadow:0 0 0 1px #333;}
.event-thumbnail-actions {display:flex;flex-wrap:wrap;gap:10px;margin-top:16px;}
.event-thumbnail-error:empty {display:none;}

/* Never expose the native file control, including while Safari closes its picker. */
.event-images-files{display:none!important;position:fixed!important;left:-10000px!important;top:0!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.event-upload-spinner{display:inline-block;width:1em;height:1em;vertical-align:-.12em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:event-upload-spin .7s linear infinite}
@keyframes event-upload-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.event-upload-spinner{animation-duration:1.8s}}

.event-images-error{white-space:pre-line}
.event-thumbnail-stage .crop-selection{touch-action:none}
@media(pointer:coarse){
 .event-thumbnail-editor{padding:14px}
 .event-thumbnail-stage .crop-selection .handle{width:44px;height:44px;border:0;background:transparent;box-sizing:border-box}
 .event-thumbnail-stage .crop-selection .handle::after{content:'';position:absolute;inset:17px;border:1px solid #333;background:#fff;border-radius:2px}
 .event-thumbnail-stage .crop-selection .handle.top,.event-thumbnail-stage .crop-selection .handle.bottom{left:calc(50% - 22px)}
 .event-thumbnail-stage .crop-selection .handle.left,.event-thumbnail-stage .crop-selection .handle.right{top:calc(50% - 22px)}
}
