/* Account sign-in UI: top-bar button, modal panel, toast. Uses theme tokens. */

/* --- Top-bar account button --- */
.elc-account-btn {
  margin-left: 4px;
  flex-shrink: 0;
  font-family: var(--display-font);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-deep);
  background: var(--surface);
  border: 1px solid var(--blue);
  border-radius: var(--pill);
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
/* :not(:disabled) beats base.css's global button:hover background, so the
   light cream override never washes over the blue hover state. */
.elc-account-btn:hover:not(:disabled) {
  background: var(--blue);
  color: #fff;
}
.elc-account-btn.is-in {
  border-color: var(--green);
  color: var(--green-deep);
}
.elc-account-btn.is-in::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  vertical-align: middle;
}
.elc-account-btn.is-in:hover:not(:disabled) {
  background: var(--green);
  color: #fff;
}

/* --- Modal overlay + panel --- */
.elc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 12, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.elc-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.elc-panel {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  padding: 26px 26px 22px;
  transform: translateY(8px);
  transition: transform 0.18s ease;
}
.elc-overlay.show .elc-panel { transform: translateY(0); }
.elc-panel h2 {
  font-family: var(--display-font);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 10px;
}
.elc-panel p {
  font-family: var(--reading-font);
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.55;
  margin: 0 0 10px;
}
.elc-muted { color: var(--ink-soft) !important; }

.elc-form { display: flex; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
.elc-input {
  flex: 1 1 180px;
  min-width: 0;
  font-family: var(--reading-font);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.elc-input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.elc-btn-primary,
.elc-btn-ghost {
  font-family: var(--display-font);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid transparent;
}
.elc-btn-primary { background: var(--blue); color: #fff; border-color: var(--blue-deep); }
.elc-btn-primary:hover { background: var(--blue-deep); }
.elc-btn-primary:disabled { opacity: 0.6; cursor: default; }
.elc-btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-strong); }
.elc-btn-ghost:hover { background: var(--surface-2); }

.elc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.elc-status { font-size: 0.86rem; margin: 8px 0 0; min-height: 1.1em; }
.elc-status.is-ok { color: var(--green-deep); }
.elc-status.is-error { color: #b23; }
.elc-status a { color: var(--blue); }

/* --- Toast --- */
.elc-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: #fff;
  font-family: var(--reading-font);
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: var(--pill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 9500;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.elc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.elc-toast.is-error { background: #8a2432; }

@media (max-width: 760px) {
  .elc-account-btn { padding: 6px 12px; font-size: 0.74rem; margin-left: 4px; }
}
