/*
 * PhotoSeder Editorial compatibility theme.
 *
 * Legacy Tailwind colour tokens are intentionally preserved in HTML and JS.
 * Several interactive states add and remove those exact strings at runtime.
 * This file changes their appearance without changing the state contract.
 */
:root {
  --ps-canvas: #f7f4ee;
  --ps-neutral: #eae5db;
  --ps-warm: #efe2d4;
  --ps-powder: #c7a08f;
  --ps-powder-soft: #e6d3c9;
  --ps-brown: #857466;
  --ps-primary: #817064;
  --ps-primary-hover: #6f5f54;
  --ps-accent-text: #79685c;
  --ps-ink: #3d4247;
  --ps-muted: #6b6661;
  --ps-border: #d9c8bf;
  --ps-white: #ffffff;
  --ps-danger: #8b3f3a;
}

body.ps-editorial {
  accent-color: var(--ps-primary);
}

body.ps-editorial.ps-light {
  background-color: var(--ps-canvas) !important;
  color: var(--ps-ink);
}

body.ps-editorial.ps-light::selection,
body.ps-editorial.ps-light *::selection {
  background: var(--ps-primary);
  color: var(--ps-white);
}

body.ps-editorial.ps-light .gradient-hero {
  background: radial-gradient(circle at 50% 0%, var(--ps-warm) 0%, var(--ps-canvas) 70%) !important;
}

body.ps-editorial.ps-light [class~="bg-[#FAF8F5]"],
body.ps-editorial.ps-light [class~="bg-[#fafaf9]"] {
  background-color: var(--ps-canvas) !important;
}

body.ps-editorial.ps-light [class~="bg-neutral-50"],
body.ps-editorial.ps-light [class~="bg-neutral-50/50"],
body.ps-editorial.ps-light [class~="bg-neutral-50/60"],
body.ps-editorial.ps-light [class~="bg-neutral-50/70"],
body.ps-editorial.ps-light [class~="bg-neutral-50/80"] {
  background-color: rgba(247, 244, 238, .82) !important;
}

body.ps-editorial.ps-light [class~="text-neutral-950"],
body.ps-editorial.ps-light [class~="text-neutral-900"],
body.ps-editorial.ps-light [class~="text-neutral-850"],
body.ps-editorial.ps-light [class~="text-neutral-800"] {
  color: var(--ps-ink) !important;
}

body.ps-editorial.ps-light [class~="border-neutral-100"],
body.ps-editorial.ps-light [class~="border-neutral-150"],
body.ps-editorial.ps-light [class~="border-neutral-200"] {
  border-color: rgba(217, 200, 191, .72) !important;
}

/* Legacy primary colour compatibility. */
body.ps-editorial [class~="bg-[#3C766F]"] { background-color: var(--ps-primary) !important; }
/*
 * Semantic state used by controls rendered after Tailwind has scanned the page.
 * Legacy colour classes stay in place because gallery scripts rely on them.
 */
body.ps-editorial .ps-state-selected {
  background-color: var(--ps-primary) !important;
  border-color: var(--ps-primary) !important;
  color: var(--ps-white) !important;
}
body.ps-editorial [class~="bg-[#3C766F]/5"] { background-color: rgba(129, 112, 100, .05) !important; }
body.ps-editorial [class~="bg-[#3C766F]/10"] { background-color: rgba(129, 112, 100, .10) !important; }
body.ps-editorial [class~="bg-[#3C766F]/15"] { background-color: rgba(129, 112, 100, .15) !important; }
body.ps-editorial [class~="bg-[#3C766F]/20"] { background-color: rgba(129, 112, 100, .20) !important; }
body.ps-editorial [class~="bg-[#3C766F]/30"] { background-color: rgba(129, 112, 100, .30) !important; }
body.ps-editorial [class~="bg-[#3C766F]/50"] { background-color: rgba(129, 112, 100, .50) !important; }
body.ps-editorial [class~="bg-[#3C766F]/80"] { background-color: rgba(129, 112, 100, .80) !important; }
body.ps-editorial [class~="bg-[#3C766F]/90"] { background-color: rgba(129, 112, 100, .90) !important; }

body.ps-editorial [class~="text-[#3C766F]"] { color: var(--ps-accent-text) !important; }
body.ps-editorial [class~="border-[#3C766F]"] { border-color: var(--ps-primary) !important; }
body.ps-editorial [class~="border-[#3C766F]/10"] { border-color: rgba(129, 112, 100, .10) !important; }
body.ps-editorial [class~="border-[#3C766F]/15"] { border-color: rgba(129, 112, 100, .15) !important; }
body.ps-editorial [class~="border-[#3C766F]/20"] { border-color: rgba(129, 112, 100, .20) !important; }
body.ps-editorial [class~="border-[#3C766F]/30"] { border-color: rgba(129, 112, 100, .30) !important; }
body.ps-editorial [class~="border-[#3C766F]/50"] { border-color: rgba(129, 112, 100, .50) !important; }
body.ps-editorial [class~="border-l-[#3C766F]"],
body.ps-editorial [class~="border-s-[#3C766F]"],
body.ps-editorial [class~="rtl:border-r-[#3C766F]"] { border-color: var(--ps-primary) !important; }

body.ps-editorial [class~="ring-[#3C766F]/10"] { --tw-ring-color: rgba(129, 112, 100, .10) !important; }
body.ps-editorial [class~="ring-[#3C766F]/20"] { --tw-ring-color: rgba(129, 112, 100, .20) !important; }
body.ps-editorial [class~="ring-[#3C766F]/30"] { --tw-ring-color: rgba(129, 112, 100, .30) !important; }

