/* ═══════════════════════════════════════════════════════════════════
   OEIS WordPress reskin — brand alignment for the pages that STAY on
   WordPress after cutover: PMPro checkout/login/account, Gravity Forms,
   and general chrome.

   INSTALL (at cutover week, not before): wp-admin → Code Snippets
   (WPCode) → Add Snippet → CSS Snippet → paste → Site Wide Footer →
   Save & Activate. Alternatively Appearance → Customize → Additional CSS.

   Tokens mirror app/site/tokens.css on the Next.js site.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --oeis-navy-deep: #061c2f;
  --oeis-navy: #0b2238;
  --oeis-brand: #0086c9;
  --oeis-brand-hover: #006fa6;
  --oeis-sky: #0ea5e9;
  --oeis-sky-hover: #0284c7;
  --oeis-sky-bg: #f0f9ff;
  --oeis-ink: #172333;
  --oeis-slate: #64748b;
  --oeis-line: #e2e8f0;
  --oeis-radius: 10px;
  --oeis-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ── Base typography on preserved pages ─────────────────────────── */
body,
body input,
body select,
body textarea,
body button {
  font-family: var(--oeis-font) !important;
}
body { color: var(--oeis-ink); }

/* ── Buttons: PMPro + Gravity Forms + theme buttons ─────────────── */
.pmpro_btn,
.pmpro_btn-submit,
.pmpro_btn-submit-checkout,
#pmpro_btn-submit,
.gform_button,
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper .gform_page_footer input[type="submit"],
input[type="submit"],
button[type="submit"] {
  background: var(--oeis-sky) !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 12px 28px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: 0 1px 3px rgba(6, 28, 47, 0.15) !important;
  transition: background 0.15s ease !important;
  cursor: pointer;
}
.pmpro_btn:hover,
#pmpro_btn-submit:hover,
.gform_button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--oeis-sky-hover) !important;
  color: #fff !important;
}

/* ── Form fields ────────────────────────────────────────────────── */
.pmpro_form input[type="text"],
.pmpro_form input[type="email"],
.pmpro_form input[type="password"],
.pmpro_form input[type="tel"],
.pmpro_form select,
.pmpro_form textarea,
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="number"],
.gform_wrapper select,
.gform_wrapper textarea,
#loginform input[type="text"],
#loginform input[type="password"] {
  border: 1px solid var(--oeis-line) !important;
  border-radius: var(--oeis-radius) !important;
  padding: 11px 14px !important;
  font-size: 15px !important;
  color: var(--oeis-ink) !important;
  background: #fff !important;
  box-shadow: none !important;
}
.pmpro_form input:focus,
.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus,
#loginform input:focus {
  border-color: var(--oeis-sky) !important;
  outline: 2px solid rgba(14, 165, 233, 0.25) !important;
  outline-offset: 0 !important;
}

/* Labels */
.pmpro_form label,
.gform_wrapper .gfield_label,
#loginform label {
  color: var(--oeis-ink) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}
.gform_wrapper .gfield_required { color: var(--oeis-brand) !important; }

/* ── PMPro checkout structure ───────────────────────────────────── */
.pmpro_checkout,
.pmpro_form fieldset,
#pmpro_account .pmpro_box,
.pmpro_box {
  background: #fff !important;
  border: 1px solid var(--oeis-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 24px rgba(6, 28, 47, 0.06) !important;
  padding: 24px !important;
}
.pmpro_checkout h2,
.pmpro_checkout h3,
.pmpro_box h3 {
  color: var(--oeis-navy) !important;
  border-bottom: 2px solid var(--oeis-sky) !important;
  padding-bottom: 8px !important;
}
.pmpro_level-name,
.pmpro_checkout-h2-name { color: var(--oeis-brand) !important; }

/* Level highlight / pricing table */
#pmpro_levels_table .pmpro_level,
.pmpro_levels_table tr {
  border: 1px solid var(--oeis-line) !important;
  border-radius: 12px !important;
}
#pmpro_levels_table .pmpro_level-highlight {
  border-color: var(--oeis-brand) !important;
}

/* ── Gravity Forms structure ────────────────────────────────────── */
.gform_wrapper .gform_title {
  color: var(--oeis-navy) !important;
  font-weight: 800 !important;
}
.gform_wrapper .gsection {
  border-bottom: 2px solid var(--oeis-sky) !important;
}
.gform_wrapper .gform_page_footer,
.gform_wrapper .gform_footer {
  border-top: 1px solid var(--oeis-line) !important;
  padding-top: 18px !important;
}
.gform_wrapper .gf_progressbar {
  background: var(--oeis-sky-bg) !important;
  border-radius: 999px !important;
}
.gform_wrapper .gf_progressbar_percentage {
  background: var(--oeis-sky) !important;
  border-radius: 999px !important;
}

