/* livepow-web lp-account.css: sign-up / log-in sheet, account page, toast (js/lp-account.js). 360 px first. */

html.lp-acct-open { overflow: hidden; }

/* The overlay covers the VISIBLE area: --lp-vvt / --lp-vvh follow window.visualViewport while the sheet is open (set by
   lp-account.js), so an on-screen keyboard shrinks it and the sheet stays above the keyboard; else 100dvh (100vh). */
.lp-acct-ov {
  position: fixed; left: 0; right: 0; top: var(--lp-vvt, 0px); height: 100vh; height: var(--lp-vvh, 100dvh); z-index: 200;
  background: rgba(15, 30, 50, .55); box-sizing: border-box;
  display: flex; align-items: flex-end; justify-content: center;
  animation: lp-acct-fade .15s ease-out;
}
.lp-acct-sheet {
  position: relative; box-sizing: border-box; width: 100%; max-width: 440px; max-height: calc(100% - 12px);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  /* bottom padding: room past the last button (and the home indicator) so it can always be scrolled into view */
  background: #fff; color: var(--lp-text); border-radius: 14px 14px 0 0;
  padding: 18px 16px calc(28px + env(safe-area-inset-bottom, 0px)); scroll-padding: 16px 0 28px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
  animation: lp-acct-up .2s ease-out;
}
@media (min-width: 560px) {
  .lp-acct-ov { align-items: center; padding: 16px; }
  .lp-acct-sheet { border-radius: 12px; padding: 22px 24px 26px; max-height: 100%; }
}
@keyframes lp-acct-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lp-acct-up { from { transform: translateY(24px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .lp-acct-ov, .lp-acct-sheet { animation: none; } }

.lp-acct-x {
  position: absolute; top: 6px; right: 8px; width: 40px; height: 40px; border: 0; background: none;
  font-size: 26px; line-height: 1; color: var(--lp-muted); cursor: pointer; border-radius: 50%;
}
.lp-acct-x:hover, .lp-acct-x:focus-visible { background: #eef2f7; color: var(--lp-text); }

.lp-acct-h { margin: 0 36px 6px 0; font-size: 1.2rem; color: var(--lp-accent); }
.lp-acct-sub { margin: 0 0 14px; font-size: .92rem; color: var(--lp-muted); }
.lp-acct-body p { margin: 0 0 10px; }

.lp-acct-oauth { display: grid; gap: 8px; margin: 4px 0 12px; }
.lp-acct-prov {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; width: 100%;
  font: inherit; font-weight: 700; font-size: .95rem; border-radius: 8px; cursor: pointer;
}
.lp-acct-google { background: #fff; color: #1f1f1f; border: 1px solid #c7c7c7; }
.lp-acct-google:hover { background: #f4f6f9; }
.lp-acct-apple { background: #000; color: #fff; border: 1px solid #000; }
.lp-acct-apple:hover { background: #222; }
.lp-acct-ico { display: inline-flex; }
.lp-acct-or { display: flex; align-items: center; gap: 10px; margin-top: 4px; color: var(--lp-muted); font-size: .82rem; }
.lp-acct-or::before, .lp-acct-or::after { content: ""; flex: 1; border-top: 1px solid #ddd; }

.lp-acct-form { display: grid; gap: 10px; }
.lp-acct-form .lp-field input { height: 44px; }
.lp-acct-form .lp-form-actions .lp-btn { width: 100%; height: 44px; font-size: 1rem; }
.lp-acct-form .lp-check { font-size: .85rem; }

.lp-acct-alt { margin-top: 12px !important; font-size: .9rem; text-align: center; }
.lp-acct-link {
  border: 0; background: none; padding: 0; font: inherit; color: var(--lp-link); text-decoration: underline; cursor: pointer;
}
.lp-acct-danger { color: #b00020; font-size: .85rem; }
.lp-acct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 12px 0; }
.lp-acct-del { margin-top: 8px; padding: 10px; border: 1px solid #f0c4c4; border-radius: 8px; background: #fff7f7; display: grid; gap: 8px; }
.lp-acct-del[hidden], .lp-acct-body [hidden] { display: none; }
.lp-acct-del input { height: 40px; padding: 0 10px; font: inherit; font-size: 16px; border: 1px solid #bbb; border-radius: 6px; }

/* account.php */
.lp-acct-card { max-width: 480px; margin: 16px auto; padding: 18px 16px 22px; background: #fff; overflow: visible; height: auto; }
/* room below the page's forms so the last button can scroll above an on-screen keyboard */
.lp-account-page .lp-main { padding-bottom: max(24px, env(safe-area-inset-bottom, 0px)); }
html:has(.lp-account-page) { scroll-padding-bottom: 96px; }

/* giveaway line (sign-up / waitlist), survey bonus */
.lp-acct-prize {
  margin: 0 0 12px !important; padding: 9px 12px; border-radius: 8px; font-size: .9rem;
  background: #fff6db; border: 1px solid #f1d98a; color: #4a3b00;
}
.lp-acct-prize a, .lp-sv-bonus a { color: inherit; }
.lp-sv-bonus { margin: 0 0 4px !important; font-size: .88rem; color: #1b5e20; }

/* account view: refer friends, admin stats */
.lp-acct-h3 { margin: 0 0 6px; font-size: 1.02rem; color: var(--lp-accent); }
.lp-acct-ref, .lp-acct-admin { margin: 16px 0 8px; padding-top: 14px; border-top: 1px solid var(--lp-border); }
.lp-acct-ref[hidden], .lp-acct-admin[hidden] { display: none; }
.lp-acct-ref .lp-muted { font-size: .88rem; }
.lp-acct-ref-row { display: flex; gap: 8px; align-items: center; }
.lp-acct-ref-url {
  flex: 1; min-width: 0; height: 40px; box-sizing: border-box; padding: 0 10px; font: inherit; font-size: 16px;
  border: 1px solid var(--lp-border-2); border-radius: 6px; background: var(--lp-surface-2); color: var(--lp-input-text);
}
.lp-acct-ref-row .lp-btn { height: 40px; flex: none; }
.lp-acct-ref-said { margin: 4px 0 0 !important; min-height: 1.2em; font-size: .85rem; color: #1b5e20; }
.lp-acct-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.lp-acct-stat {
  display: grid; gap: 1px; padding: 9px 11px; border-radius: 8px; background: var(--lp-surface-2); border: 1px solid var(--lp-border);
}
.lp-acct-stat b { font-size: 1.35rem; line-height: 1.15; color: var(--lp-accent); }
.lp-acct-stat span { font-size: .85rem; }
.lp-acct-stat small { font-size: .76rem; color: var(--lp-muted); }
.lp-acct-stat-wide { grid-column: 1 / -1; }
.lp-acct-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lp-acct-admin-head .lp-acct-h3 { margin: 0; }
.lp-acct-admin-note { margin: 6px 0 0 !important; font-size: .8rem; }
.lp-acct-why { max-width: 480px; margin: 0 auto 24px; padding: 0 4px; }

/* toast: signed-in note and the gentle long-range nudge */
.lp-acct-toast {
  position: fixed; z-index: 190; left: 50%; bottom: 12px; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 440px; box-sizing: border-box;
  background: var(--lp-blue); color: #fff; border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .3); font-size: .92rem;
}
.lp-acct-toast p { margin: 0; }
.lp-acct-toast-act { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.lp-acct-toast .lp-btn-primary { background: #fff; color: var(--lp-blue); }
.lp-acct-toast .lp-btn-primary:hover { background: #e8f0fa; }
.lp-acct-toast .lp-btn:not(.lp-btn-primary) { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }

/* inline host (the banner's waitlist form, lp-banner.js) */
.lp-acct-inline { max-width: 460px; }
.lp-acct-inline .lp-acct-h { margin-right: 0; }
.lp-acct-fine { font-size: .8rem; margin-top: 10px !important; }

/* optional onboarding survey (lp-account.js surveyForm): under "Check your email", the confirm landing, a first OAuth sign-in */
.lp-sv { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--lp-border); }
.lp-sv-h { margin: 0; font-size: 1.05rem; color: var(--lp-accent); }
.lp-sv .lp-acct-sub { margin-bottom: 4px; }
.lp-acct-form .lp-field textarea {
  display: block; width: 100%; box-sizing: border-box; min-height: 64px; padding: 8px 10px; resize: vertical;
  font: inherit; font-size: 16px; border: 1px solid var(--lp-border-2); border-radius: 6px;
  background: var(--lp-surface); color: var(--lp-input-text);
}
.lp-sv-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.lp-sv-set legend { padding: 0; margin-bottom: 6px; font-size: .85rem; font-weight: 700; }
.lp-sv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-sv-chip { position: relative; }
.lp-sv-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.lp-sv-chip span {
  display: inline-block; padding: 8px 14px; min-height: 20px; border: 1px solid var(--lp-border-2); border-radius: 999px;
  font-size: .92rem; cursor: pointer; user-select: none; background: var(--lp-surface);
}
.lp-sv-chip input:checked + span { background: var(--lp-blue); border-color: var(--lp-blue); color: #fff; }
.lp-sv-chip input:focus-visible + span { outline: 2px solid var(--lp-link); outline-offset: 2px; }
.lp-sv-other, .lp-sv-day input {
  display: block; width: 100%; box-sizing: border-box; height: 40px; padding: 0 10px; font: inherit; font-size: 16px;
  border: 1px solid var(--lp-border-2); border-radius: 6px; background: var(--lp-surface); color: var(--lp-input-text);
}
.lp-sv-other { margin-top: 8px; }
.lp-sv-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lp-sv-day { display: grid; gap: 3px; font-size: .82rem; color: var(--lp-muted); }
.lp-sv-act { display: flex; gap: 10px; }
.lp-sv-act .lp-btn { height: 44px; font-size: 1rem; }
.lp-sv-act .lp-btn-primary { flex: 1; }
.lp-sv-skip { padding: 0 20px; }
.lp-sv-thanks { margin: 14px 0 0 !important; padding-top: 12px; border-top: 1px solid var(--lp-border); font-weight: 700; color: #1b5e20; }
html[data-theme=dark] .lp-sv-thanks { color: #7fdc8f; }
html[data-theme=dark] .lp-sv-chip input:checked + span { background: #3d6fa3; border-color: #3d6fa3; }

/* survey: apps, pricing, Instagram; account Instagram box */
.lp-sv-note { margin: 0 0 6px !important; font-size: .82rem; }
.lp-sv-inline { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-sv-inline label { font-size: .82rem; color: var(--lp-muted); margin: 0; }
.lp-sv-inline select, .lp-sv-day select { height: 40px; border: 1px solid var(--lp-border-2); border-radius: 6px; background: var(--lp-surface); color: var(--lp-input-text); padding: 0 6px; font: inherit; font-size: 16px; }
.lp-sv-set .lp-sv-days:has(.lp-sv-wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 420px) { .lp-sv-set .lp-sv-days:has(.lp-sv-wide) { grid-template-columns: 1fr; } }
.lp-acct-ig { margin-top: 14px; }
.lp-acct-ig .lp-muted { font-size: .88rem; }
.lp-sv-set .lp-sv-days { align-items: end; }
.lp-sv-inline select { flex: 1; min-width: 150px; }
