/* Boards, themes, paywall and sign-in: sheets that share the settings modal's look */

/* brand = board switcher */
#brand {
  background: none; border: 0; padding: 6px 0; font: inherit; font-size: 15px; top: 14px;
  display: inline-flex; align-items: center; cursor: pointer; transition: color .3s, opacity .8s;
}
#brand:hover { color: var(--ink); }
#brandName { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#brand svg { position: absolute; right: -20px; width: 16px; height: 16px; opacity: .7; }
body.touring #brand { pointer-events: none; }
body.touring #brand svg { opacity: 0; }

dialog.sheet {
  width: min(430px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 26px 24px 22px;
  color: var(--ink); border-radius: 30px; overflow: auto;
  background: linear-gradient(160deg, rgba(40, 46, 96, .96), rgba(18, 22, 46, .98));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .5), 0 0 120px color-mix(in srgb, var(--violet) 22%, transparent);
}
dialog.sheet[open] { animation: settingsIn .35s cubic-bezier(.2, .85, .25, 1); }
dialog.sheet::backdrop { background: rgba(6, 9, 20, .6); }
dialog.sheet[open]::backdrop { animation: settingsFade .35s; }
@media (prefers-reduced-motion: reduce) { dialog.sheet[open], dialog.sheet[open]::backdrop { animation: none; } }
dialog.sheet h2 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.dlg-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .1); font-size: 20px; line-height: 1; color: var(--ink-dim);
}
.dlg-close:hover { background: rgba(255, 255, 255, .2); color: var(--ink); }
.wide { width: 100%; }
.sheet .label { margin: 14px 0 8px; }
.pro-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  background: color-mix(in srgb, var(--violet) 28%, transparent); color: var(--violet); vertical-align: 1px;
}
.pro-tag[hidden] { display: none; }
.form-msg { min-height: 1.2em; margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: #ffc2d0; }
.form-msg.ok { color: #b7f0cf; }
.form-msg:empty { display: none; }
.linkish { background: none; border: 0; padding: 4px 2px; color: var(--ink-dim); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
.field-input {
  width: 100%; margin: 0 0 10px; padding: 11px 14px; border-radius: 16px; font: inherit; font-size: 15px; color: var(--ink);
  background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .12); outline: 0;
}
.field-input:focus { border-color: rgba(255, 255, 255, .38); }
.field-input::placeholder { color: rgba(233, 236, 248, .38); }
#deletePw { margin: 8px 0 0; font-size: 14px; padding: 9px 12px; }
#deletePw[hidden] { display: none; }

/* in-place two-step confirm, for any .set-row with .ask + .confirm */
.set-row .confirm { display: none; gap: 8px; flex: none; }
.set-row.confirming .ask { display: none; }
.set-row.confirming .confirm { display: flex; }
.set-row .confirm .chip:last-child { border-color: rgba(255, 150, 175, .5); background: rgba(255, 150, 175, .14); color: #ffc2d0; }
.set-row .confirm .chip:last-child:hover { background: rgba(255, 150, 175, .26); }
#signOutRow .confirm .chip:last-child { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .2); color: var(--ink); }

/* board picker */
.board-list { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 6px; }
.board-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 18px; text-align: left;
  background: rgba(255, 255, 255, .05); border: 1px solid transparent; transition: background .2s, border-color .2s;
}
.board-row:hover { background: rgba(255, 255, 255, .1); }
.board-row[aria-current="true"] { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); }
.board-row .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.board-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .meta { flex: none; font-size: 12px; color: var(--ink-dim); }
.board-row.locked { opacity: .6; }
#boardNew { text-align: center; padding: 11px 14px; }
.board-edit { margin-top: 6px; }
.board-edit .set-row { margin-top: 14px; padding-bottom: 0; }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme {
  display: grid; gap: 6px; justify-items: center; padding: 10px 6px 8px; border-radius: 18px; font-size: 13px;
  background: rgba(255, 255, 255, .05); border: 1px solid transparent; transition: background .2s, border-color .2s;
}
.theme:hover { background: rgba(255, 255, 255, .1); }
.theme[aria-checked="true"] { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .4); }
.theme .sw { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.theme .lock { font-size: 11px; color: var(--ink-dim); }

/* paywall */
.pw-star { font-size: 26px; color: var(--violet); margin-bottom: 4px; }
.pw-sub { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--ink-dim); }
.pw-feats { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.pw-feats li { display: grid; gap: 1px; padding-left: 22px; position: relative; }
.pw-feats li::before { content: '✦'; position: absolute; left: 0; top: 1px; font-size: 12px; color: var(--violet); }
.pw-feats b { font-weight: 500; font-size: 15px; }
.pw-feats span { font-size: 13px; color: var(--ink-dim); line-height: 1.4; }
.pw-plans { display: grid; gap: 8px; margin-bottom: 14px; }
.plan {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 13px 16px; border-radius: 18px; text-align: left;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); transition: background .2s, border-color .2s;
}
.plan:hover { background: rgba(255, 255, 255, .1); }
.plan[aria-checked="true"] { background: rgba(255, 255, 255, .13); border-color: var(--violet); }
.plan b { font-weight: 500; font-size: 15px; display: block; }
.plan small { color: var(--ink-dim); font-size: 12px; }
.plan .price { text-align: right; font-size: 15px; white-space: nowrap; }
.pw-fine { margin: 10px 0 0; text-align: center; font-size: 12px; line-height: 1.5; color: var(--ink-dim); }
.pw-links { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 8px; font-size: 13px; color: var(--ink-dim); }
.pw-links a { text-decoration: underline; text-underline-offset: 3px; }
.pw-links a[hidden] { display: none; }
#pwBuy[disabled] { opacity: .5; cursor: default; transform: none; }
.primary.wide { display: block; text-align: center; background: var(--violet); }
.primary.alt { background: rgba(255, 255, 255, .92); color: #15122b; margin-bottom: 8px; }

/* sign-in */
.oauth { margin-top: 4px; }
.or { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; font-size: 12px; letter-spacing: .08em; color: var(--ink-dim); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .12); }
#acctForm .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#acctForm .chip { padding: 9px 16px; }
#acctForm .linkish { margin-left: auto; }
