/* Per-section inspection videos. Namespaced under .empi-video- to avoid
   collisions with the heavy ambient stylesheet. */

/* Anchor the button block to the right corner of the section's gray
   header bar via position:absolute. The position:relative on
   .form-title here is a no-op visually (no offsets), it just
   establishes a positioning context so .empi-video-block is anchored
   to the section header rather than the page. */
.inspection-form-block .form-title { position: relative; }
.empi-video-block {
    position: absolute; top: 10px; right: 10px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    z-index: 10;
}

/* Compatible solid brand blue button with sleek micro-interactions.
   Inline SVG camera icon uses currentColor so it tracks the text. */
.empi-video-add {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; 
    border: 1px solid #0082CA;
    background: #0082CA;
    color: #ffffff;
    border-radius: 3px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.1px;
    cursor: pointer; line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 130, 202, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.empi-video-add:hover { 
    background: #059bdd;
    border-color: #059bdd;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 130, 202, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.empi-video-add:active { 
    transform: translateY(0);
    background: #046b99;
    border-color: #046b99;
    color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
.empi-video-add:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.empi-video-add .empi-video-icon { display: inline-flex; width: 15px; height: 15px; color: currentColor; transition: transform 0.25s ease; }
.empi-video-add .empi-video-icon svg { width: 100%; height: 100%; fill: currentColor; }
.empi-video-add:hover .empi-video-icon { transform: rotate(-8deg) scale(1.1); }

/* Video count badge — soft translucent chip on the blue button (shared by
   both the walkaround and per-section buttons). */
.empi-video-count {
    display: none;
    color: inherit;
    font-weight: 600;
    font-size: 10px; line-height: 1;
    margin-left: 7px !important;
    padding: 3px 6px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border: none !important;
    border-radius: 10px;
    box-shadow: none !important;
}
.empi-video-add.has-videos .empi-video-count {
    display: inline-block;
}

/* Hide the strip entirely if there are no videos, preventing empty hover boxes */
.empi-video-add:not(.has-videos) ~ .empi-video-strip {
    display: none !important;
}

/* Thumbnail strip sits below the button. ALL videos are hidden at rest
   (0 width/height/opacity) and smoothly expand and reveal on hover,
   wrapping into exactly 2 columns of video preview tiles. */
.empi-video-strip { 
    position: relative;
    display: grid !important; 
    grid-template-columns: repeat(2, 92px) !important;
    justify-content: center !important;
    gap: 8px !important; 
    width: 212px;
    max-width: 0;
    max-height: 0;
    opacity: 0;
    padding: 0;
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 3px;
    overflow: hidden;
    box-sizing: border-box;
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Invisible hover bridge to transition from the button to the strip smoothly */
.empi-video-strip::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
    pointer-events: auto;
}

/* Simple scale/fade transition for tiles inside the strip */
.empi-video-strip .empi-video-tile {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Expand the strip and show files on hover of either the button or the strip itself */
.empi-video-add:hover ~ .empi-video-strip,
.empi-video-strip:hover {
    max-width: 212px; /* Fits exactly 2 columns: (92px * 2) + 8px gap + 16px padding + borders */
    max-height: 600px;
    opacity: 1;
    padding: 8px;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: visible;
}
.empi-video-add:hover ~ .empi-video-strip .empi-video-tile,
.empi-video-strip:hover .empi-video-tile { 
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Tile: premium dark slate layout, soft border definition,
   inner highlight for depth. SVG play icon sits in a translucent
   circular cap centered over the thumbnail. */
.empi-video-tile {
    position: relative; width: 92px; height: 52px;
    background: #0f172a;
    border-radius: 10px; overflow: hidden;
    cursor: pointer; flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.empi-video-tile:hover { 
    transform: translateY(-4px) scale(1.05); 
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2), 0 0 0 2px #0082CA; 
    z-index: 10;
}
.empi-video-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    pointer-events: none;
}
.empi-video-tile:active { 
    transform: translateY(0) scale(0.98); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); 
}
.empi-video-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Play cap: translucent circle centered with absolute translation.
   Pointer-events:none so clicks pass through to the tile. */
.empi-video-tile .empi-video-play {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 28px; height: 28px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.empi-video-tile:hover .empi-video-play { 
    background: rgba(0, 130, 202, 0.85); 
    border-color: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 130, 202, 0.4);
}
.empi-video-tile .empi-video-play svg { width: 11px; height: 11px; fill: #fff; margin-left: 1px; }

.empi-video-tile .empi-video-dur {
    position: absolute; right: 6px; bottom: 6px;
    background: rgba(15, 23, 42, 0.75); 
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: #f8fafc;
    font-size: 10px; font-weight: 600;
    padding: 2px 5px; border-radius: 4px;
    line-height: 1; letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.empi-video-tile .empi-video-del {
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75); 
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: #f8fafc;
    border: 0; font-size: 13px; line-height: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.empi-video-tile .empi-video-del:hover { background: #ef4444; color: #ffffff; transform: scale(1.15); }
.empi-video-tile:hover .empi-video-del { opacity: 1; transform: scale(1); }

/* State variants */
.empi-video-tile.empi-video-processing { background: linear-gradient(135deg, #475569 0%, #1e293b 100%); }
.empi-video-tile.empi-video-processing .empi-video-play { background: rgba(15, 23, 42, 0.4); }
.empi-video-tile.empi-video-processing .empi-video-play svg { animation: empi-spin 1.5s linear infinite; }
.empi-video-tile.empi-video-failed { background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%); }
.empi-video-tile.empi-video-failed .empi-video-play { background: rgba(15, 23, 42, 0.4); }

/* Full-screen upload lock: covers the page while a video upload is in
   flight so the form cannot be saved (a save re-injects the form HTML
   under the upload) and no second recording can start. Sits above the
   player overlay (z-index 10000). */
.empi-upload-lock { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 10001; }
.empi-upload-lock.open { display: flex; }
.empi-upload-lock-card { background: #ffffff; border-radius: 12px; padding: 24px 28px; width: 320px; max-width: 90vw; box-sizing: border-box; text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); }
.empi-upload-lock-label { font-size: 14px; font-weight: 600; color: #1e293b; margin-bottom: 16px; }
.empi-upload-lock-bar { display: block; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.empi-upload-lock-bar > div { height: 100%; background: linear-gradient(90deg, #0082CA 0%, #059bdd 100%); width: 0%; transition: width 0.15s linear; }
.empi-upload-lock-pct { margin-top: 8px; font-size: 12px; font-weight: 600; color: #64748b; }
.empi-upload-lock-cancel { margin-top: 16px; padding: 6px 16px; font-size: 12px; font-weight: 500; color: #475569; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.empi-upload-lock-cancel:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

/* ── In-page recorder ─────────────────────────────────────────
   Full-screen camera surface (near-opaque black, not a frosted modal).
   States are is-* classes on the root set by inspection-recorder.js;
   the per-state rules at the end decide which children are visible.
   z-index sits above the upload lock (10001) — the recorder always
   closes before the upload starts, so they never actually stack.
   Only ever shown on mobile: supported() is false on desktop. */
.empi-recorder { position: fixed; inset: 0; z-index: 10002; display: none; flex-direction: column; background: rgba(10, 12, 18, 0.98); }
.empi-recorder.open { display: flex; }
.empi-recorder-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.empi-recorder-live, .empi-recorder-playback { max-width: 100%; max-height: 100%; object-fit: contain; display: none; }
.empi-recorder-close { position: absolute; top: 18px; right: 18px; z-index: 2; background: rgba(255, 255, 255, 0.1); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; display: none; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; }
.empi-recorder-close:hover { background: rgba(255, 255, 255, 0.25); }
.empi-recorder-spinner { display: none; width: 36px; height: 36px; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; animation: empi-spin 1s linear infinite; }
.empi-recorder-timer { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 8px; background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); color: #f8fafc; font-size: 15px; font-weight: 600; padding: 6px 14px; border-radius: 999px; letter-spacing: 0.5px; }
.empi-recorder-timer.warn { background: #ef4444; }
.empi-recorder-reddot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: empi-pulse 1.2s ease-in-out infinite; }
.empi-recorder-timer.warn .empi-recorder-reddot { background: #fff; }
.empi-recorder-error { display: none; background: #ffffff; border-radius: 12px; padding: 24px 28px; width: 320px; max-width: 90vw; box-sizing: border-box; text-align: center; }
.empi-recorder-error-msg { font-size: 14px; color: #1e293b; margin-bottom: 16px; }
.empi-recorder-error-actions { display: flex; flex-direction: column; gap: 10px; }
.empi-recorder-error-actions button { padding: 9px 16px; font-size: 13px; font-weight: 500; border-radius: 6px; cursor: pointer; }
.empi-recorder-use-native { border: 0; background: #0082CA; color: #fff; }
.empi-recorder-use-native:hover { background: #059bdd; }
.empi-recorder-pick-file { border: 1px solid #cbd5e1; background: #f1f5f9; color: #475569; }
.empi-recorder-pick-file:hover { background: #e2e8f0; }
.empi-recorder-controls { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.empi-recorder-hint { color: #94a3b8; font-size: 13px; min-height: 16px; }
.empi-recorder-record, .empi-recorder-stop { display: none; width: 68px; height: 68px; border-radius: 50%; border: 4px solid #fff; background: transparent; cursor: pointer; padding: 0; align-items: center; justify-content: center; }
.empi-recorder-record::after { content: ''; display: block; width: 50px; height: 50px; border-radius: 50%; background: #ef4444; transition: all 0.15s ease; }
.empi-recorder-record:active::after { width: 44px; height: 44px; }
.empi-recorder-stop::after { content: ''; display: block; width: 26px; height: 26px; border-radius: 6px; background: #ef4444; }
.empi-recorder-alt { display: none; background: none; border: 0; color: #94a3b8; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px 8px; }
.empi-recorder-alt:hover { color: #f8fafc; }
.empi-recorder-actions { display: none; gap: 12px; }
.empi-recorder-actions button { padding: 10px 20px; font-size: 14px; font-weight: 500; border-radius: 6px; cursor: pointer; }
.empi-recorder-use { border: 0; background: #0082CA; color: #fff; }
.empi-recorder-use:hover { background: #059bdd; }
.empi-recorder-retake, .empi-recorder-cancel { border: 1px solid #cbd5e1; background: #f1f5f9; color: #475569; }
.empi-recorder-retake:hover { background: #e2e8f0; }
.empi-recorder-cancel:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

/* Per-state visibility. The close button is deliberately absent while
   recording (stop first — prevents accidental discard) and in review
   (leaving review is an explicit Use/Retake/Cancel choice). */
.empi-recorder.is-requesting .empi-recorder-spinner,
.empi-recorder.is-stopping .empi-recorder-spinner { display: block; }
.empi-recorder.is-requesting .empi-recorder-close,
.empi-recorder.is-preview .empi-recorder-close,
.empi-recorder.is-error .empi-recorder-close { display: flex; }
.empi-recorder.is-preview .empi-recorder-live,
.empi-recorder.is-recording .empi-recorder-live,
.empi-recorder.is-stopping .empi-recorder-live { display: block; }
.empi-recorder.is-review .empi-recorder-playback { display: block; }
.empi-recorder.is-recording .empi-recorder-timer { display: flex; }
.empi-recorder.is-preview .empi-recorder-record { display: flex; }
.empi-recorder.is-recording .empi-recorder-stop { display: flex; }
.empi-recorder.is-preview .empi-recorder-alt { display: inline-block; }
.empi-recorder.is-review .empi-recorder-actions { display: flex; }
.empi-recorder.is-error .empi-recorder-error { display: block; }

@keyframes empi-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Inline player overlay (tech side) */
.empi-video-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(12px); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 10000; }
.empi-video-overlay.open { display: flex; }
.empi-video-overlay video { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); }
.empi-video-overlay .empi-video-close { position: absolute; top: 18px; right: 18px; background: rgba(255, 255, 255, 0.1); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; }
.empi-video-overlay .empi-video-close:hover { background: rgba(255, 255, 255, 0.25); transform: scale(1.1) rotate(90deg); }

@keyframes empi-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Walkaround video panel — sits above the section loop.
   Single record button feeding one strip.
   clear:both is required: the host inspection form lays its rows out
   with a negative-margin float grid (.submit-button / .form-title are
   float:left; width:100%; margin-right:-100%; clear:left). As an
   in-flow block this panel would otherwise render on top of the
   preceding floated .submit-button row instead of below it. */
.empi-walkaround-panel {
    clear: both;
    margin: 16px 0;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #e5e5ea;
    border-radius: 6px;
}
/* Shown in place of the video controls on an unsaved inspection (id=0):
   the tech must save the inspection before videos can be attached. */
.empi-video-hint {
    display: flex; align-items: center; gap: 8px;
    margin: 0;
    color: #6e6e73; font-size: 13px;
}
.empi-video-hint .empi-video-icon { display: inline-flex; width: 15px; height: 15px; color: #aeaeb2; }
.empi-video-hint .empi-video-icon svg { width: 100%; height: 100%; fill: currentColor; }
/* position:relative makes this the anchor for the absolutely-positioned
   strip below, so the expanding thumbnails overlay the content beneath
   instead of reflowing the page. */
/* Reset top/right inherited from the base .empi-video-block rule (which
   pins the per-section buttons to a corner with position:absolute; top/right).
   Without this, top:10px leaks in as a relative offset and pushes the
   walkaround button down, making the panel's top/bottom spacing look uneven. */
.empi-walkaround-block { position: relative; top: auto; right: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; z-index: auto; }

/* Both video buttons (walkaround + per-section) share one label size so they
   read consistently. The section button sits inside .block-title, where the
   ambient rule `.block .block-title span { font-family: uni_thin; font-size: 1.5em }`
   (style.css) leaks into the button's inner spans, blowing up the label and
   changing its font. Reset the button and its spans here; inspection-video.css
   loads after style.css, so equal specificity wins. */
.empi-video-block .empi-video-add { font-size: 13px; }
.empi-video-block .empi-video-add span {
    font-family: inherit;
    font-size: 13px;
    padding: 0;
}
.empi-video-block .empi-video-add .empi-video-count { font-size: 10px; }
/* Thumbnails drop under the button as a single horizontal row (not the
   2-column section grid). position:absolute keeps them out of flow so the
   page doesn't move when they appear. !important overrides the shared
   .empi-video-strip grid/hover rules, which otherwise cap width at 212px. */
.empi-walkaround-block .empi-video-strip {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
    min-width: 0; width: max-content;
    max-width: none !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 92px !important;
    justify-content: start !important;
}
.empi-walkaround-block .empi-video-strip .empi-video-tile:nth-child(n+2) { display: block; }

/* Removed-videos (manager-only) panel */
.empi-removed-panel { margin: 12px 0; padding: 12px 16px; background: #fff7e6; border: 1px solid #ffd8a8; border-radius: 6px; }
.empi-removed-panel h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.empi-removed-badge { background: #336699; color: #fff; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; letter-spacing: 0.3px; }
.empi-removed-count { background: #fff; color: #336699; border: 1px solid #cfdce8; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; min-width: 20px; text-align: center; }
.empi-removed-row { display: flex; gap: 10px; align-items: center; font-size: 12px; padding: 6px 0; border-bottom: 1px solid #f3e1c5; }
.empi-removed-row:last-child { border-bottom: 0; }
.empi-removed-row .empi-removed-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6e6e73; }
.empi-removed-row button { padding: 3px 10px; font-size: 11px; border-radius: 4px; cursor: pointer; line-height: 1; }
.empi-removed-row .empi-removed-restore { border: 1px solid #336699; background: #fff; color: #336699; }
.empi-removed-row .empi-removed-restore:hover { background: #eaf0f6; }
.empi-removed-row .empi-removed-purge { border: 1px solid #b00020; background: #fff; color: #b00020; }
.empi-removed-row .empi-removed-purge:hover { background: #fff0f0; }
.empi-removed-empty { color: #6e6e73; font-size: 12px; }

/* Share-link panel */
.empi-share-panel { 
    margin: 28px 0; 
    padding: 20px 24px; 
    background: #ffffff; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
}
.empi-share-panel h4 { 
    margin: 0 0 12px; 
    font-size: 15px; 
    font-weight: 600; 
    color: #1e293b;
    letter-spacing: -0.1px;
}
.empi-share-row { 
    display: flex; 
    gap: 16px; 
    align-items: center; 
    font-size: 12px; 
    padding: 10px 0; 
    border-bottom: 1px solid #f1f5f9; 
}
.empi-share-row:last-child { border-bottom: 0; }
.empi-share-row a { 
    flex: 1; 
    min-width: 0; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    color: #0082CA; 
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}
.empi-share-row a:hover { color: #059bdd; text-decoration: underline; }
.empi-share-row .empi-share-meta { color: #64748b; white-space: nowrap; font-weight: 400; }
.empi-share-row .empi-share-revoked { 
    color: #ef4444; 
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600; 
}
.empi-share-row .empi-share-revoke { 
    padding: 4px 12px; 
    font-size: 11px; 
    font-weight: 500;
    color: #475569;
    background: #f1f5f9; 
    border: 1px solid #cbd5e1; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.empi-share-row .empi-share-revoke:hover { 
    background: #fee2e2; 
    color: #ef4444; 
    border-color: #fca5a5;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.05);
}
.empi-share-mint { 
    display: inline-block; 
    margin-top: 12px; 
    padding: 8px 16px; 
    font-size: 13px; 
    font-weight: 500;
    border: 0; 
    background: #0082CA; 
    color: #fff; 
    border-radius: 8px; 
    cursor: pointer; 
    box-shadow: 0 1px 2px rgba(0, 130, 202, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.empi-share-mint:hover { 
    background: #059bdd; 
    box-shadow: 0 4px 12px rgba(0, 130, 202, 0.25);
    transform: translateY(-1px);
}
.empi-share-mint:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Closed inspection: video evidence is frozen ──────────────────
   The strip and tiles still render (videos remain playable) but the
   add/upload and per-tile remove controls are removed. Backend
   (InspectionVideoFactory::isInspectionClosed) is the real gate. */
.empi-video-block.empi-readonly .empi-video-add,
.empi-video-block.empi-readonly .empi-video-tile .empi-video-del {
    display: none !important;
}

/* The "view only" hint is rendered once, in the walkaround block, as a
   real (translatable) element from the template rather than CSS content,
   so it can be localized like the rest of the UI. The walkaround block
   renders once per inspection and sits in normal flow, so the hint does
   not repeat under every section or overlap the absolutely positioned
   per-section blocks. */
.empi-video-readonly-hint {
    margin: 4px 0 0;
    font-size: 11px;
    color: #6b7280;
}
