/* Wild Coast tool styling - matches wildcoastflowerpreservation.com aesthetic
   Palette: minimalist grayscale (white/charcoal/gray), photography-forward.
   Headings: Lato 600, slight letter-spacing.
   Body: system sans for performance + Lato for marquee text. */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f7f6f6;
  --text:      #2C3031;
  --muted:     #6F767A;
  --border:    #BBC3C8;
  --border-soft: #e6e8ea;
  --accent:    #2C3031;
  --accent-h:  #000000;
  --error:     #B5453B;
  --success:   #4F7B5C;
  --radius:    4px;            /* Shopify Dawn-ish: minimal radius, sharp edges */
  --heading-letter-spacing: 0.03em;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: #CDF1EE;
  background-image: url('/assets/footer-bg.png');
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-h); }

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--bg);
  padding: clamp(28px, 5vw, 44px);
  max-width: 420px;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.auth-card .brand-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-card .brand-logo img {
  max-width: 240px;
  width: 100%;
  height: auto;
  display: inline-block;
}

.auth-card h1 {
  font-family: "Lato", -apple-system, sans-serif;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: var(--heading-letter-spacing);
  margin: 0 0 8px;
  text-align: center;
}

.auth-card .lede {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 28px;
  text-align: center;
}

.auth-card form { margin-top: 8px; }

.auth-card label {
  display: block;
  margin-bottom: 16px;
}

.auth-card label > span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.auth-card input[type=email],
.auth-card input[type=text],
.auth-card input[type=tel] {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--text);
}

.auth-card input.code-input {
  letter-spacing: 0.4em;
  text-align: center;
  font-size: 1.4rem;
  font-feature-settings: "tnum";
  padding: 14px 16px;
}

.auth-card .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 22px;
  font-size: 0.92rem;
  color: var(--muted);
}

.auth-card .checkbox-row input[type=checkbox] {
  accent-color: var(--text);
}

.auth-card button {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-family: "Lato", -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}

.auth-card button:hover:not(:disabled) {
  background: var(--accent-h);
}

.auth-card button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.auth-card .alt-link {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-card .alt-link a { color: var(--text); }

.auth-card .alert {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  border: 1px solid;
}

.auth-card .alert.error {
  background: #FBE9E7;
  color: var(--error);
  border-color: #F0C0BB;
}

.auth-card .small {
  font-size: 0.82rem;
  color: var(--muted);
}

.dashboard {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
}

.dashboard header.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 28px;
}

.dashboard-logo img {
  max-width: 180px;
  height: auto;
  display: block;
}
.dashboard h1 {
  font-family: "Lato", -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: var(--heading-letter-spacing);
  margin: 0;
  font-size: 1.4rem;
}

.dashboard .greet { color: var(--muted); font-size: 0.93rem; margin-top: 4px; }
.dashboard .small { font-size: 0.82rem; color: var(--muted); }

/* ========== Workspace pages (logged-in: dashboard, listings, etc.) ========== */
/* Override the auth-page cyan/floral with a clean white workspace */

body.workspace {
  background-color: var(--bg);
  background-image: none;
}

.ws-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 0;
}
.ws-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ws-header .logo img {
  height: 36px;
  width: auto;
  display: block;
}
.ws-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
  color: var(--muted);
}
.ws-header nav a {
  color: var(--text);
  text-decoration: none;
}
.ws-header nav a:hover { text-decoration: underline; }
.ws-header nav .ws-feedback-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.ws-header nav .ws-feedback-link:hover { text-decoration: underline; }
.ws-header nav .ws-feedback-link:focus { outline: 2px solid var(--text); outline-offset: 2px; }
.ws-header .user-info { color: var(--muted); font-size: 0.85rem; }

