/* The account sheet, the header's account button and the footer (stage 12). Uses app.css tokens. */

.auth-dialog { width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
.auth-sheet { position: relative; gap: 12px; padding: 22px 22px 24px; }
.auth-close {
  position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border: 0; border-radius: 12px;
  display: grid; place-items: center; background: transparent; color: var(--ink-3); cursor: pointer;
}
.auth-close:hover { background: var(--well); color: var(--ink); }
.auth-close svg.i { width: 20px; height: 20px; }
.auth-title { padding-inline-end: 44px; }
.auth-why { color: var(--ink-2); font-size: 15px; text-wrap: pretty; margin-top: -4px; }
.auth-text { color: var(--ink-2); font-size: 15px; text-wrap: pretty; }
.auth-text b { color: var(--ink); font-weight: 600; word-break: break-all; }
.auth-main { display: flex; flex-direction: column; gap: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .btn.primary { min-height: 50px; font-size: 17px; margin-top: 4px; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--night-deep); }
.auth-tab { min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-3); font: inherit; font-weight: 600; cursor: pointer; }
.auth-tab[aria-selected=true] { background: var(--well-hover); color: #fff; box-shadow: inset 0 0 0 1px var(--rim-strong); }

.btn.google { background: #fff; color: #1f1f1f; font-weight: 600; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.btn.google:hover { background: #f1f3f4; }
.g-logo { width: 20px; height: 20px; flex: none; }
.or { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--rim-strong); }

.field-error { font-size: 13px; color: var(--bad); }
.field-error:empty { display: none; }
p.field-error { margin-top: -6px; }
.field .field-sub { font-weight: 400; }
.pw { position: relative; display: flex; }
.pw input { flex: 1; min-width: 0; padding-inline-end: 72px; }
.pw-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--blue-hi); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.field input[dir=ltr] { text-align: left; }
.field input[dir=ltr]:placeholder-shown { direction: ltr; }

.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; line-height: 1.45; }
.consent input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 6px; background: var(--well); box-shadow: inset 0 0 0 1.5px var(--rim-strong); cursor: pointer; display: grid; place-items: center; }
.consent input:checked { background: var(--blue); box-shadow: none; }
.consent input:checked::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.consent input:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 2px; }
.consent a { color: var(--blue-hi); text-underline-offset: 3px; }
.forgot-link { align-self: center; }

/* The header's account button */
.account { position: relative; display: inline-flex; }
.account-initial { font-size: 20px; font-weight: 800; line-height: 1; }
.account-btn.signed-in { background: linear-gradient(180deg, #2a74ff 0%, #1b5fe6 100%); color: #fff; }
.account-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; min-width: 200px; padding: 6px;
  border-radius: var(--r-md); background: linear-gradient(180deg, #17293e 0%, #102033 100%);
  box-shadow: 0 0 0 1px var(--rim-strong), 0 18px 40px rgba(0, 0, 0, 0.55); display: flex; flex-direction: column;
}
.account-name { padding: 8px 12px 6px; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none;
  color: var(--ink); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; text-align: start;
}
.account-menu a:hover, .account-menu button:hover { background: var(--well-hover); }
.account-menu .only-narrow { display: none; }
@media (max-width: 640px) {
  .account-menu .only-narrow:not([hidden]) { display: flex; }
  .top-end #settings { display: none; }
}

/* The rights line at the photo and song steps (12b) */
.rights-note { font-size: 12px; color: var(--ink-3); margin-top: 8px; text-wrap: pretty; }
.rights-note a { color: var(--ink-2); text-underline-offset: 3px; }

/* The footer */
.site-foot { max-width: 1240px; margin: 8px auto 0; padding: 18px 20px 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 13px; color: var(--ink-4); }
.site-foot a { color: var(--ink-3); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* The share sheet (12b) */
.share-dialog { width: min(440px, calc(100vw - 24px)); }
.share-sub { color: var(--ink-2); font-size: 15px; text-wrap: pretty; }
.share-actions { margin-top: 4px; }
.btn.whatsapp { color: #3ccf8e; }

/* The entry screen (12b): without an account only the sign-in sheet shows; the editor waits behind. */
body.entry .layout, body.entry .top .export, body.entry .top-end { visibility: hidden; }
.auth-dialog.entry::backdrop { background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(27, 102, 255, 0.18) 0%, rgba(4, 10, 20, 0.92) 70%); backdrop-filter: blur(2px); }
