/*
 * Riverside Agistment theme for DocuSeal's public signing pages.
 * Injected by Nginx Proxy Manager (see npm/sign.yourdomain-advanced.conf).
 * Served from sign.yourdomain/riverside-theme/ because DocuSeal's CSP only
 * allows same-origin stylesheets.
 *
 * DocuSeal uses Tailwind + daisyUI 3, so most of the restyle is just
 * overriding the daisyUI colour variables (HSL "H S% L%" triplets).
 * If an upgrade changes DocuSeal's markup, worst case is the page falls
 * back to DocuSeal's own look; nothing breaks.
 */
@import url('fonts.css');

/* ---------------------------------------------------------- palette */
:root,
[data-theme="docuseal"] {
  --p:  141.8 18.6% 88.4%;   /* primary   sage      #DCE7E0 */
  --pf: 123.0 14.3% 72.5%;   /*           sage dark #AFC3B0 */
  --pc: 136.4 15.1% 14.3%;   /*           ink       #1F2A22 */
  --s:  187.5 26.0% 69.8%;   /* secondary river     #9EC1C6 */
  --sc: 136.4 15.1% 14.3%;
  --a:  37.9 65.0% 57.5%;    /* accent    gold      #D9A54C */
  --af: 33.2 56.3% 51.6%;    /*           gold dark #C98B3E */
  --ac: 136.4 15.1% 14.3%;
  --n:  144.4 22.3% 23.7%;   /* neutral   forest    #2F4A3A */
  --nf: 148.6 25.9% 15.9%;   /*           deep      #1E3328 */
  --nc: 43.3 42.9% 91.8%;    /*           cream     #F3EEE1 */
  --b1: 43.3 42.9% 91.8%;    /* page      cream     #F3EEE1 */
  --b2: 42.5 36.4% 87.1%;    /* cards     #EAE3D2 */
  --b3: 42.0 27.8% 78.8%;    /* lines     #D8CFBA */
  --bc: 136.4 15.1% 14.3%;   /* text      ink       #1F2A22 */

  --rounded-box: 14px;
  --rounded-btn: 12px;       /* matches the "Notify me" button */
  --rounded-badge: 999px;
  --btn-text-case: none;     /* sentence-case buttons like the landing page */
}

/* ---------------------------------------------------------- type */
html, body {
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  color: #1F2A22;
  background: #F3EEE1;
}
button, .btn, select, textarea,
input:not(.font-times):not(.font-courier) {
  font-family: inherit;
}
h1, h2, h3,
main .text-xl.font-semibold,
main .text-lg.font-bold,
#signing_form_header .font-semibold {
  font-family: 'Young Serif', Georgia, serif;
  font-weight: 400;
  color: #1E3328;
  letter-spacing: 0;
}
a { color: #2F4A3A; }
a:hover { color: #1E3328; }

/* ---------------------------------------------------------- controls */
.base-input, .base-textarea, .input, .select, .textarea {
  background: #FBF8F1;
  border-color: #D8CFBA;
  border-radius: 12px;
}
.base-input:focus, .input:focus, .select:focus, .textarea:focus,
.base-textarea:focus {
  outline: 2px solid #2F4A3A;
  outline-offset: 1px;
  border-color: #2F4A3A;
}

/* Main call-to-action: gold with ink text, like the landing page */
.base-button {
  background: #D9A54C;
  border-color: #D9A54C;
  color: #1F2A22 !important;
  font-weight: 600;
}
.base-button:hover {
  background: #C98B3E;
  border-color: #C98B3E;
}
.base-button:disabled, .base-button[disabled] {
  background: #EAD3A6;
  border-color: #EAD3A6;
  color: #4A574D !important;
}
.white-button {
  background: transparent !important;
  border: 1.5px solid #2F4A3A !important;
  color: #2F4A3A;
}
.white-button:hover {
  background: #2F4A3A !important;
  color: #F3EEE1;
}
.base-checkbox, .base-radio { background: #FBF8F1; border-color: #6B7465; }

/* Info cards ("You have been invited...", completed screen) */
main .bg-base-200 { border: 1px solid #D8CFBA; }
main .bg-base-200 svg { color: #2F4A3A; }

/* ---------------------------------------------------------- header brand
 * Replaces the DocuSeal logo + wordmark at the top of the signing pages
 * with the Riverside Agistment header logo (horse, name on one line,
 * WARRNAMBOOL between gold rules), the same as the landing page header.
 * The "Powered by DocuSeal" credit at the bottom is left alone: that is the
 * attribution DocuSeal's licence requires you to keep. Delete this block if
 * you'd rather keep their header logo too.
 */
a[href="/"]:has(svg[viewBox="0 0 180 180"]) {
  display: flex !important;
  justify-content: center;
  width: 100%;
  pointer-events: none;
  text-decoration: none;
}
a[href="/"]:has(svg[viewBox="0 0 180 180"]) > * {
  display: none !important;
}
a[href="/"]:has(svg[viewBox="0 0 180 180"])::before {
  content: "";
  display: block;
  width: min(100%, 400px);
  aspect-ratio: 430 / 93;
  background: url('logo/riverside-header.svg') no-repeat center / contain;
}

/* ---------------------------------------------------------- attribution
 * Keep the licence-required credit visible and readable.
 */
a[href*="docuseal.com"] {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #4A574D;
}