.ws-header nav .ws-conn-form { margin: 0; }
.ws-conn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
  transition: border-color 0.15s, background 0.15s;
}
.ws-conn-badge:hover { border-color: var(--text); }
.ws-conn-badge:focus { outline: 2px solid var(--text); outline-offset: 2px; }
.ws-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.ws-conn-badge.is-on  .ws-conn-dot { background: #2a8a4a; }
.ws-conn-badge.is-off .ws-conn-dot { background: #c0392b; }
.ws-conn-badge.is-on  { background: #f0f9f3; border-color: #c7e3d2; color: #2e5c3e; }
.ws-conn-badge.is-off { background: #fbf0f0; border-color: #e3c7c7; color: #8b2e2e; }
.ws-conn-tag {
  margin-left: 4px;
  padding: 0 6px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fff3cd;
  color: #856404;
  border-radius: 8px;
}

/* ---- Slide-in navigation drawer (hamburger) ----
   CSS-only: a hidden checkbox (#ws-nav-toggle) drives open/close via the
   sibling combinator. Lives in the shared header, so every page gets it. */
.ws-nav-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.ws-nav-hamburger {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; width: 38px; height: 38px; padding: 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; flex-shrink: 0; transition: border-color 0.15s, background 0.15s;
}
.ws-nav-hamburger:hover { border-color: var(--text); background: var(--bg-soft); }
.ws-nav-hamburger:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ws-nav-hamburger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

.ws-nav-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 998;
}
.ws-nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 90vw);
  background: var(--bg); box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(100%); transition: transform 0.25s ease; z-index: 999;
  display: flex; flex-direction: column; overflow: hidden;
}
.ws-nav-toggle:checked ~ .ws-nav-drawer   { transform: translateX(0); }
.ws-nav-toggle:checked ~ .ws-nav-backdrop { opacity: 1; pointer-events: auto; }

.ws-nav-drawer-header {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; background: #2c5f5d; color: #fff;
}
.ws-nav-drawer-header span {
  font-family: "Lato", -apple-system, sans-serif; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem;
}
.ws-nav-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: none; background: rgba(255, 255, 255, 0.15);
  color: #fff; border-radius: 6px; cursor: pointer; font-size: 20px; line-height: 1;
}
.ws-nav-close:hover { background: rgba(255, 255, 255, 0.28); }

.ws-nav-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; }
.ws-nav-home {
  display: block; padding: 10px 12px; margin-bottom: 18px;
  font-weight: 600; color: var(--text); text-decoration: none;
  background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: 7px;
}
.ws-nav-home:hover { border-color: var(--text); text-decoration: none; }
.ws-nav-section { margin: 0 0 18px; }
.ws-nav-section-title {
  margin: 0 0 8px; padding: 0 2px 5px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #2c5f5d; border-bottom: 1px solid var(--border-soft);
}
.ws-nav-links { display: flex; flex-direction: column; gap: 4px; }
.ws-nav-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; font-size: 0.9rem;
  color: var(--text); text-decoration: none; border-radius: 6px; transition: background 0.12s;
}
.ws-nav-links a:hover { background: var(--bg-soft); text-decoration: none; }
.ws-nav-home.is-active,
.ws-nav-links a.is-active { background: #e7f0ef; color: #1f4845; font-weight: 600; }
/* Notification badge inside a drawer link (mirrors the dashboard card badges). */
.ws-nav-badge {
  flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #2c5f5d; color: #fff; font-size: 0.72rem; font-weight: 600;
  line-height: 1; border-radius: 10px;
}
.ws-nav-badge.neutral { background: #888; }

/* Footer Sign out - pinned below the scrollable section list. */
.ws-nav-drawer-footer { flex: 0 0 auto; padding: 12px 16px; border-top: 1px solid var(--border-soft); }
.ws-nav-signout {
  display: block; padding: 10px 12px; text-align: center;
  font-weight: 600; color: var(--text); text-decoration: none;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 7px;
  transition: border-color 0.15s, background 0.15s;
}
.ws-nav-signout:hover { border-color: var(--text); background: #eef2f1; text-decoration: none; }

/* ---- Pinterest section sub-nav (shared across pinterest-* pages) ---- */
.ps-subnav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 22px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.86rem;
}
.ps-subnav .ps-grp {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 700;
}
.ps-subnav .ps-grp:not(:first-child) {
  margin-left: 12px; padding-left: 14px; border-left: 1px solid var(--border-soft);
}
.ps-subnav .ps-link {
  padding: 5px 10px; border-radius: 6px; color: var(--text);
  text-decoration: none; border: 1px solid transparent; transition: background 0.12s;
}
.ps-subnav .ps-link:hover { background: var(--bg-soft); text-decoration: none; }
.ps-subnav .ps-link.is-active { background: #e7f0ef; color: #1f4845; font-weight: 600; }

.ws-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.ws-main h1 {
  font-family: "Lato", -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: var(--heading-letter-spacing);
  margin: 0 0 6px;
  font-size: 1.6rem;
}
.ws-main .lede {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 28px;
}

/* Dashboard hub cards */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.hub-card {
  display: block;
  position: relative;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 22px;
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.hub-card:hover {
  border-color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}
.hub-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.hub-card .hub-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.hub-card .hub-head .icon { margin-bottom: 0; }
.hub-card .hub-head h2 { margin: 0; }
/* iPhone-style notification badge top-right - numeric counts only */
.hub-card .hub-notify {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #2c5f5d;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.hub-card .hub-notify.neutral { background: #666; }
/* Inline status pill next to the title - text states like "in progress" */
.hub-card .hub-pill {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  background: #d1fadf;
  color: #1d6163;
}
.hub-card h2 {
  font-family: "Lato", -apple-system, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 4px;
  letter-spacing: var(--heading-letter-spacing);
}
.hub-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.hub-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.hub-card.disabled:hover {
  border-color: var(--border-soft);
  transform: none;
}
.hub-card .badge-soon {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-soft);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
}
.hub-card .hub-status .badge-soon { margin-left: 0; }

/* Listings page - two-column layout */
.listings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .listings-layout { grid-template-columns: 1fr; }
}

.listings-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.listings-toolbar .count {
  color: var(--muted);
  font-size: 0.9rem;
}
.listings-toolbar input[type=search] {
  flex: 1;
  min-width: 200px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.95rem;
}
.listings-toolbar input[type=search]:focus { outline: none; border-color: var(--text); }
.listings-toolbar select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.92rem;
  background: var(--bg);
  cursor: pointer;
}
.listings-toolbar button {
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Filter rail */
.filters {
  font-size: 0.9rem;
}
.filters h3 {
  font-family: "Lato", -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.filters h3:first-child { margin-top: 0; }
.filters ul { list-style: none; padding: 0; margin: 0; }
.filters li { margin-bottom: 4px; }
.filters a {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
  color: var(--text);
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.88rem;
}
.filters a:hover { background: var(--bg-soft); text-decoration: none; }
.filters a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.filters a .badge {
  color: var(--muted);
  font-size: 0.78rem;
  font-feature-settings: "tnum";
}
.filters a.active .badge { color: rgba(255,255,255,0.85); }

/* Listing grid (gallery view) */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.listing-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.listing-card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.listing-card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  overflow: hidden;
}
.listing-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.listing-card .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.listing-card .title {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text);
  flex: 1;
}
.listing-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-feature-settings: "tnum";
}
.listing-card .price {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}
.listing-card .stats {
  font-size: 0.72rem;
  color: var(--muted);
}
.listing-card .actions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
}
.listing-card .actions button,
.listing-card .actions a {
  flex: 1;
  padding: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}
