/* === Luce streamlining for syllabus.club === */
body.sp-luce-streamline {
  --sp-primary: #14120f;
  --sp-primary-hover: #2a2620;
  --sp-success: #2ab364;
}

/* Drop the resume demo sidebar stripe */
body.sp-luce-streamline .wp-block-columns > .wp-block-column.has-primary-background-color {
  display: none !important;
}

body.sp-luce-streamline .wp-block-columns > .wp-block-column:not(.has-primary-background-color) {
  flex-basis: 100% !important;
  width: 100% !important;
}

/* Brand mark in site title */
body.sp-luce-streamline .wp-block-site-title a {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  text-decoration: none;
}

body.sp-luce-streamline .wp-block-site-title a::before {
  content: none;
  display: none;
}

body.sp-luce-streamline .wp-block-site-title .sp-brand-logo {
  display: block;
  flex-shrink: 0;
  height: 36px;
  width: 36px;
}

/* Theme site-logo block duplicates the header mark */
body.sp-luce-streamline .wp-block-site-logo {
  display: none !important;
}

/* Portal pages: match homepage typography and Luce tokens over generic portal.css blues */
body.sp-luce-streamline.sp-portal-wide-page .sp-wrap {
  color: var(--wp--preset--color--contrast, #000);
  font-family: inherit;
  max-width: none;
}

body.sp-luce-streamline.sp-portal-wide-page .sp-link,
body.sp-luce-streamline.sp-portal-wide-page .sp-breadcrumb-link:hover,
body.sp-luce-streamline.sp-portal-wide-page .sp-test-user-name:hover {
  color: var(--wp--preset--color--contrast, #000);
}

body.sp-luce-streamline.sp-portal-wide-page .sp-btn {
  background: var(--wp--preset--color--contrast, #000);
}

body.sp-luce-streamline.sp-portal-wide-page .sp-btn:hover {
  background: #2a2620;
}

body.sp-luce-streamline.sp-portal-wide-page .sp-btn-secondary {
  background: var(--wp--preset--color--secondary, #999);
}

body.sp-luce-streamline.sp-portal-wide-page .sp-tab-active {
  border-bottom-color: var(--wp--preset--color--primary, #fed24b);
  color: var(--wp--preset--color--contrast, #000);
}

body.sp-luce-streamline.sp-portal-wide-page .sp-dashboard-filter,
body.sp-luce-streamline.sp-portal-wide-page .sp-dashboard-table,
body.sp-luce-streamline.sp-portal-wide-page .sp-archive-dashboard-header h1,
body.sp-luce-streamline.sp-portal-wide-page .sp-test-archive-subjects-h2 {
  font-family: inherit;
}

body.sp-luce-streamline.sp-portal-wide-page .entry-content,
body.sp-luce-streamline.sp-portal-wide-page .wp-block-post-content {
  max-width: none;
  width: 100%;
}

body.sp-luce-streamline.sp-portal-wide-page .sp-wrap-portal-wide,
body.sp-luce-streamline.sp-portal-wide-page .sp-wrap-dashboard {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

body.sp-luce-streamline.sp-portal-wide-page .sp-wrap-split {
  max-width: none;
}

/* Hide classic header.php / footer.php chrome when portal shell is nested inside #page */
body.sp-luce-streamline.sp-portal-wide-page #page:has(.sp-luce-portal-main) > div:not(:has(.sp-luce-portal-main)),
body.sp-luce-streamline.sp-portal-wide-page #page:has(.sp-luce-portal-main) > hr {
  display: none !important;
}

body.sp-luce-streamline .sp-luce-portal-header .wp-block-site-title a {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  text-decoration: none;
}

body.sp-luce-streamline .sp-luce-portal-main {
  max-width: none;
  padding-left: var(--wp--preset--spacing--60, 3rem);
  padding-right: var(--wp--preset--spacing--60, 3rem);
  width: 100%;
}

/* Hide theme post title on portal CPT pages (plugin supplies its own h1) */
body.sp-luce-streamline.post-type-archive-test_paper .wp-block-post-title,
body.sp-luce-streamline.single-test_paper .wp-block-post-title,
body.sp-luce-streamline.tax-subject .wp-block-post-title {
  display: none;
}

/* Single-item nav is redundant on a one-page portal */
body.sp-luce-streamline header .wp-block-navigation {
  display: none !important;
}

body.sp-luce-streamline header .wp-block-group.alignwide.is-layout-flex {
  justify-content: flex-start;
}

/* Hide duplicate page title on the login homepage */
body.sp-luce-streamline.home .wp-block-post-title {
  display: none;
}

/* Footer: hide WordPress theme credit */
body.sp-luce-streamline footer a[href="https://wordpress.org"],
body.sp-luce-streamline footer a[href="https://wordpress.org/"] {
  display: none;
}

body.sp-luce-streamline footer .wp-block-paragraph:has(a[href="https://wordpress.org"]),
body.sp-luce-streamline footer .wp-block-paragraph:has(a[href="https://wordpress.org/"]) {
  display: none;
}

body.sp-luce-streamline footer .wp-block-group {
  padding-bottom: var(--wp--preset--spacing--40, 1rem) !important;
  padding-top: var(--wp--preset--spacing--40, 1rem) !important;
}

/* Login card: Luce cream/ink palette */
body.sp-luce-streamline .sp-login-card {
  background: var(--wp--preset--color--base, #fff);
  border: 1.5px solid var(--wp--preset--color--contrast, #000);
  box-shadow: 4px 4px 0 var(--wp--preset--color--contrast, #000);
}

body.sp-luce-streamline .sp-tabs {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

body.sp-luce-streamline .sp-tab-active {
  border-bottom-color: var(--wp--preset--color--primary, #fed24b);
  color: var(--wp--preset--color--contrast, #000);
}

body.sp-luce-streamline .sp-login-form input[type="email"],
body.sp-luce-streamline .sp-login-form input[type="password"],
body.sp-luce-streamline .sp-login-form input[type="text"] {
  background: var(--wp--preset--color--tertiary, #fbf8f2);
  border-color: rgba(0, 0, 0, 0.18);
}

body.sp-luce-streamline .sp-login-form input:focus {
  border-color: var(--wp--preset--color--contrast, #000);
  box-shadow: 0 0 0 2px rgba(254, 210, 75, 0.45);
}

body.sp-luce-streamline .sp-btn {
  background: var(--wp--preset--color--contrast, #000);
}

body.sp-luce-streamline .sp-btn:hover {
  background: #2a2620;
}

body.sp-luce-streamline .sp-btn-secondary {
  background: var(--wp--preset--color--secondary, #999);
}

body.sp-luce-streamline .sp-btn-secondary:hover {
  background: #666;
}

body.sp-luce-streamline.sp-dashboard-page .sp-wrap p:empty {
  display: none;
  margin: 0;
}

body.sp-luce-streamline.sp-dashboard-page .sp-wrap > p:empty,
body.sp-luce-streamline.sp-subject-page .sp-wrap p:empty,
body.sp-luce-streamline.sp-subject-page .sp-wrap > p:empty {
  display: none;
}

body.sp-luce-streamline.sp-dashboard-page .sp-test-filter,
body.sp-luce-streamline.sp-dashboard-page .sp-activity-heatmap.sp-card,
body.sp-luce-streamline.sp-dashboard-page .sp-focus-areas.sp-card,
body.sp-luce-streamline.sp-subject-page .sp-subject-grade-table-wrap {
  border-color: rgba(0, 0, 0, 0.12);
}

body.sp-luce-streamline.sp-dashboard-page .sp-history-table th,
body.sp-luce-streamline.sp-dashboard-page .sp-history-table td,
body.sp-luce-streamline.sp-subject-page .sp-history-table th,
body.sp-luce-streamline.sp-subject-page .sp-history-table td {
  padding: 4px 10px;
  line-height: 1.25;
}

@media (max-width: 720px) {
  body.sp-luce-streamline .wp-block-group.has-global-padding {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}
