/* PRIGLO: photo OR looped video for the main invitation visual only. */
.priglo-hero-video-layer {
    display: block !important;
    position: absolute !important;
    pointer-events: none !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 1;
    background: transparent;
}
.priglo-hero-media-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.priglo-media-choice { display: inline-flex; justify-content: center; align-items: center; gap: 9px; border: 1px solid rgba(35,70,54,.17); border-radius: 16px; padding: 13px 10px; background: rgba(255,255,255,.77); color: #33473b; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.priglo-media-choice.is-selected { background: linear-gradient(135deg, #e9f4ed, #f7fff8); border-color: #426b55; box-shadow: 0 0 0 2px rgba(63,104,82,.1); }
.priglo-media-choice:disabled { opacity: .65; cursor: progress; }
.priglo-hero-media-preview { cursor: default; display: block; }
.priglo-hero-media-preview > img, .priglo-hero-media-preview > video { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: center; }
.priglo-hero-media-mark { position: absolute; z-index: 2; right: 12px; bottom: 12px; border-radius: 999px; background: rgba(26,40,31,.84); color: #fff; padding: 9px 13px; font-size: 12px; pointer-events: none; }
.priglo-video-help { margin: 0; font-size: 12px; line-height: 1.6; color: #66776d; }
@media (max-width: 400px) { .priglo-media-choice { font-size: 12px; padding: 12px 6px; gap: 6px; } }

.hero-media-editor.priglo-video-selected > .hero-upload-preview { display: none !important; }
.hero-media-editor > .priglo-video-editor-preview { display: none; width: 100%; aspect-ratio: 4/5; max-height: 430px; object-fit: cover; border-radius: 18px; background: #e9e7e2; }
.hero-media-editor.priglo-video-selected > .priglo-video-editor-preview { display: block; }

/* Respect native/editor dimensions; film controls are never visible. */
#editor-block-hero .priglo-hero-media-select { margin-bottom: 14px; }
#editor-block-hero .priglo-video-status { margin-top: 8px; }
#editor-block-hero .priglo-media-choice:focus-visible { outline: 2px solid #326a50; outline-offset: 2px; }
.priglo-hero-video-layer { z-index: auto; }

/* Video bytes transferred; 100% excludes subsequent server conversion. */
#editor-block-hero .priglo-video-progress { height: 9px; margin: 11px 0 5px; border-radius: 999px; overflow: hidden; background: rgba(43,96,70,.12); }
#editor-block-hero .priglo-video-progress[hidden] { display: none !important; }
#editor-block-hero .priglo-video-progress-fill { height:100%;width:0; background:linear-gradient(90deg,#6d9e81,#255b40);border-radius:999px;transition:width .18s ease-out; }
#editor-block-hero .priglo-video-status { min-height: 21px; }

/* Stage 2: save status and recovery share the editor's native state. */
#editor-block-hero .priglo-video-status.is-error { color: #a13f3f; }
#editor-block-hero .priglo-media-recovery { padding: 10px 14px; border: 1px solid rgba(35,70,54,.2); border-radius: 12px; background: #f1f7f2; color: #27543c; font: inherit; font-size: 12px; cursor: pointer; }
#editor-block-hero .priglo-media-recovery[hidden] { display: none !important; }

/* Stage 4: match the invitation's crop without zooming the editor layout itself. */
.hero-media-editor > .priglo-video-editor-frame { display:none; position:relative; width:100%; aspect-ratio:4/5; max-height:430px; overflow:hidden; border-radius:18px; background:#e9e7e2; }
.hero-media-editor.priglo-video-selected > .priglo-video-editor-frame { display:block; }
.priglo-video-editor-frame > .priglo-video-editor-preview { display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform-origin:center; }
#editor-block-hero .priglo-video-remove { align-self:flex-start; margin-top:6px; min-height:44px; max-width:100%; white-space:normal; text-align:left; }

.priglo-clip-dialog { box-sizing:border-box; position:fixed; inset:0; z-index:2147483000; width:min(560px,calc(100% - 24px)); max-height:calc(100vh - 32px); max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); margin:auto; padding:0; border:1px solid rgba(65,102,81,.24); border-radius:24px; color:#2b4636; background:#f8fbf8; box-shadow:0 18px 70px rgba(14,41,27,.24); font-family:inherit; overflow:auto; overscroll-behavior:contain; }
.priglo-clip-backdrop { position:fixed; inset:0; z-index:2147482999; background:rgba(18,37,26,.56); }
.priglo-clip-dialog::backdrop { background:rgba(18,37,26,.56); backdrop-filter:blur(5px); }
.priglo-clip-content { padding:24px; display:flex; flex-direction:column; gap:12px; min-width:0; }
.priglo-clip-content h2 { margin:0; font:inherit; font-size:23px; font-weight:650; line-height:1.25; }
.priglo-clip-note,.priglo-clip-file { margin:0; font-size:13px; line-height:1.5; color:#627568; }
.priglo-clip-file { overflow-wrap:anywhere; font-weight:600; }
.priglo-clip-note:empty { display:none; }
.priglo-clip-video { display:block; width:100%; height:min(30dvh,260px); min-height:110px; border-radius:15px; background:#192c22; object-fit:contain; }
.priglo-clip-fields { display:grid; gap:16px; }
.priglo-clip-field { display:grid; gap:9px; font-size:14px; }
.priglo-clip-caption { display:flex; justify-content:space-between; gap:12px; align-items:baseline; }
.priglo-clip-caption output { white-space:nowrap; font-variant-numeric:tabular-nums; color:#2d6647; }
.priglo-clip-field input[type=range] { box-sizing:border-box; width:100%; min-height:32px; margin:0; accent-color:#32674b; touch-action:pan-y; }
.priglo-clip-dialog button { box-sizing:border-box; border:1px solid rgba(54,93,70,.22); border-radius:14px; min-height:44px; padding:11px 16px; font:inherit; font-size:14px; line-height:1.4; cursor:pointer; color:#2e5940; background:#eef6ef; white-space:normal; }
.priglo-clip-dialog button:disabled { opacity:.55; cursor:default; }
.priglo-clip-dialog button:focus-visible,.priglo-clip-field input:focus-visible { outline:2px solid #387451; outline-offset:3px; }
.priglo-clip-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.7fr); gap:10px; padding-top:4px; }
.priglo-clip-dialog .priglo-clip-confirm { color:#fff; background:linear-gradient(125deg,#3c7656,#173e29); }
@media(max-width:420px) { .priglo-clip-content { padding:18px; gap:10px; } .priglo-clip-content h2 { font-size:21px; } .priglo-clip-video { height:24dvh; } }
@media(prefers-reduced-motion:reduce) { .priglo-video-progress-fill { transition:none !important; } }
