.image-viewer-toolbar { flex-wrap: wrap; }
#img-viewer-video[hidden], #video-test-dialog [hidden], #video-test-notice[hidden] { display: none !important; }
#video-test-dialog { margin: auto; width: min(540px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel, #151b28); color: var(--bright, #eee); box-shadow: 0 24px 90px #0008; }
#video-test-dialog::backdrop { background: #050910c9; }
#video-test-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
#video-test-dialog h2 { margin: 3px 0 0; font-size: 1.3rem; }
#video-test-dialog .vt-action-label { display: block; margin-bottom: 8px; font-size: .88rem; font-weight: 600; }
#video-test-action, #video-test-duration { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--raised, #222d40); color: var(--bright, #eee); font: inherit; }
#video-test-action:disabled { opacity: .65; }
#video-test-dialog .vt-label { color: var(--teal, #5bd5df); font-size: .75rem; }
#video-test-dialog p { font-size: .88rem; line-height: 1.55; margin: 12px 0; }
#video-test-dialog .vt-muted { color: #a2aec1; font-size: .8rem; }
#video-test-dialog button, #video-test-dialog .vt-download { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border-radius: 8px; border: 1px solid var(--border); padding: 10px 14px; background: var(--raised, #222d40); color: inherit; cursor: pointer; font: inherit; font-size: .85rem; text-decoration: none; }
#video-test-dialog button:disabled { opacity: .5; cursor: wait; }
#video-test-dialog .vt-primary { background: var(--teal, #5bd5df); color: #05262d; font-weight: 700; border-color: transparent; }
#video-test-dialog .vt-preview { display: block; max-width: 100%; max-height: 230px; margin: 0 auto 16px; border-radius: 9px; object-fit: contain; }
#video-test-dialog video { width: 100%; max-height: 45dvh; border-radius: 9px; background: #000; }
#video-test-status { border-left: 3px solid var(--teal, #5bd5df); padding-left: 12px; font-weight: 600; }
#video-test-error { color: #ffbcb4; }
#video-test-error:empty { display: none; }
#video-test-dialog details { margin: 14px 0; font-size: .85rem; }
#video-test-dialog summary { padding: 8px 0; cursor: pointer; }
#video-test-prompt { white-space: pre-wrap; line-height: 1.5; color: #a2aec1; }
#video-test-dialog .vt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
#video-test-recent { display: grid; gap: 8px; }
#video-test-recent button { justify-content: flex-start; gap: 12px; text-align: left; }
#video-test-recent img { width: 58px; height: 44px; object-fit: cover; border-radius: 5px; }
#video-test-recent strong, #video-test-recent small { display: block; }
#video-test-recent small { color: #a2aec1; margin-top: 5px; }
.vt-steps { display: flex; list-style: none; padding: 0; gap: 8px; margin: 0 0 20px; font-size: .75rem; color: #a2aec1; }
.vt-steps li { flex: 1; border-top: 2px solid var(--border); padding-top: 9px; }
.vt-steps [aria-current] { border-color: var(--teal, #5bd5df); color: var(--bright, #eee); }
#video-test-status.vt-working::after { content: ''; display: inline-block; margin-left: 10px; width: 10px; height: 10px; border: 2px solid #ffffff30; border-top-color: var(--teal, #5bd5df); border-radius: 50%; animation: vt-spin 1.2s linear infinite; }
@keyframes vt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #video-test-status.vt-working::after { animation: none; } }
#video-test-cost { color: #a2aec1; }
#video-test-notice { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 5000; padding: 14px 20px; border-radius: 10px; border: 1px solid var(--teal); background: var(--raised, #222d40); color: var(--bright, #eee); cursor: pointer; box-shadow: 0 8px 32px #0008; }
@media (max-width: 480px) { #video-test-dialog { padding: 18px; } .image-viewer-toolbar { gap: 6px; } .image-viewer-toolbar button { padding-inline: 10px; font-size: .8rem; } }