/* ── Notices / messages ─────────────────────────────────────────── */
.pmpro_message,
.gform_confirmation_message {
  border-radius: var(--oeis-radius) !important;
  border-left: 4px solid var(--oeis-sky) !important;
  background: var(--oeis-sky-bg) !important;
  color: var(--oeis-ink) !important;
  padding: 14px 18px !important;
}
.pmpro_error,
.gform_wrapper .gfield_error .gfield_label { color: #b42318 !important; }

/* ── Links ──────────────────────────────────────────────────────── */
.pmpro_form a,
.pmpro_box a,
.gform_wrapper a,
#loginform ~ p a {
  color: var(--oeis-brand) !important;
}

/* ── Job Board (WPJobBoard) ─────────────────────────────────────── */

.wpjb-button,
.wpjb-button.btn,
.wpjb-button-search,
.wpjb-button-submit {
  background: var(--oeis-sky) !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
  text-shadow: none !important;
  box-shadow: 0 1px 3px rgba(6, 28, 47, 0.15) !important;
}
.wpjb-button:hover { background: var(--oeis-sky-hover) !important; }

.wpjb-grid-row {
  border: 1px solid var(--oeis-line) !important;
  border-radius: 12px !important;
  margin-bottom: 12px !important;
  background: #fff !important;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.wpjb-grid-row:hover {
  border-color: var(--oeis-sky) !important;
  box-shadow: 0 6px 24px rgba(6, 28, 47, 0.08) !important;
}
.wpjb-job_title,
.wpjb-title,
.wpjb-title a {
  color: var(--oeis-navy) !important;
  font-weight: 700 !important;
}
.wpjb-sub,
.wpjb-sub-title,
.wpjb-job_location,
.wpjb-job_created_at { color: var(--oeis-slate) !important; }
.wpjb-new .wpjb-bulb,
.wpjb-bulb { background: var(--oeis-brand) !important; color: #fff !important; border-radius: 999px !important; }
.wpjb-flash-info {
  background: var(--oeis-sky-bg) !important;
  border-left: 4px solid var(--oeis-sky) !important;
  border-radius: var(--oeis-radius) !important;
  color: var(--oeis-ink) !important;
}
.wpjb input[type="text"],
.wpjb input[type="email"],
.wpjb select,
.wpjb textarea {
  border: 1px solid var(--oeis-line) !important;
  border-radius: var(--oeis-radius) !important;
  padding: 10px 13px !important;
}
.wpjb-custom-menu-link,
.wpjb a { color: var(--oeis-brand); }

/* ── Legacy theme cleanup on preserved pages ────────────────────── */
/* The7 accent overrides — force brand blue over any old green/teal.   */
.dt-btn,
.btn-shortcode {
  background: var(--oeis-sky) !important;
  color: #fff !important;
  border-radius: 999px !important;
  border: 0 !important;
}

/* ── OEIS Connect (bbPress forums) ──────────────────────────────── */

#bbpress-forums {
  font-family: var(--oeis-font) !important;
}
#bbpress-forums .bbp-forums,
#bbpress-forums .bbp-topics,
#bbpress-forums .bbp-replies {
  border: 1px solid var(--oeis-line) !important;
  border-radius: 12px !important;
  overflow: hidden;
}
#bbpress-forums li.bbp-header {
  background: var(--oeis-navy-deep) !important;
  color: #fff !important;
  border: 0 !important;
}
#bbpress-forums li.bbp-header a { color: #fff !important; }
#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
  border-top: 1px solid var(--oeis-line) !important;
  background: #fff !important;
}
#bbpress-forums li.bbp-body ul.forum:hover,
#bbpress-forums li.bbp-body ul.topic:hover { background: var(--oeis-sky-bg) !important; }
.bbp-forum-title,
.bbp-topic-permalink {
  color: var(--oeis-navy) !important;
  font-weight: 700 !important;
}
.bbp-forum-content,
.bbp-topic-excerpt { color: var(--oeis-slate) !important; }
.bbp-breadcrumb { color: var(--oeis-slate) !important; }
.bbp-breadcrumb a { color: var(--oeis-brand) !important; }
#bbpress-forums .bbp-search-form input[type="text"],
#bbpress-forums textarea,
#bbpress-forums select {
  border: 1px solid var(--oeis-line) !important;
  border-radius: var(--oeis-radius) !important;
  padding: 10px 13px !important;
}
#bbpress-forums button,
#bbpress-forums .button,
#bbp-search-submit {
  background: var(--oeis-sky) !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 9px 20px !important;
}
div.bbp-template-notice {
  background: var(--oeis-sky-bg) !important;
  border-left: 4px solid var(--oeis-sky) !important;
  border-radius: var(--oeis-radius) !important;
  color: var(--oeis-ink) !important;
}

/* ── FULL CHROME SWAP: hide the old theme header/footer, brand the rest ── */

