/* Shared visual-only account preview dialog. */

.account-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 20px 20px;
  background: rgba(6, 10, 15, .58);
  backdrop-filter: blur(3px);
}

.account-preview-overlay[hidden] {
  display: none !important;
}

.account-preview-overlay__backdrop {
  position: absolute;
  inset: 0;
}

.account-preview-overlay__dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  box-shadow: var(--shadow);
}

.account-preview-overlay__header {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.account-preview-overlay__eyebrow {
  margin: 0 0 4px;
}

.account-preview-overlay__header h2 {
  font-size: 23px;
  line-height: 1.05;
}

.account-preview-overlay__close {
  width: 34px;
  height: 34px;
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--txt-dim);
  font-size: 22px;
  line-height: 1;
}

.account-preview-overlay__close:hover {
  background: var(--bg-hover);
  color: var(--txt);
}

.account-preview-overlay__body {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 20px;
}

.account-preview-overlay__notice {
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--txt-dim);
  font-size: 13px;
  line-height: 1.5;
}

.account-preview-overlay__notice-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.account-preview-overlay__notice-link:hover,
.account-preview-overlay__notice-link:focus-visible {
  text-decoration: underline;
}

.account-preview-overlay__form button,
.account-preview-overlay__signed-in {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-3);
  color: var(--txt);
  font-size: 13.5px;
  font-weight: 600;
}

.account-preview-overlay__form button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.account-preview-overlay__form {
  display: grid;
  gap: 7px;
}

.account-preview-overlay__form label {
  color: var(--txt-dim);
  font-size: 13px;
  font-weight: 500;
}

.account-preview-overlay__form input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-3);
  color: var(--txt);
}

.account-preview-overlay__form button {
  margin-top: 8px;
}

.account-preview-overlay__status {
  min-height: 1.25em;
  margin: 4px 0 0;
  color: var(--tally);
  font-size: 12px;
}

.account-preview-overlay__switch {
  margin: 18px 0 0;
  color: var(--txt-dim);
  font-size: 13px;
  text-align: center;
}

.account-preview-overlay__switch button {
  padding: 0;
  color: var(--link);
  text-decoration: underline;
}

.account-preview-overlay__signed-in {
  margin-top: 22px;
  border-color: color-mix(in srgb, var(--new) 50%, var(--line));
  color: var(--new);
}

@media (max-width: 620px) {
  .account-preview-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .account-preview-overlay__dialog {
    width: 100%;
    max-height: 88vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: var(--r) var(--r) 0 0;
  }

  .account-preview-overlay__body {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}
