/* openvibe-shared/ov-locker.css — the look of ov-locker.js: a locked item's card, and the sheets that make and unlock * your locker. The same tokens and fallbacks as ov-share.css, so the two read as one family. Nothing spins. */ .ovl-sheet, .ovl-card { --ovl-accent: var(--accent, #3b82f6); --ovl-on-accent: var(--on-accent, #fff); --ovl-surface: var(--bg-card, var(--bg-secondary, Canvas)); --ovl-text: var(--text-primary, CanvasText); --ovl-muted: var(--text-muted, var(--text-secondary, color-mix(in srgb, CanvasText 60%, Canvas))); --ovl-line: var(--border, color-mix(in srgb, CanvasText 14%, transparent)); --ovl-hover: var(--bg-hover, color-mix(in srgb, CanvasText 7%, transparent)); --ovl-field: var(--bg-input, var(--bg-tertiary, Field)); --ovl-bad: var(--danger, #ef4444); --ovl-ok: var(--success, #16a34a); --ovl-lockhue: color-mix(in srgb, var(--ovl-accent) 55%, #8b5cf6); color: var(--ovl-text); font-family: inherit; font-size: 14px; line-height: 1.5; text-align: start; } .ovl-sheet *, .ovl-card * { box-sizing: border-box; } /* ── The sheet ──────────────────────────────────────────────────────────────────────────────────────────── */ .ovl-sheet { box-sizing: border-box; width: min(460px, calc(100vw - 24px)); max-width: none; max-height: min(90dvh, 760px); max-height: min(90vh, 760px); margin: auto; padding: 0; overflow: hidden; background: var(--ovl-surface); border: 1px solid var(--ovl-line); border-radius: var(--ov-radius-3, 20px); box-shadow: 0 28px 70px -18px rgb(0 0 0 / .5), 0 4px 14px rgb(0 0 0 / .14); opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .16s ease, transform .2s cubic-bezier(.2, .8, .2, 1); } .ovl-sheet.is-open { opacity: 1; transform: none; } .ovl-sheet::backdrop { background: rgb(6 10 16 / .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); } html.ovl-locked, html.ovl-locked body { overflow: hidden; } .ovl-box { display: flex; flex-direction: column; max-height: inherit; min-height: 0; } .ovl-head { display: flex; align-items: center; gap: 10px; padding: 16px 10px 8px 20px; } .ovl-title { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; } .ovl-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px; display: grid; align-content: start; gap: 14px; } @media (max-width: 640px), (pointer: coarse) and (max-width: 900px) { .ovl-sheet { width: 100%; max-width: 100%; margin: auto 0 0; border: 0; border-radius: var(--ov-radius-3, 20px) var(--ov-radius-3, 20px) 0 0; opacity: 1; transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .85, .25, 1); } .ovl-sheet.is-open { transform: none; } .ovl-head { position: relative; padding-top: 20px; } .ovl-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 99px; background: color-mix(in srgb, var(--ovl-text) 22%, transparent); } .ovl-body { padding: 4px max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); font-size: 15px; } } /* ── Words, fields, buttons ─────────────────────────────────────────────────────────────────────────────── */ .ovl-lead { margin: 0; color: var(--ovl-muted); font-size: 14px; } .ovl-muted { margin: 0; color: var(--ovl-muted); font-size: 14px; max-width: 42ch; } .ovl-label { display: block; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ovl-muted); } .ovl-hint { display: block; font-size: 12.5px; color: var(--ovl-muted); } .ovl-msg { margin: 0; min-height: 1em; font-size: 13px; color: var(--ovl-muted); } .ovl-msg:empty { display: none; } .ovl-msg.is-bad { color: var(--danger-text, var(--ovl-bad)); } .ovl-form { display: grid; gap: 12px; margin: 0; } .ovl-field { display: grid; gap: 6px; min-width: 0; } .ovl-inputrow { display: flex; align-items: center; gap: 4px; min-width: 0; min-height: 46px; padding: 0 4px 0 12px; background: var(--ovl-field); border: 1px solid var(--ovl-line); border-radius: 12px; transition: border-color .14s ease, box-shadow .14s ease; } .ovl-inputrow:focus-within, .ovl-wordsin:focus { border-color: var(--ovl-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ovl-accent) 26%, transparent); outline: none; } .ovl-input { flex: 1; min-width: 0; width: 100%; height: 44px; padding: 0; border: 0; outline: 0; background: none; color: var(--ovl-text); font: inherit; font-size: 15px; letter-spacing: .01em; } .ovl-wordsin { width: 100%; height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; background: var(--ovl-field); border: 1px solid var(--ovl-line); border-radius: 12px; font: 15px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } @media (pointer: coarse) { .ovl-input, .ovl-wordsin { font-size: 16px; } } .ovl-btn { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; margin: 0; border: 1px solid var(--ovl-line); border-radius: 12px; background: transparent; color: var(--ovl-text); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; transition: background-color .14s ease, transform .1s ease; } .ovl-btn:hover:not(:disabled) { background: var(--ovl-hover); } .ovl-btn:active:not(:disabled) { transform: scale(.98); } .ovl-btn:disabled { opacity: .55; cursor: default; } .ovl-btn.is-primary { background: var(--ovl-accent); border-color: var(--ovl-accent); color: var(--ovl-on-accent); } .ovl-btn.is-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ovl-accent) 88%, #000); } .ovl-btn.is-quiet { border-color: var(--ovl-line); min-height: 40px; font-size: 14px; } .ovl-btn:focus-visible, .ovl-iconbtn:focus-visible, .ovl-link:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ovl-accent) 40%, transparent); } .ovl-iconbtn { -webkit-appearance: none; appearance: none; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ovl-muted); cursor: pointer; } .ovl-iconbtn:hover { background: var(--ovl-hover); color: var(--ovl-text); } .ovl-iconbtn.is-small { width: 38px; height: 38px; } .ovl-iconbtn[aria-pressed="true"] { color: var(--ovl-accent); } .ovl-link { -webkit-appearance: none; appearance: none; justify-self: center; margin: 0; padding: 8px 4px; border: 0; background: none; color: var(--ovl-accent); font: inherit; font-weight: 600; cursor: pointer; border-radius: 6px; } .ovl-link:hover { text-decoration: underline; } .ovl-link.is-quiet { color: var(--ovl-muted); font-weight: 500; } .ovl-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; } .ovl-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ovl-accent); } .ovl-acts { display: flex; flex-wrap: wrap; gap: 8px; } .ovl-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ovl-ico { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; } .ovl-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; } .ovl-ico.is-badge { width: 34px; height: 34px; padding: 7px; border-radius: 10px; color: #fff; background: linear-gradient(140deg, var(--ovl-lockhue), var(--ovl-accent)); } .ovl-ico.is-big { width: 52px; height: 52px; padding: 12px; border-radius: 16px; color: #fff; background: linear-gradient(140deg, var(--ovl-lockhue), var(--ovl-accent)); box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--ovl-accent) 70%, transparent); } /* The strength meter: four segments that fill and colour as the passphrase grows. */ .ovl-meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; } .ovl-meterbar { position: relative; height: 6px; border-radius: 99px; background: var(--ovl-hover); overflow: hidden; } .ovl-meterbar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--ovl-bad); transition: width .25s ease, background-color .25s ease; } .ovl-meter[data-score="1"] .ovl-meterbar::after { width: 25%; } .ovl-meter[data-score="2"] .ovl-meterbar::after { width: 50%; background: var(--warning, #f59e0b); } .ovl-meter[data-score="3"] .ovl-meterbar::after { width: 75%; background: color-mix(in srgb, var(--ovl-ok) 70%, var(--warning, #f59e0b)); } .ovl-meter[data-score="4"] .ovl-meterbar::after { width: 100%; background: var(--ovl-ok); } .ovl-meterwords { font-size: 12.5px; font-weight: 600; color: var(--ovl-muted); min-width: 0; } /* The recovery kit: numbered words in a printable grid. */ .ovl-words { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 12px; list-style: none; counter-reset: ovlw; border: 1px dashed color-mix(in srgb, var(--ovl-accent) 45%, var(--ovl-line)); border-radius: 14px; background: color-mix(in srgb, var(--ovl-accent) 5%, transparent); } .ovl-words li { counter-increment: ovlw; display: flex; align-items: baseline; gap: 6px; min-width: 0; padding: 5px 8px; border-radius: 8px; background: var(--ovl-surface); font: 600 14px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; user-select: all; } .ovl-words li::before { content: counter(ovlw); flex: none; min-width: 1.6em; color: var(--ovl-muted); font-size: 12px; font-weight: 500; text-align: right; } @media (max-width: 400px) { .ovl-words { grid-template-columns: repeat(2, minmax(0, 1fr)); } } .ovl-done { display: grid; justify-items: center; gap: 12px; text-align: center; } .ovl-done .ovl-ico.is-big { background: linear-gradient(140deg, var(--ovl-ok), color-mix(in srgb, var(--ovl-ok) 60%, var(--ovl-accent))); animation: ovl-pop .5s cubic-bezier(.3, 1.6, .5, 1); } .ovl-fp { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--ovl-hover); font: 650 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; word-spacing: .2em; } @keyframes ovl-pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: none; } } /* ── A locked item's card ───────────────────────────────────────────────────────────────────────────────── */ .ovl-card { display: grid; justify-items: center; gap: 12px; max-width: 460px; margin: 40px auto; padding: 32px 24px; text-align: center; background: var(--ovl-surface); border: 1px solid var(--ovl-line); border-radius: var(--ov-radius-3, 20px); background-image: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--ovl-lockhue) 9%, transparent), transparent 70%); } .ovl-card.is-opened { display: none; } .ovl-cardtitle { margin: 4px 0 0; font-size: 19px; font-weight: 700; line-height: 1.3; text-wrap: balance; } .ovl-card .ovl-form { width: 100%; max-width: 340px; text-align: start; } .ovl-card .ovl-btn.is-primary { width: 100%; } @media (forced-colors: active) { .ovl-sheet, .ovl-card { border: 1px solid CanvasText; } } /* The one-time recovery kit is the only printed content. */ @media print { body:has(.ovl-words) > :not(dialog) { display: none !important; } dialog:has(.ovl-words) { position: static; max-height: none; border: 0; box-shadow: none; } dialog:has(.ovl-words) .ovl-acts, dialog:has(.ovl-words) form, dialog:has(.ovl-words) button { display: none !important; } .ovl-words { color: #111; background: #fff; } }