body.ps-editorial [class~="hover:bg-[#3C766F]"]:hover { background-color: var(--ps-primary) !important; }
body.ps-editorial [class~="hover:bg-[#3C766F]/5"]:hover { background-color: rgba(129, 112, 100, .05) !important; }
body.ps-editorial [class~="hover:bg-[#3C766F]/10"]:hover { background-color: rgba(129, 112, 100, .10) !important; }
body.ps-editorial [class~="hover:bg-[#3C766F]/20"]:hover { background-color: rgba(129, 112, 100, .20) !important; }
body.ps-editorial [class~="hover:bg-[#2F5E58]"]:hover { background-color: var(--ps-primary-hover) !important; }
body.ps-editorial [class~="hover:text-[#3C766F]"]:hover { color: var(--ps-accent-text) !important; }
body.ps-editorial [class~="hover:text-[#2F5E58]"]:hover { color: var(--ps-primary-hover) !important; }
body.ps-editorial [class~="hover:border-[#3C766F]"]:hover { border-color: var(--ps-primary) !important; }
body.ps-editorial [class~="hover:border-[#3C766F]/30"]:hover { border-color: rgba(129, 112, 100, .30) !important; }
body.ps-editorial [class~="focus:border-[#3C766F]"]:focus { border-color: var(--ps-primary) !important; }
body.ps-editorial [class~="focus:ring-[#3C766F]"]:focus { --tw-ring-color: rgba(129, 112, 100, .32) !important; }
body.ps-editorial .group:hover [class~="group-hover:text-[#3C766F]"] { color: var(--ps-accent-text) !important; }

body.ps-editorial [class~="from-[#3C766F]"] {
  --tw-gradient-from: var(--ps-primary) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(129, 112, 100, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

body.ps-editorial [class~="to-[#2F5E58]"] {
  --tw-gradient-to: var(--ps-primary-hover) var(--tw-gradient-to-position) !important;
}

body.ps-editorial input:focus,
body.ps-editorial textarea:focus,
body.ps-editorial select:focus,
body.ps-editorial button:focus-visible,
body.ps-editorial a:focus-visible {
  outline-color: var(--ps-brown);
}

body.ps-editorial ::-webkit-scrollbar-thumb { background-color: var(--ps-brown); }
body.ps-editorial ::-webkit-scrollbar-thumb:hover { background-color: var(--ps-primary-hover); }

/* Browser hand-off used by Google sign-in from the desktop application. */
body.ps-editorial.ps-desktop-auth {
  background:
    radial-gradient(circle at 10% 10%, rgba(199, 160, 143, .18), transparent 32%),
    var(--ps-canvas) !important;
}

body.ps-editorial.ps-desktop-auth .card {
  border-color: rgba(217, 200, 191, .82);
  box-shadow: 0 22px 60px rgba(61, 66, 71, .10);
}

body.ps-editorial.ps-desktop-auth .google-button:hover:not(:disabled) {
  border-color: var(--ps-primary);
  box-shadow: 0 8px 22px rgba(129, 112, 100, .16);
}

body.ps-editorial.ps-desktop-auth .status { color: var(--ps-accent-text); }
body.ps-editorial.ps-desktop-auth .status.error { color: var(--ps-danger); }
body.ps-editorial.ps-desktop-auth .success-mark {
  background: var(--ps-powder-soft);
  color: var(--ps-primary);
}

/* Portfolio remains dark so photographs keep a neutral viewing surround. */
body.ps-editorial.ps-dark {
  --ps-accent-text: #c7a08f;
}

body.ps-editorial.ps-dark [class~="text-[#3C766F]"] { color: var(--ps-powder) !important; }

/* Admin keeps a dedicated dark shell but joins the Editorial family. */
body.ps-editorial.ps-admin {
  background: #292e31 !important;
  color: var(--ps-canvas);
}

body.ps-editorial.ps-admin [class~="bg-slate-950"] { background-color: #292e31 !important; }
body.ps-editorial.ps-admin [class~="bg-slate-900"] { background-color: var(--ps-ink) !important; }
body.ps-editorial.ps-admin [class~="bg-slate-900/60"] { background-color: rgba(61, 66, 71, .72) !important; }
body.ps-editorial.ps-admin [class~="bg-slate-800"] { background-color: #4b5054 !important; }
body.ps-editorial.ps-admin [class~="hover:bg-slate-700"]:hover { background-color: #5a5e61 !important; }
body.ps-editorial.ps-admin [class~="border-slate-800"],
body.ps-editorial.ps-admin [class~="border-slate-800/80"],
body.ps-editorial.ps-admin [class~="border-slate-700"] { border-color: rgba(199, 160, 143, .24) !important; }
body.ps-editorial.ps-admin [class~="text-slate-400"] { color: #c4bbb4 !important; }
body.ps-editorial.ps-admin [class~="text-slate-300"],
body.ps-editorial.ps-admin [class~="text-slate-200"] { color: var(--ps-neutral) !important; }
body.ps-editorial.ps-admin [class~="text-indigo-400"] { color: var(--ps-powder) !important; }
body.ps-editorial.ps-admin [class~="bg-indigo-500/10"] { background-color: rgba(199, 160, 143, .10) !important; }
body.ps-editorial.ps-admin [class~="border-indigo-500/20"] { border-color: rgba(199, 160, 143, .24) !important; }
body.ps-editorial.ps-admin [class~="from-indigo-500"][class~="to-violet-500"] {
  background-image: linear-gradient(to top right, var(--ps-brown), var(--ps-ink)) !important;
}
