/* Shared styling for js/account-sync.js -- the nav badge (every page),
   the full sync form (home page only, via AccountSync.mount()), and the
   compact status line on Planner's Depot tab that points to that form. Loaded on every page alongside account-sync.js itself so
   the nav badge is always styled, even on pages that never call
   mount(). */

/* --- nav badge --------------------------------------------------- */

.accountNavBadge {
  display: inline-flex;
  align-items: center;
  margin-right: 0.6rem;
  padding: 0.25em 0.6em;
  border-radius: 1em;
  font-size: 0.78rem;
  font-weight: bold;
  color: #f8d511;
  background: rgba(248, 213, 17, 0.1);
  border: 1px solid rgba(248, 213, 17, 0.35);
  text-decoration: none;
  white-space: nowrap;
}

@media (hover: hover) {
  .accountNavBadge:hover {
    background: rgba(248, 213, 17, 0.18);
  }
}

@media (max-width: 720px) {
  .accountNavBadge {
    display: none;
  }
}

/* --- compact status line (Planner's Depot tab) -------------------- */

.accountSyncStatusLine {
  max-width: 640px;
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: #ccc;
  line-height: 1.5;
}

.accountSyncStatusLine a {
  color: #f8d511;
}

/* --- full sync form (home page) ----------------------------------- */

#accountSync {
  max-width: 640px;
  margin: 0 0 32px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 20px 20px;
}

#accountSync.hidden {
  display: none;
}

.accountSyncHeading {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: #eee;
}

.accountSyncIntro {
  color: var(--light-text-color, #999);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 14px;
}

.accountSyncSynced {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.accountSyncSynced.hidden {
  display: none;
}

.accountSyncSynced p {
  margin: 0;
  font-size: 0.9rem;
  color: #ddd;
}

/* The "View your account overview" link inside that paragraph -- same
   yellow CTA treatment as its sibling "Use a different account" button
   (.accountSyncLinkBtn below) and every other account-sync prompt
   (.accountSyncStatusLine a, .accountPageNotSynced a, etc.), rather than
   style.css's sitewide muted default, since it's a primary action for
   this section. */
.accountSyncSynced a {
  color: #f8d511;
}

.accountSyncLinkBtn {
  background: none;
  border: none;
  padding: 0;
  color: #f8d511;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
}

#accountSyncForm.hidden {
  display: none;
}

.accountSyncNotice {
  color: var(--light-text-color, #999);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

.accountSyncRow {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.accountSyncRow.hidden {
  display: none;
}

.accountSyncAdvanced {
  margin: -4px 0 10px;
}

.accountSyncAdvanced summary {
  cursor: pointer;
  padding: 4px 0;
  font-size: 0.75rem;
  color: #999;
}

.accountSyncAdvanced summary:hover {
  color: #ccc;
}

.accountSyncAdvanced .accountSyncRow {
  margin-top: 8px;
}

.accountSyncRow label {
  font-size: 0.75rem;
  color: #aaa;
}

.accountSyncRow input {
  box-sizing: border-box;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #555;
  background: #1c1c1c;
  color: #eee;
  font-size: 0.9rem;
}

.accountSyncActions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.accountSyncActions.hidden {
  display: none;
}

.accountSyncActions button {
  background: rgba(248, 213, 17, 0.12);
  border: 1px solid rgba(248, 213, 17, 0.4);
  color: #f8d511;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
}

.accountSyncActions button:hover {
  background: rgba(248, 213, 17, 0.2);
}

.accountSyncActions button:disabled {
  opacity: 0.5;
  cursor: default;
}

.accountSyncActions button.accountSyncCancelBtn {
  background: none;
  border-color: rgba(255, 255, 255, 0.2);
  color: #aaa;
}

.accountSyncActions button.accountSyncCancelBtn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ddd;
}

.accountSyncStatus {
  font-size: 0.8rem;
  color: #999;
  min-height: 1em;
  margin-bottom: 10px;
}

.accountSyncStatus.accountSyncStatusError {
  color: #e88;
}

.accountSyncConfirm {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accountSyncConfirm.hidden {
  display: none;
}

.accountSyncConfirm p {
  margin: 0;
  font-size: 0.82rem;
  color: #ddd;
  line-height: 1.4;
}