.listing-card .actions .primary {
  background: var(--accent);
  color: #fff;
  border: 0;
}
.listing-card .actions .primary:hover { background: var(--accent-h); }
.listing-card .featured-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--text);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 10px;
  text-transform: uppercase;
}
.listing-card .thumb { position: relative; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

/* ========== Variant editor ========== */

.variant-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: start;
}
/* The 1fr editor holds arbitrary user content; min-width:auto (the grid-item
   default) lets long unbreakable content inflate the track and overflow. */
.variant-layout > .variant-editor { min-width: 0; }
@media (max-width: 880px) {
  .variant-layout { grid-template-columns: 1fr; }
}

.variant-section-label {
  font-family: "Lato", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}

/* Source preview (left) */
.variant-source { font-size: 0.92rem; }
.variant-source-thumb {
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.variant-source-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variant-source-section {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.variant-source-title {
  font-size: 0.93rem;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 10px;
}
.variant-source-meta {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.variant-source-meta span:first-child {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}
.variant-source-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 24px;
}
.variant-source-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.variant-source-stats b { color: var(--text); }
.variant-source-stats .vs-v30src {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.8;
}
.variant-source-tags .tag {
  background: var(--bg-soft);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
}

.variant-carryover ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.variant-carryover li { margin-bottom: 5px; }

/* Right column: editor */
.variant-editor {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* Photo reorder / cover picker */
.variant-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.variant-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  cursor: grab;
  user-select: none;
}
.variant-photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.variant-photo.dragging { opacity: 0.45; cursor: grabbing; }
.variant-photo.is-cover { border: 2px solid var(--accent); }
.variant-photo-cover-badge {
  position: absolute;
  top: 5px; left: 5px;
  display: none;
  background: var(--accent); color: #fff;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
}
.variant-photo.is-cover .variant-photo-cover-badge { display: block; }
.variant-photo-pos {
  position: absolute;
  bottom: 5px; left: 5px;
  min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px;
  background: rgba(0, 0, 0, 0.6); color: #fff;
  font-size: 0.62rem; font-weight: 700;
  border-radius: 4px; text-align: center;
}
.variant-photo-makecover {
  position: absolute;
  bottom: 5px; right: 5px;
  border: 0; border-radius: 4px;
  background: rgba(255, 255, 255, 0.92); color: var(--text);
  font-size: 0.62rem; font-weight: 600;
  padding: 3px 6px; cursor: pointer;
  opacity: 0; transition: opacity 0.12s ease;
}
.variant-photo:hover .variant-photo-makecover { opacity: 1; }
.variant-photo.is-cover .variant-photo-makecover { display: none; }
.variant-photo-delete {
  position: absolute;
  top: 5px; right: 5px;
  width: 22px; height: 22px;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 0.95rem; line-height: 22px; font-weight: 700;
  padding: 0; cursor: pointer;
  opacity: 0; transition: opacity 0.12s ease, background-color 0.12s ease;
}
.variant-photo:hover .variant-photo-delete { opacity: 1; }
.variant-photo-delete:hover { background: #b3261e; }
@media (hover: none) { /* touch: always show controls, no hover */
  .variant-photo-makecover, .variant-photo-delete { opacity: 1; }
}

.occasion-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.occasion-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.occasion-btn:hover { border-color: var(--text); }
.occasion-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.variant-field {
  display: block;
  margin-top: 18px;
}
.variant-field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.variant-field-label .hint {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}
.variant-field textarea,
.variant-field input[type=text] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.4s, border-color 0.15s;
}
.variant-field textarea:focus,
.variant-field input[type=text]:focus { outline: none; border-color: var(--text); }

.variant-was {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.variant-row {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}
@media (max-width: 540px) {
  .variant-row { flex-direction: column; gap: 0; }
}

/* Tags diff display */
.tags-diff {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--bg-soft);
  border-radius: 6px;
  min-height: 56px;
  transition: background-color 0.4s;
}
.tags-diff .tag {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
}
.tags-diff .tag-kept {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.tags-diff .tag-swapped {
  background: #FFF5D6;
  color: #7A5C00;
  border: 1px solid #F1D778;
  font-weight: 500;
}

.tag-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.tag-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.tag-dot-kept { background: var(--border); }
.tag-dot-swapped { background: #F1D778; }

/* Flash animation when variant fields swap */
.flash {
  background-color: #FFFBEC !important;
  transition: background-color 0.4s;
}
.tags-diff.flash {
  background-color: #FFFBEC;
}

/* Action bar */
.variant-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}
.btn {
  padding: 10px 22px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); }
.btn-cancel {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-cancel:hover { color: var(--text); border-color: var(--text); text-decoration: none; }

/* ============================================================
   FULL EDITOR (variant_full.php)
   Etsy-clone listing editor: section cards, photo grid,
   read-only rows, tag editor, sticky action bar.
   ============================================================ */

/* Page header */
.full-editor-header {
  margin-bottom: 18px;
}
.full-editor-header h1 {
  margin: 0 0 6px 0;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: var(--heading-letter-spacing);
}
.full-editor-header .lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Compact source-reference banner up top */
.source-banner {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  margin-bottom: 16px;
}
.source-banner img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.source-banner-body {
  min-width: 0;
  flex: 1;
}
.source-banner-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 2px;
}
.source-banner-title {
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.source-banner-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Occasion picker row above the form */
.full-editor-occasion-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  margin-bottom: 16px;
}

/* The form itself */
.full-editor-form {
  margin: 0 0 88px 0; /* bottom margin reserves space for sticky action bar */
}

/* Each section is a card */
.ed-section {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 22px 24px;
  margin-bottom: 14px;
}
.ed-section header {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.ed-section header h2 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.ed-section header .lede {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.ed-section > .variant-field:first-of-type { margin-top: 0; }

/* Sub-sections (Variations vs Personalization inside Item Options) */
.ed-subsection {
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}
.ed-subsection:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.ed-subsection-header h3 {
  margin: 0 0 4px 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.ed-subsection-header .hint {
  margin-bottom: 8px;
  display: block;
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-primary {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(44, 48, 49, 0.85);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 3px;
}
.photo-add {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg-soft);
  border: 2px dashed var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 4px;
  transition: border-color 0.15s;
}
.photo-add:hover:not([disabled]) { border-color: var(--text); color: var(--text); }
.photo-add[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Read-only rows (category, shipping, returns) */
.ed-readonly-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-radius: 4px;
  margin-bottom: 8px;
}
.ed-readonly-row:last-child { margin-bottom: 0; }
.ed-readonly-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 2px;
}
.ed-readonly-value {
  font-size: 0.95rem;
  color: var(--text);
}
.ed-readonly-row .btn { flex-shrink: 0; }

/* Toggle rows (checkbox + label) */
.ed-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
}
.ed-toggle-row input[type=checkbox] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--text);
  flex-shrink: 0;
}

/* Conditional reveal block */
.ed-conditional {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-soft);
  border-radius: 4px;
  border-left: 3px solid var(--border);
}
.ed-conditional .variant-field { margin-top: 0; }
.ed-conditional .variant-field + .variant-field { margin-top: 14px; }

