/* New menu, recording studio and upload dialog (My Library) */
.new-wrap { position: relative; }
.app-new { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 12px; border: 0; border-radius: 12px; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--on-primary); background: var(--grad, var(--primary)); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--primary) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .28); cursor: pointer; transition: transform .12s, box-shadow .15s, filter .15s; }
.app-new:hover { filter: brightness(1.05); transform: translateY(-1px); }
.app-new:focus-visible { outline: none; box-shadow: var(--ring); }
.app-new:disabled { opacity: .6; cursor: progress; transform: none; }
.menu.newm { min-width: 290px; padding: 8px; border-radius: 16px; }
.menu.newm button { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
.nm-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--primary); background: var(--primary-soft); }
.nm-tx { display: grid; gap: 1px; min-width: 0; }
.nm-tx b { font-size: 14.5px; font-weight: 700; }
.nm-tx small { font-size: 12.5px; color: var(--muted); font-weight: 500; }

dialog.rc, dialog.pu { width: min(480px, 94vw); border-radius: 22px; overflow: visible; }
.rc-in { display: grid; gap: 16px; padding: 22px; }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rc-top h2 { font-size: 21px; }
.rc-top p { margin-top: 3px; font-size: 13.5px; }
.rc-x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.rc-x:hover { color: var(--text); background: var(--primary-soft); }
.rc-x:focus-visible { outline: none; box-shadow: var(--ring); }
.rc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.rc-seg button { display: flex; align-items: center; justify-content: center; gap: 9px; height: 46px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.rc-seg button[aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: var(--sh1), inset 0 -2px 0 var(--primary); }
.rc-seg button:focus-visible { outline: none; box-shadow: var(--ring); }
.rc-rows { display: grid; gap: 8px; }
.rc-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.rc-row[hidden], .rc-sub[hidden] { display: none; }
.rc-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.rc-lb { flex: 1; min-width: 0; display: grid; gap: 1px; }
.rc-lb b { font-size: 14.5px; }
.rc-lb small { font-size: 12.5px; color: var(--muted); }
.rc-sub { display: grid; gap: 10px; margin: -2px 0 2px 50px; }
.rc-sub select, .rc-sel { height: 38px; padding: 0 30px 0 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; max-width: 100%; }
.rc-sel { flex: none; }
.rc-sub select:focus, .rc-sel:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.rc-sub video { width: 100%; max-height: 150px; border-radius: 12px; background: #0b1624; object-fit: cover; transform: scaleX(-1); }
.sw { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in srgb, var(--muted) 40%, var(--surface-2)); transition: background .18s; pointer-events: none; }
.sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .28); transition: transform .18s; }
.sw input:checked + i { background: var(--primary); }
.sw input:checked + i::after { transform: translateX(20px); }
.sw input:focus-visible + i { box-shadow: var(--ring); }
.rc-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--primary-soft); font-size: 13px; color: var(--text); }
.rc-note:empty { display: none; }
.rc-err { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #e5484d 12%, var(--surface)); border: 1px solid color-mix(in srgb, #e5484d 45%, var(--border)); font-size: 13px; color: var(--text); }
.rc-err[hidden] { display: none; }
.rc-go { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border: 0; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 800; letter-spacing: .01em; color: var(--on-primary); background: var(--grad, var(--primary)); box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--primary) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3); cursor: pointer; transition: transform .12s, filter .15s; }
.rc-go:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.rc-go:focus-visible { outline: none; box-shadow: var(--ring); }
.rc-go:disabled { opacity: .6; cursor: progress; }
.rc-gd { width: 12px; height: 12px; border-radius: 50%; background: #ff3b4f; box-shadow: 0 0 0 4px rgba(255, 59, 79, .3); }

.rc-cd { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 18px; background: rgba(6, 14, 24, .55); backdrop-filter: blur(5px); }
.rc-cd[hidden] { display: none; }
.rc-cdn { display: grid; place-items: center; width: 168px; height: 168px; border-radius: 50%; font-size: 92px; font-weight: 800; color: #fff; background: radial-gradient(circle at 30% 25%, #25b9ff, #0a7cff 60%, #6a3df0); box-shadow: 0 30px 70px -20px rgba(10, 124, 255, .75), 0 0 0 10px rgba(255, 255, 255, .12); animation: rcpop 1s ease-out infinite; }
@keyframes rcpop { 0% { transform: scale(1.1); } 60% { transform: scale(1); } }
.rc-cdx { padding: 10px 24px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; font: inherit; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; }
.rc-cdx:hover { background: rgba(229, 72, 77, .8); }

.rc-dock { position: fixed; left: 50%; bottom: 22px; z-index: 70; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; color: #fff; background: rgba(12, 24, 40, .92); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .7); animation: rcup .25s ease-out; }
@keyframes rcup { from { opacity: 0; transform: translate(-50%, 14px); } }
.rc-dock[hidden] { display: none; }
.rc-live { width: 10px; height: 10px; border-radius: 50%; background: #ff3b4f; box-shadow: 0 0 0 0 rgba(255, 59, 79, .6); animation: rcpulse 1.4s infinite; }
.rc-dock.paused .rc-live, .rc-dock.busy .rc-live { background: #9aa8ba; animation: none; }
@keyframes rcpulse { 70% { box-shadow: 0 0 0 9px rgba(255, 59, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 79, 0); } }
.rc-time { min-width: 46px; font-size: 18px; font-variant-numeric: tabular-nums; color: #ffd60a; }
.rc-state { font-size: 13px; color: #b9c9db; min-width: 64px; }
.rc-b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; height: 40px; padding: 0 10px; border: 0; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .1); cursor: pointer; }
.rc-b:hover { background: rgba(255, 255, 255, .2); }
.rc-b:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rc-b:disabled { opacity: .45; cursor: progress; }
.rc-b[hidden] { display: none; }
.rc-b.stop { padding: 0 16px; background: #e5484d; }
.rc-b.stop:hover { background: #ef5f64; }
.rc-sq { width: 12px; height: 12px; border-radius: 3px; background: #fff; }
.rc-fail { display: inline-flex; gap: 8px; }
.rc-fail[hidden] { display: none; }
.rc-fail button { height: 36px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; background: none; font: inherit; font-weight: 700; color: #fff; cursor: pointer; }
.rc-fail button:hover { background: rgba(255, 255, 255, .15); }

.pu-zone { display: grid; justify-items: center; gap: 4px; padding: 34px 20px; text-align: center; border: 2px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: 18px; background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); cursor: pointer; transition: background .15s, border-color .15s; }
.pu-zone:hover, .pu-zone.over { background: var(--primary-soft); border-color: var(--primary); }
.pu-zone:focus-visible { outline: none; box-shadow: var(--ring); }
.pu-zone b { font-size: 16px; }
.pu-zone u { color: var(--primary); text-decoration: none; font-weight: 700; }
.pu-zone small { color: var(--muted); }
.pu-ic { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 6px; border-radius: 18px; color: var(--on-primary); background: var(--grad, var(--primary)); box-shadow: 0 14px 26px -14px color-mix(in srgb, var(--primary) 80%, transparent); }
.pu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 190px; overflow: auto; }
.pu-list:empty { display: none; }
.pu-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: 13.5px; background: var(--surface); }
.pu-list li span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pu-list li em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.pu-list li.done em { color: #14a44d; font-weight: 700; }
.pu-list li.failed em { color: #e5484d; font-weight: 700; }
@media (max-width: 600px) { .app-new span { display: none; } .app-new { padding: 0 10px; } .rc-dock { width: calc(100vw - 20px); flex-wrap: wrap; justify-content: center; } .rc-state { display: none; } }
@media (prefers-reduced-motion: reduce) { .rc-cdn, .rc-live, .rc-dock { animation: none; } }

/* compact form: everything fits a laptop screen */
dialog.rc { max-height: calc(100vh - 24px); overflow: auto; }
.rc-in { gap: 10px; padding: 16px 18px 18px; }
.rc-top h2 { font-size: 18px; }
.rc-x { width: 30px; height: 30px; }
.rc-seg { border-radius: 13px; }
.rc-seg button { height: 38px; font-size: 14px; border-radius: 10px; }
.rc-seg svg { width: 18px; height: 18px; }
.rc-rows { gap: 6px; }
.rc-row { gap: 10px; padding: 7px 10px; border-radius: 12px; min-height: 50px; }
.rc-ic { width: 32px; height: 32px; border-radius: 10px; }
.rc-ic svg { width: 18px; height: 18px; }
.rc-lb b { font-size: 14px; }
.rc-lb small { font-size: 12px; line-height: 1.25; }
.rc-ext { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; }
.rc-ext[hidden] { display: none; }
.rc-ext select { width: 150px; height: 34px; }
.rc-ext video { width: 58px; height: 40px; border-radius: 8px; object-fit: cover; transform: scaleX(-1); background: #0b1624; }
.rc-sel, .rc-sub select { height: 34px; }
.rc-note { padding: 7px 10px; font-size: 12px; }
.rc-go { height: 46px; font-size: 15px; border-radius: 12px; }
.rc-lb { overflow: hidden; }
@media (max-height: 640px) { .rc-lb small { display: none; } .rc-row { min-height: 44px; } }
@media (max-width: 520px) { .rc-ext select { width: 110px; } .rc-ext video { display: none; } }
.rc-grant { flex: none; height: 32px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--primary) 55%, var(--border)); border-radius: 999px; background: var(--primary-soft); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--primary); cursor: pointer; }
.rc-grant:hover { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.rc-grant:focus-visible { outline: none; box-shadow: var(--ring); }
.rc-grant[data-state="denied"] { color: #e5484d; border-color: color-mix(in srgb, #e5484d 50%, var(--border)); background: color-mix(in srgb, #e5484d 10%, var(--surface)); }
.rc-grant[hidden], .sw[hidden] { display: none; }

/* the recording bar: same look as the toolbar of the browser extension */
.rc-dock { left: 16px; bottom: 16px; transform: none; gap: 10px; padding: 8px 10px; color: #fff; background: #2a2d3a; backdrop-filter: none; border: 0; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-weight: 600; animation: rcup2 .2s ease-out; max-width: calc(100vw - 32px); }
@keyframes rcup2 { from { opacity: 0; transform: translateY(10px); } }
.rc-tm { display: inline-flex; align-items: center; gap: 7px; min-width: 52px; font-size: 14px; font-variant-numeric: tabular-nums; }
.rc-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4452; box-shadow: none; animation: rcblink 1.2s ease-in-out infinite; }
@keyframes rcblink { 50% { opacity: .35; } }
.rc-dock.paused .rc-live, .rc-dock.busy .rc-live { background: #9ca3af; animation: none; }
.rc-time { min-width: 0; font-size: 14px; color: #ffd60a; }
.rc-dock.paused .rc-time { color: #cbb84a; }
.rc-b { min-width: 34px; width: 34px; height: 30px; padding: 0; border-radius: 8px; }
.rc-b.pause { background: #4f7cff; }
.rc-b.pause:hover { background: #6a90ff; }
.rc-b.stop { padding: 0; background: #ef6b73; }
.rc-b.stop:hover { background: #f4858c; }
.rc-b#rc-trash { background: none; color: #cdd2e6; }
.rc-b#rc-trash:hover { background: rgba(255, 255, 255, .12); }
.rc-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .16); }
.rc-dev { position: relative; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: #e5e7f2; cursor: pointer; }
.rc-dev:hover { background: rgba(255, 255, 255, .12); }
.rc-dev:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.rc-dev[hidden] { display: none; }
.rc-dev.off { color: #9ca3af; }
.rc-dev.off::after { content: ''; position: absolute; width: 22px; height: 2px; background: #ef4452; transform: rotate(-45deg); border-radius: 2px; }
.rc-state { display: none; font-size: 13px; color: #cdd2e6; font-weight: 600; }
.rc-dock.paused .rc-state, .rc-dock.busy .rc-state { display: inline; }
.rc-dock.busy .rc-sep, .rc-dock.busy .rc-dev { display: none; }
@media (max-width: 600px) { .rc-dock { width: auto; flex-wrap: nowrap; justify-content: flex-start; } }

.rc-fold { width: 22px; opacity: .75; margin-left: -2px; }
.rc-fold svg { transition: transform .15s; }
.rc-dock.collapsed .rc-fold svg { transform: rotate(180deg); }
.rc-dock.collapsed .rc-x1, .rc-dock.collapsed .rc-x1b, .rc-dock.collapsed .rc-dev:not(.rc-fold), .rc-dock.collapsed .rc-sep, .rc-dock.collapsed #rc-trash { display: none; }
.rc-tool[aria-pressed="true"] { background: rgba(255, 255, 255, .16); }
.rc-draw { position: fixed; inset: 0; z-index: 60; width: 100vw; height: 100vh; pointer-events: none; }
.rc-draw.on { pointer-events: auto; cursor: crosshair; }
.rc-draw[hidden] { display: none; }
.rc-subtools { position: fixed; left: 16px; bottom: 64px; z-index: 71; display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: #fff; background: #2a2d3a; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.rc-subtools[hidden] { display: none; }
.rc-subtools .rc-dev[aria-pressed="true"] { background: rgba(255, 255, 255, .16); }
.rc-dot { width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); box-sizing: border-box; cursor: pointer; }
.rc-dot[aria-pressed="true"] { outline: 2px solid #fff; outline-offset: 2px; }
.rc-dock .rc-tm b.rc-time { color: #ffd60a; }
.rc-dock.paused .rc-tm b.rc-time { color: #cbb84a; }

/* all dropdowns the same size; no text cursor in the static text */
.rc-ext select, .rc-sel, .rc-sub select { width: 150px; height: 34px; padding: 0 28px 0 11px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background-color: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.rc-ext select:focus, .rc-sel:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.rc-in { user-select: none; -webkit-user-select: none; caret-color: transparent; cursor: default; }
.rc-in select, .rc-in button, .rc-in label, .rc-in .sw { cursor: pointer; }
.rc-note b { color: var(--primary); font-weight: 800; background: color-mix(in srgb, var(--primary) 14%, transparent); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 520px) { .rc-ext select, .rc-sel { width: 118px; } }

/* fixed size: choosing options never changes the height of the window */
.rc-row { height: 54px; min-height: 54px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
.rc-lb small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-lb b { white-space: nowrap; }
.rc-note, .rc-err { box-sizing: border-box; min-height: 52px; display: flex; align-items: center; }
.rc-note:empty { display: flex; }
.rc-note[hidden], .rc-err[hidden] { display: none; }
@media (max-height: 640px) { .rc-row { height: 46px; min-height: 46px; } .rc-note, .rc-err { min-height: 40px; } }

/* colours as rules (the page's security policy does not allow style="" attributes) */
.rc-dot[data-c="#ef3b4f"] { background: #ef3b4f; }
.rc-dot[data-c="#4f8cff"] { background: #4f8cff; }
.rc-dot[data-c="#22c55e"] { background: #22c55e; }

/* colour boxes */
.rc-dot { width: 22px; height: 22px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, .35); }
.rc-dot[aria-pressed="true"] { outline: 2px solid #fff; outline-offset: 2px; border-color: transparent; }
.rc-dot[data-c="#ffd60a"] { background: #ffd60a; }
.rc-dot[data-c="#ffffff"] { background: #ffffff; border-color: rgba(0, 0, 0, .25); }
.rc-dot[data-c="#ffffff"][aria-pressed="true"] { border-color: #2a2d3a; }
