/* PIN LIBRARY — the approved pin gallery, rebuilt inside Fizzavo.
   Palette is the one the owner signed off on in
   .../date-your-diet/marketing/pins/canva/pin-gallery-100.html. */

#pin-library-root {
  --pl-canvas: #EDF6FF;
  --pl-surface: #F8FBFF;
  --pl-ink: #12305B;
  --pl-muted: #587194;
  --pl-rail: #DCEEFF;
  --pl-action: #174A8B;
  background: var(--pl-canvas);
  color: var(--pl-ink);
  padding: 16px;
}

.pl-top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--pl-surface);
  border: 1px solid var(--pl-rail);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.pl-top h1 { margin: 0 0 4px; font-size: 20px; color: var(--pl-ink); }
.pl-topline { margin: 0; font-size: 15px; color: var(--pl-ink); }
.pl-muted { color: var(--pl-muted); font-size: 13px; margin: 4px 0 0; }

/* The brand's own name, under the title. There is no brand switcher here:
   the ribbon at the top of the app is the only brand control. */
.pl-brandhead { margin: 0 0 4px; font-size: 18px; color: var(--pl-ink); }

/* The two blank screens: one centred sentence, nothing else on the page. */
.pl-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}
.pl-blankline { margin: 0; font-size: 17px; color: var(--pl-muted); }

/* "All brands" cannot be used on this screen, so the ribbon shows it
   greyed out and unclickable while the screen is open (brand.js
   setAllBrandsAllowed). */
.brand-tab.ghosted,
.brand-tab[disabled] {
  opacity: .4;
  cursor: default;
  pointer-events: none;
}