/* Old theme chrome off (The7) */
#masthead, .masthead, #top-bar, .top-bar,
#footer, footer#footer, .footer, #bottom-bar { display: none !important; }

/* Typography: force the brand font everywhere */
body, h1, h2, h3, h4, h5, h6, p, a, li, span, div,
input, select, textarea, button, label {
  font-family: var(--oeis-font) !important;
}
h1, h2, h3, h4 { color: var(--oeis-navy); letter-spacing: -0.01em; }

/* The7 page-title band -> navy brand band */
.page-title {
  background-image: none !important;
  background: linear-gradient(120deg, #061c2f, #164e63) !important;
}
.page-title *, .page-title h1 { color: #fff !important; }
.page-title .breadcrumbs a { color: #7dd3fc !important; }

/* ── White canvas: kill the theme's grey page background ── */
body, #page, #main, .wf-container-main, .wf-wrap, .wf-container,
#content, .content, .page-inner, .site-content {
  background: #ffffff !important;
}

/* Sidebar/widget links: theme teal -> brand blue */
.widget a, .sidebar a, .wpjb-custom-menu-link, .widget_wpjb a {
  color: var(--oeis-brand) !important;
  font-weight: 600;
}
.widget-title, .sidebar h3, .widget h3 {
  color: var(--oeis-navy) !important;
  font-weight: 700 !important;
}

/* Inputs stay white (theme tints them blue-grey) */
.wpjb input[type="text"], .wpjb input[type="email"],
.wpjb select, .wpjb textarea,
input[type="text"], input[type="email"], input[type="tel"],
input[type="password"], select, textarea {
  background: #ffffff !important;
}

/* Soften the theme's heavy card shadows on the white canvas */
.pmpro_box, .pmpro_checkout, .wpjb-grid-row {
  box-shadow: 0 1px 3px rgba(6, 28, 47, 0.07) !important;
}

/* Page-title band: keep the canvas rules OUT of it (the theme reuses
   .wf-wrap inside the hero, which was painting a white box over it), and
   strip its background photos so the navy brand gradient shows. */
.page-title .wf-wrap, .page-title .wf-container, .page-title .wf-container-bg,
.page-title #main, .page-title .content {
  background: transparent !important;
}
.page-title, .page-title * {
  background-image: none !important;
}
.page-title {
  background: linear-gradient(120deg, #061c2f, #164e63) !important;
}

/* The7's hero band is #fancy-header — same treatment as .page-title:
   transparent inner wraps, photos stripped, navy brand gradient. */
#fancy-header .wf-wrap, .fancy-header .wf-wrap,
#fancy-header .wf-container, .fancy-header .wf-container {
  background: transparent !important;
}
#fancy-header, .fancy-header, #fancy-header *, .fancy-header * {
  background-image: none !important;
}
#fancy-header, .fancy-header {
  background: linear-gradient(120deg, #061c2f, #164e63) !important;
}
#fancy-header h1, .fancy-header h1, #fancy-header h2,
#fancy-header .breadcrumbs, #fancy-header .breadcrumbs a,
.fancy-header h1, .fancy-header .breadcrumbs a {
  color: #ffffff !important;
}

/* ── Injected brand header ── */
body { padding-top: 68px !important; }
#oeis-nb-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99990;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--oeis-line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px clamp(16px, 4vw, 40px);
}
body.admin-bar #oeis-nb-header { top: 32px; }
#oeis-nb-header .nb-logo img { height: 46px; width: auto; display: block; }
#oeis-nb-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(10px, 2vw, 22px); }
#oeis-nb-header nav a {
  color: var(--oeis-navy) !important; font-weight: 600 !important;
  font-size: 14px !important; text-decoration: none !important;
}
#oeis-nb-header nav a:hover { color: var(--oeis-brand) !important; }
#oeis-nb-header .nb-cta {
  background: var(--oeis-sky); color: #fff !important;
  border-radius: 10px; padding: 9px 16px; font-weight: 700 !important;
}
#oeis-nb-header .nb-cta:hover { background: var(--oeis-sky-hover); color: #fff !important; }
@media (max-width: 782px) { body.admin-bar #oeis-nb-header { top: 46px; } }
@media (max-width: 700px) { #oeis-nb-header nav a:not(.nb-cta) { display: none; } }

/* ── Injected brand footer ── */
#oeis-nb-footer {
  background: #0b2238; color: #cdd9e5;
  padding: 34px clamp(16px, 4vw, 40px);
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  align-items: center; justify-content: space-between; font-size: 13px;
}
#oeis-nb-footer a { color: #fff !important; font-weight: 600; text-decoration: none; }
#oeis-nb-footer a:hover { color: #7dd3fc !important; }
#oeis-nb-footer .nb-links { display: flex; gap: 20px; flex-wrap: wrap; }
