/* Smart Videos — SmartSchools design standard (kit tokens, site accent, system font). */
:root {
	--sv-accent: var(--sx-teal, var(--accent, #15294d));
	--sv-ink: var(--sx-ink, #14262d);
	--sv-muted: var(--sx-muted, #52666e);
	--sv-line: var(--sx-line, #dfe5e8);
	--sv-strip: var(--sx-strip, #f2f5f6);
	--sv-blue: var(--sx-blue, #14a8dc);
	--sv-blue-2: var(--sx-blue-2, #0f93c2);
	--sv-font: var(--sx-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}
.sv-section, .sv-modal, .sv-account { font-family: var(--sv-font); color: var(--sv-ink); }
.sv-section *, .sv-modal *, .sv-account * { box-sizing: border-box; }
.sv-section [hidden], .sv-modal [hidden], .sv-account [hidden], .sv-section[hidden], .sv-modal[hidden] { display: none !important; }

/* Listing section */
.sv-section { padding: 8px 0 24px; }
.sv-section.is-auto .sv-section-inner { max-width: 1140px; margin: 0 auto; padding: 0 15px; }
.sv-section-inner { background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 16px; }
.sv-section.is-auto .sv-section-inner { border: 0; background: transparent; padding: 0 15px; }
.sv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.sv-h { margin: 0; font: 700 20px/1.3 var(--sv-font); color: var(--sv-accent); }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.sv-tile { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--sv-ink); font: inherit; min-width: 0; }
.sv-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0e1a1f; }
.sv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-thumb-blank { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #8fa3ab; }
.sv-thumb-blank .sv-ico { width: 32px; height: 32px; }
.sv-play-ico { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; }
.sv-tile:hover .sv-play-ico { background: var(--sv-accent); }
.sv-len { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.sv-state { position: absolute; left: 6px; top: 6px; background: #fff; color: var(--sv-accent); font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.sv-state.is-warn { background: #fff3d6; color: #8a5a00; }
.sv-state.is-bad { background: #fdecea; color: #b42318; }
.sv-state.is-off { background: #eef1f2; color: var(--sv-muted); }
.sv-tile-title { font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sv-tile-meta { font-size: 12px; color: var(--sv-muted); }
.sv-empty { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border: 1px dashed var(--sv-line); border-radius: 8px; background: var(--sv-strip); color: var(--sv-muted); text-align: left; cursor: pointer; font: 14px/1.5 var(--sv-font); }
.sv-empty strong { color: var(--sv-ink); }
.sv-empty .sv-ico { width: 28px; height: 28px; color: var(--sv-accent); flex: none; }

/* Buttons and fields */
.sv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--sv-line); background: #fff; color: var(--sv-ink); font: 600 14px/1 var(--sv-font); cursor: pointer; }
.sv-btn:hover { border-color: var(--sv-accent); }
.sv-btn.is-primary { background: var(--sv-blue); border-color: var(--sv-blue); color: #fff; }
.sv-btn.is-primary:hover { background: var(--sv-blue-2); }
.sv-btn[disabled] { opacity: .75; cursor: default; }
.sv-wide { width: 100%; }
.sv-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; background: transparent; color: var(--sv-muted); border-radius: 6px; cursor: pointer; padding: 0; }
.sv-icon-btn:hover { background: var(--sv-strip); color: var(--sv-accent); }
.sv-label { display: block; margin: 12px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--sv-muted); }
.sv-muted { color: var(--sv-muted); font-weight: 400; }
.sv-input { width: 100%; height: 38px; border: 1px solid var(--sv-line); border-radius: 6px; padding: 0 10px; font: 14px var(--sv-font); color: var(--sv-ink); background: #fff; margin: 0; }
.sv-input:focus { outline: 0; border-color: var(--sv-accent); box-shadow: 0 0 0 3px rgba(21, 41, 77, .1); }
.sv-check { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 14px; line-height: 1.4; cursor: pointer; }
.sv-check input { margin: 2px 0 0; flex: none; }
.sv-hint { margin: 10px 0 12px; font-size: 12px; color: var(--sv-muted); }
.sv-on { margin: 12px 0 0; font-size: 14px; }
.sv-error { margin: 8px 0; font-size: 13px; color: #b42318; }
.sv-ok { margin: 8px 0; padding: 10px 12px; border-radius: 8px; background: #e3f4ea; color: #1f7a4d; font-size: 14px; }

/* Drop zone */
.sv-drop { display: block; border: 1px dashed var(--sv-line); border-radius: 8px; background: var(--sv-strip); cursor: pointer; overflow: hidden; position: relative; }
.sv-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.sv-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; text-align: center; font-size: 13px; color: var(--sv-muted); }
.sv-drop-empty strong { color: var(--sv-ink); font-size: 14px; }
.sv-drop-empty .sv-ico { width: 26px; height: 26px; color: var(--sv-accent); }
.sv-drop-preview { display: flex; align-items: center; gap: 10px; padding: 8px; }
.sv-drop-preview video { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #000; flex: none; }
.sv-drop-meta { font-size: 13px; color: var(--sv-ink); word-break: break-word; }

.sv-progress { height: 6px; background: var(--sv-strip); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.sv-progress span { display: block; height: 100%; width: 0; background: var(--sv-accent); transition: width .2s; }

.sv-search { position: relative; }
.sv-results { position: absolute; left: 0; right: 0; top: 40px; z-index: 5; background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 38, 45, .14); max-height: 260px; overflow-y: auto; padding: 4px; }
.sv-results button { display: flex; width: 100%; justify-content: space-between; gap: 8px; padding: 9px 8px; border: 0; background: transparent; text-align: left; font: 14px var(--sv-font); color: var(--sv-ink); cursor: pointer; border-radius: 6px; }
.sv-results button:hover { background: var(--sv-strip); }
.sv-results em { font-style: normal; font-size: 12px; color: var(--sv-muted); white-space: nowrap; }
.sv-results p { margin: 8px; font-size: 13px; color: var(--sv-muted); }

/* Pop-ups */
html.sv-lock { overflow: hidden; }
.sv-modal { position: fixed; inset: 0; z-index: 99998; background: rgba(10, 20, 26, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sv-sheet { background: #fff; border-radius: 8px; width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.sv-sheet.is-video { width: min(960px, 100%); background: #000; }
.sv-sheet.is-video .sv-sheet-head { background: #fff; }
.sv-sheet.is-video video { width: 100%; max-height: calc(100vh - 110px); display: block; background: #000; }
.sv-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 8px 16px; border-bottom: 1px solid var(--sv-line); }
.sv-sheet-head h2 { margin: 0; font: 700 16px/1.3 var(--sv-font); color: var(--sv-accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-sheet-body { padding: 14px 16px 16px; overflow-y: auto; }
.sv-play-error { margin: 0; padding: 12px 16px; background: #fff; color: #b42318; font-size: 14px; }
@media (max-width: 600px) {
	.sv-modal { align-items: flex-end; padding: 0; }
	.sv-modal.is-player { align-items: center; }
	.sv-sheet { width: 100%; max-height: 92vh; border-radius: 12px 12px 0 0; }
	.sv-sheet.is-video { border-radius: 0; }
}

/* My Account › Videos */
.sv-account .sv-upload-card { max-width: 640px; }
.sv-rows { display: flex; flex-direction: column; }
.sv-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--sv-line); }
.sv-row:first-child { border-top: 0; padding-top: 0; }
.sv-row .sv-tile-title { display: none; }
.sv-row-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.sv-row-meta { margin: 0 0 4px; font-size: 13px; color: var(--sv-muted); }
.sv-row-meta a { color: var(--sv-accent); }
.sv-row-reason { margin: 4px 0; font-size: 13px; color: #b42318; }
.sv-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.sv-inline { display: inline-flex; gap: 6px; margin: 0; align-items: center; }
.sv-reason { width: 240px; height: 36px; }
.sv-copy { width: min(320px, 100%); height: 28px; border: 1px solid var(--sv-line); border-radius: 6px; padding: 0 8px; font: 12px var(--sv-font); color: var(--sv-ink); background: var(--sv-strip); }
.sx-btn.is-danger { color: #b42318; border-color: #f3c3bd; }
.sv-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sv-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; margin-bottom: 8px; }
.sv-roles .sv-check { margin: 4px 0; }
@media (max-width: 600px) {
	.sv-row { grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
	.sv-reason { width: 100%; }
	.sv-inline { flex-wrap: wrap; }
}