/* Fieldsets (radios in How It's Made / Settings) */
.ed-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 16px 0;
}
.ed-fieldset:last-child { margin-bottom: 0; }
.ed-fieldset legend {
  padding: 0;
  margin-bottom: 8px;
}
.ed-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
}
.ed-radio input[type=radio] {
  accent-color: var(--text);
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.ed-radio .hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 4px;
}

/* Tag editor (replaces tags-diff for full editor) */
.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--bg-soft);
  border-radius: 6px;
  min-height: 56px;
  transition: background-color 0.4s;
}
.tag-editor.flash { background-color: #FFFBEC; }
.tag-editor .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
}
.tag-editor .tag-kept {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.tag-editor .tag-swapped {
  background: #FFF5D6;
  color: #7A5C00;
  border: 1px solid #F1D778;
  font-weight: 500;
}
.tag-editor .tag-manual {
  background: var(--text);
  color: #fff;
  border: 1px solid var(--text);
  font-weight: 500;
}
.tag-remove {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
}
.tag-remove:hover { opacity: 1; background: rgba(0, 0, 0, 0.1); }
.tag-manual .tag-remove:hover { background: rgba(255, 255, 255, 0.2); }

/* Tag add row */
.tag-add-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.tag-add-row input[type=text] {
  flex: 1;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.tag-add-row input[type=text]:focus {
  outline: none;
  border-color: var(--text);
}
.tag-add-row .btn {
  padding: 8px 18px;
  font-size: 0.9rem;
}
.tag-dot { /* extension to existing tag-dot for manual */ }

/* Sticky bottom action bar */
.full-editor-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
  z-index: 50;
  backdrop-filter: blur(4px);
}
.full-editor-actions .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .ed-section { padding: 16px; }
  .source-banner img { width: 44px; height: 44px; }
  .full-editor-actions {
    padding: 10px 12px;
    gap: 8px;
    justify-content: space-between; /* Cancel left, Post to Etsy right */
  }
  .full-editor-actions .btn { padding: 9px 16px; font-size: 0.9rem; }
  .ed-readonly-row { flex-direction: column; align-items: flex-start; }
  .ed-readonly-row .btn { width: 100%; }

  /* Workspace header + full editor: hide secondary nav items on mobile.
     Mobile keeps Dashboard + Sign out; full editor keeps Cancel + Post. */
  .nav-desktop { display: none !important; }

  /* Connection badges shrink to dots-only on phones to save horizontal space. */
  .ws-conn-badge { padding: 6px; }
  .ws-conn-name { display: none; }
}