.pl-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.pl-panel {
  background: var(--pl-surface);
  border: 1px solid var(--pl-rail);
  border-radius: 10px;
  padding: 14px 16px;
}
.pl-panel h3 { margin: 0 0 6px; font-size: 16px; color: var(--pl-ink); }
.pl-field { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.pl-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  padding: 6px 10px;
  border: 1px solid var(--pl-rail);
  border-radius: 6px;
  background: #fff;
  color: var(--pl-ink);
}
.pl-input-short { flex: 0 0 150px; }
.pl-tier { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pl-tier-btn.pl-on { background: var(--pl-action); color: #fff; border-color: var(--pl-action); }

.pl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.pl-card {
  background: var(--pl-surface);
  border: 1px solid var(--pl-rail);
  border-radius: 10px;
  overflow: hidden;
}
.pl-card.pl-done { opacity: .6; }

.pl-imgwrap { position: relative; cursor: pointer; background: var(--pl-rail); }
.pl-imgwrap img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.pl-badge {
  position: absolute; top: 8px; left: 8px;
  background: #174A8B; color: #fff;
  font-weight: 700; font-size: 16px;
  padding: 4px 10px; border-radius: 6px;
}
.pl-idtag {
  position: absolute; top: 10px; left: 60px;
  background: var(--pl-surface); color: var(--pl-ink);
  font-size: 12px; padding: 4px 8px;
  border-radius: 6px; border: 1px solid var(--pl-rail);
}

.pl-status {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 0; font-size: 14px; color: var(--pl-ink); font-weight: 600;
}
.pl-trial, .pl-hold, .pl-error, .pl-posted-link { padding: 4px 14px 0; margin: 0; font-size: 13px; }
.pl-trial, .pl-posted-link { color: var(--pl-muted); }
.pl-hold { color: var(--pl-ink); }
.pl-error { color: #8B1E1E; }

.pl-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0; }
.pl-act {
  font: inherit; font-size: 13px;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--pl-rail);
  background: var(--pl-surface); color: var(--pl-action);
}
.pl-act[disabled] { opacity: .5; cursor: default; }
.pl-post, .pl-approve, .pl-schedule, .pl-save-creds {
  background: var(--pl-action); color: #fff; border-color: var(--pl-action);
}

.pl-fields { padding: 12px 14px 16px; }
.pl-row { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--pl-rail); }
.pl-row:last-child { border-bottom: none; }
.pl-divider { height: 1px; background: var(--pl-rail); margin: 10px 0; }
.pl-lab { flex: 0 0 130px; color: var(--pl-muted); font-size: 13px; }
.pl-val { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.pl-chip {
  display: inline-block;
  background: var(--pl-rail); color: var(--pl-ink);
  font-size: 12px; padding: 2px 8px; border-radius: 10px;
  margin: 0 4px 4px 0;
}
.pl-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.pl-copy {
  font: inherit; font-size: 12px; margin-left: 6px;
  color: var(--pl-action); background: var(--pl-surface);
  border: 1px solid var(--pl-rail); border-radius: 5px;
  padding: 2px 8px; cursor: pointer;
}
#pin-library-root a { color: var(--pl-action); }

.pl-donebox { margin-top: 20px; border-top: 1px solid var(--pl-rail); padding-top: 12px; }
.pl-donebox > summary { cursor: pointer; font-size: 16px; color: var(--pl-ink); }
.pl-empty { padding: 24px; text-align: center; }

/* The inline editor, the "Edited" chip and the sending panel. Same six
   approved colors — nothing new enters the palette. */
.pl-editedchip {
  background: var(--pl-rail); color: var(--pl-muted);
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 10px;
}

.pl-edit { padding: 10px 14px 16px; border-top: 1px solid var(--pl-rail); margin-top: 10px; }
.pl-edit-field { align-items: flex-start; }
.pl-edit-area {
  font: inherit; font-size: 14px;
  padding: 6px 10px; border: 1px solid var(--pl-rail);
  border-radius: 6px; background: #fff; color: var(--pl-ink);
  flex: 1; min-width: 0; resize: vertical;
}
.pl-edit-problems { margin: 8px 0 0; padding-left: 18px; color: #8B1E1E; font-size: 13px; }
.pl-edit-problems li { margin: 2px 0; }
.pl-edit-save { background: var(--pl-action); color: #fff; border-color: var(--pl-action); }

.pl-push { background: var(--pl-action); color: #fff; border-color: var(--pl-action); }
.pl-push-busy, .pl-push-done { margin: 8px 0 0; font-size: 13px; }
.pl-push-done { color: var(--pl-ink); }

/* "Make a video" — its own row under the posting buttons, so it reads as a
   different kind of thing and still sits on a held or posted card. */
.pl-videorow { padding-top: 8px; }
.pl-makevideo { border-color: var(--pl-action); }
.pl-videoerror { padding-top: 6px; }
.pl-removevideo { border-color: var(--pl-rail); }
.pl-videochip {
  background: var(--pl-rail); color: var(--pl-muted);
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 10px;
}

/* Picture or video: the same pair of small buttons above the picture and
   again under it, the chosen one filled in. */
.pl-switch { display: flex; }
.pl-viewswitch { padding: 10px 14px; }
.pl-switchbtn {
  font: inherit; font-size: 13px;
  padding: 5px 14px; cursor: pointer;
  border: 1px solid var(--pl-rail);
  background: var(--pl-surface); color: var(--pl-action);
}
.pl-switchbtn:first-child { border-radius: 6px 0 0 6px; }
.pl-switchbtn:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.pl-switchon { background: var(--pl-action); color: #fff; border-color: var(--pl-action); }
.pl-postrow { align-items: center; }
.pl-postlab { font-size: 13px; color: var(--pl-muted); }
.pl-posterror { padding-top: 6px; }
.pl-cardvideo {
  display: block; width: 100%; aspect-ratio: 2 / 3;
  object-fit: cover; background: var(--pl-rail);
}

/* Marking a pin he posted by hand, and the ten-second way back. */
.pl-markposted { border-color: var(--pl-action); }
.pl-undoline { margin: 6px 0 0; font-size: 13px; }
.pl-undo {
  border: 0; background: none; padding: 0;
  color: var(--pl-action); font: inherit; text-decoration: underline; cursor: pointer;
}

/* BOARDS — the brand's list of boards, and the per-pin ticks. Same six
   approved colors as the rest of the screen; nothing new. */
.pl-boards { list-style: none; margin: 6px 0 0; padding: 0; }
.pl-boarditem {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 0; font-size: 14px;
  border-bottom: 1px solid var(--pl-rail);
}
.pl-boarditem:last-child { border-bottom: none; }
.pl-boardx {
  border: 1px solid var(--pl-rail); background: var(--pl-surface);
  color: var(--pl-action); font: inherit; font-size: 14px; line-height: 1;
  padding: 2px 8px; border-radius: 5px; cursor: pointer;
}
.pl-board-add { background: var(--pl-action); color: #fff; border-color: var(--pl-action); }

/* The "Posted to" list on a card: one line per posting, in the owner's
   words -- board, picture or video, when, and how it went. */
.pl-postedto { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.6; }
.pl-postedrow { border-top: 1px solid var(--pl-rail); padding-top: 5px; margin-top: 5px; }
.pl-postedrow:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.pl-postednone { margin: 0; }

/* The chip on the picture: how many postings are done, how many ahead. */
.pl-countchip {
  position: absolute; left: 8px; bottom: 8px;
  background: #fff; color: var(--pl-ink);
  border: 1px solid var(--pl-rail); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 700;
}

/* Pins / Calendar / What works. */
.pl-headline { margin: 4px 0 0; font-size: 13px; color: var(--pl-muted); }
.pl-tabs { display: flex; gap: 6px; margin: 12px 0 0; }
.pl-tab {
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  padding: 0.4em 1em; border-radius: 999px;
  border: 1px solid var(--pl-rail); background: #fff; color: var(--pl-action);
}
.pl-tab-on { background: var(--pl-action); color: #fff; border-color: var(--pl-action); }
.pl-modehost { margin-top: 12px; }

/* Said in red when postings have gone wrong. */
.pl-trouble {
  margin: 10px 0 0; font-size: 14px; font-weight: 700; color: #A3282C;
}
.pl-approvedline { margin: 2px 14px 0; font-size: 13px; color: var(--pl-muted); }

/* The Posted button. */
.pl-markposted.pl-ready {
  background: var(--pl-action); color: #fff; border-color: var(--pl-action);
}

/* "Saved" beside the app secret label: the box stays empty, so the chip is
   the only thing that says a secret is already stored. */
.pl-saved-chip { flex: 0 0 auto; margin: 0; }

/* POST NOW — the block that takes the place of the card's buttons while a
   post is being decided, made or read. Red is the app's existing warning
   red (#8B1E1E, the same one every error line uses); nothing new enters the
   approved palette. */
.pl-postflow {
  padding: 10px 14px 0;
  border-top: 1px solid var(--pl-rail);
  margin-top: 10px;
}
.pl-postflow-head { margin: 8px 0 4px; font-size: 15px; color: var(--pl-ink); }
.pl-postflow-head.pl-postflow-real { color: #8B1E1E; }
.pl-postflow-line { margin: 0; font-size: 13px; color: var(--pl-ink); }
.pl-postflow-link { margin: 6px 0 0; font-size: 13px; }
.pl-postflow-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 0; }
.pl-postflow-busy { display: flex; align-items: center; gap: 8px; padding: 4px 0 6px; }

/* The one button that really sends a pin: loud, red, and never the same
   shape as the quiet "Not now" beside it. */
.pl-post-real {
  background: #8B1E1E; color: #fff; border-color: #8B1E1E; font-weight: 700;
}
.pl-post-pretend, .pl-post-ok {
  background: var(--pl-action); color: #fff; border-color: var(--pl-action);
}

.pl-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--pl-rail); border-top-color: var(--pl-action);
  border-radius: 50%;
  animation: pl-spin 0.8s linear infinite;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }

/* The page's own reminder, above the panels: loud when a press really does
   reach Pinterest, quiet when it does not. */
.pl-realbar {
  margin: 0 0 14px;
  background: #8B1E1E; color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 10px 14px; border-radius: 8px;
}
.pl-practiceline { margin: 0 0 14px; font-size: 13px; color: var(--pl-muted); }

/* Sending pins to fizzavo.com: the job card (progress, step, log, heartbeat)
   and the Pinterest login check's two-word answer. */
.pl-bar {
  height: 8px; border-radius: 999px; margin: 10px 0 6px;
  background: var(--pl-rail); overflow: hidden;
}
.pl-bar > span { display: block; height: 100%; background: var(--pl-action); }
.pl-step { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--pl-ink); }
.pl-log {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.4;
  max-height: 14em; overflow-y: auto; white-space: pre-wrap; padding: 8px;
  border-radius: 6px; border: 1px solid var(--pl-rail); background: var(--pl-canvas);
  color: var(--pl-ink);
}
.pl-beat { margin: 6px 0 0; font-size: 12px; color: var(--pl-muted); }
.pl-beat-slow { margin: 6px 0 0; font-size: 12px; color: #8A5B00; }
.pl-checkrow { align-items: center; }
.pl-check-ok { font-size: 13px; font-weight: 600; color: #1E6B3A; }
.pl-check-bad { font-size: 13px; font-weight: 600; color: #8B1E1E; }

/* Real Pinterest numbers at the end of a posted "Posted to" line. */
.pl-stats { color: var(--pl-muted); font-size: 12px; }

/* Which Pinterest account this brand is logged in as, and the refusal when
   that login already belongs to another brand. */
.pl-account-name { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: #1E6B3A; }
.pl-account-unknown { margin: 2px 0 0; font-size: 13px; color: #8A5B00; }
.pl-connect-problem { margin: 8px 0 0; line-height: 1.45; }
/* "open the Calendar" inside the red line: a real button that reads as a link. */
.pl-trouble-link {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; cursor: pointer;
}
