/* 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; }