/* Mid-priority "Open in full editor" link in variant.php action bar */
.btn-full-editor {
  margin-right: auto; /* push to the left side of the action bar so primary stays right */
  padding: 10px 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  transition: color 0.15s, border-color 0.15s;
}
.btn-full-editor:hover {
  color: var(--accent-h);
  border-bottom-color: var(--text);
}
@media (max-width: 540px) {
  .btn-full-editor {
    margin-right: 0;
    width: 100%;
    text-align: center;
    padding: 6px 0;
    order: 3; /* on narrow screens, push below the row */
  }
}

/* ---- Etsy section sub-nav (shared across listings/drafts/coverage/triage) ---- */
.es-subnav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 22px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.86rem;
}
.es-subnav .es-grp {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 700;
}
.es-subnav .es-grp:not(:first-child) {
  margin-left: 12px; padding-left: 14px; border-left: 1px solid var(--border-soft);
}
.es-subnav .es-link {
  padding: 5px 10px; border-radius: 6px; color: var(--text);
  text-decoration: none; border: 1px solid transparent; transition: background 0.12s;
}
.es-subnav .es-link:hover { background: var(--bg-soft); text-decoration: none; }
.es-subnav .es-link.is-active { background: #e7f0ef; color: #1f4845; font-weight: 600; }
