/* =========================================================================
 * Classic Mode — an optional, per-visitor skin for the Member Home Page.
 * Toggled by the "Classic Mode" button (see theme-switcher.js), saved only
 * to this browser's localStorage — never tied to any account, never
 * changes what anyone else sees.
 *
 * Recreates the look of System 6/7 (1988-91): black & white, square
 * corners, hard-edged drop shadows, pinstriped title bars. Every rule here
 * is original CSS (gradients, box-shadows, a bitmap-style font stack) —
 * nothing is traced from or bundles any of Apple's own bitmap assets. The
 * open-source, MIT-licensed system.css project
 * (https://github.com/sakofchit/system.css) documents this same visual
 * language and was useful as a reference while building this.
 *
 * Scope: only takes effect under body.theme-classic, so it never touches
 * the default design unless a visitor opts in.
 * ========================================================================= */

/* @section Desktop background
   A faint dither stands in for the real System 6/7 desktop pattern
   (a true 1-bit checkerboard reads as busy/noisy at screen resolution). */
body.theme-classic {
  background-color: #c8c8c8;
  background-image:
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.06) 0, rgba(0, 0, 0, 0.06) 1px, transparent 1px, transparent 3px);
}

/* @section Theme switcher dropdown
   Lives as the first thing in .profile-side (front-page.php), right-aligned
   above the Certifications box -- in normal page flow, deliberately NOT
   position:fixed, since that fights with the WP admin bar for logged-in
   viewers and the Beaver Builder header's own sticky behavior. These base
   (unprefixed) rules are the "Default" look and are shared by every theme
   file -- only loaded once, via this stylesheet, since theme-classic.css is
   always enqueued whenever any theme is. */
.bb-theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ds-space-xs);
}
.bb-theme-toggle-label {
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-weight-semibold);
  color: var(--ds-color-ink-soft);
}
.bb-theme-toggle {
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-weight-semibold);
  color: var(--ds-color-mat);
  background: var(--ds-color-surface);
  border: 1px solid var(--ds-color-line);
  border-radius: var(--ds-radius-pill);
  box-shadow: var(--ds-shadow-card);
  padding: 7px 14px;
  cursor: pointer;
}
.bb-theme-toggle:hover {
  background: var(--ds-color-mat-tint);
}

/* --- Classic (System 6/7) --- */
body.theme-classic .bb-theme-toggle-label {
  font-family: 'ChicagoFLF', Geneva, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: #000;
}
body.theme-classic .bb-theme-toggle {
  font-family: 'ChicagoFLF', Geneva, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: normal;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  border-radius: 4px;
  box-shadow: 2px 2px 0 #000;
}
body.theme-classic .bb-theme-toggle:hover {
  background: #eee;
}
body.theme-classic .bb-theme-toggle:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

/* @section Window chrome for the four cards + the Feed box
   Shared "window" treatment: square corners, solid black border, a hard
   (no-blur) drop shadow offset down-right, and room at the top for the
   title bar below. */
body.theme-classic .profile-card,
body.theme-classic .certifications-card,
body.theme-classic .conferences-card,
body.theme-classic .activity-card,
body.theme-classic .elsewhere-card,
body.theme-classic #member-feed {
  position: relative;
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000;
  overflow: hidden;
  font-family: 'ChicagoFLF', Geneva, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #000;
}

/* The title bar itself is a real element (.win-titlebar in front-page.php),
   hidden unless Classic Mode is on -- not CSS-generated content, so the
   title text can sit in its own properly-sized white "cutout" the way a
   real System 6/7 title actually breaks the pinstripes. */
.win-titlebar {
  display: none;
}
body.theme-classic .win-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 20px;
  margin: 3px 4px 0;
  padding: 0 4px;
  border-bottom: 1px solid #000;
  background: repeating-linear-gradient(#000 0, #000 1px, #fff 1px, #fff 3px);
}
.win-close {
  display: none;
}
body.theme-classic .win-close {
  display: block;
  flex: none;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 1px solid #000;
}
.win-title {
  display: none;
}
/* .win-zoom and .win-minimize only mean anything under Platinum and Aqua
   respectively (Classic's real System 6/7 windows had neither) -- hidden
   here as the shared default so every other theme file's rules can stay
   unaware they exist unless that theme actually uses them. */
.win-zoom {
  display: none;
}
.win-minimize {
  display: none;
}
body.theme-classic .win-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  background: #fff;
  padding: 0 6px;
}

/* Push each card's own content below the title bar, and flatten its own
   padding/radius now that the window chrome above provides the border. */
body.theme-classic .profile-card,
body.theme-classic .certifications-card,
body.theme-classic .conferences-card,
body.theme-classic .activity-card,
body.theme-classic .elsewhere-card {
  padding: 0 0 var(--ds-space-md);
}
body.theme-classic .profile-card > *:not(.win-titlebar),
body.theme-classic .certifications-card > *:not(.win-titlebar),
body.theme-classic .conferences-card > *:not(.win-titlebar),
body.theme-classic .activity-card > *:not(.win-titlebar),
body.theme-classic .elsewhere-card > *:not(.win-titlebar) {
  margin-left: var(--ds-space-md);
  margin-right: var(--ds-space-md);
}
body.theme-classic .profile-card-head,
body.theme-classic .activity-stats,
body.theme-classic .certifications-card-head {
  margin-top: var(--ds-space-md);
}

/* The in-card headings ("Certifications", "Activity", "Find me elsewhere",
   "Feed") are redundant once the title bar already says the same thing. */
body.theme-classic .certifications-heading,
body.theme-classic .activity-heading,
body.theme-classic .member-feed-row-heading,
body.theme-classic .member-feed-heading {
  display: none;
}

#member-feed {
  padding: 0;
}
body.theme-classic #member-feed > *:not(.win-titlebar) {
  padding-left: var(--ds-space-md);
  padding-right: var(--ds-space-md);
}
body.theme-classic #member-feed .feed-filters {
  margin-top: var(--ds-space-md);
}
body.theme-classic #member-feed .feed-list {
  padding-bottom: var(--ds-space-md);
}

/* @section Monochrome pass
   1-bit era -- color displays didn't exist yet, so EVERY photo/icon/image
   on the page goes grayscale in Classic Mode, not just the ones inside the
   four windowed cards. Deliberately unscoped to any one card/selector list
   (unlike Platinum/Aqua's narrower passes) so this also catches the cover
   photo banner (a background-image, not an <img>) and anything inside the
   Feed's post content (quoted images in a Bluesky/MetaFilter item, etc.)
   that the old card-by-card selector list missed. */
body.theme-classic img,
body.theme-classic svg,
body.theme-classic video,
body.theme-classic .profile-cover {
  filter: grayscale(1) contrast(1.15);
}

/* @section Flattened controls
   Buttons, tags, badges and pills inside a classic window lose their color
   fills/rounded corners/shadows -- simple black-on-white, square, 1px
   border, same as the window chrome around them. */
body.theme-classic .atechs-btn,
body.theme-classic .feed-tag,
body.theme-classic .feed-filter,
body.theme-classic .cert-since-badge,
body.theme-classic .feed-item-longform-badge,
body.theme-classic .activity-stat,
body.theme-classic .profile-status-item,
body.theme-classic .atechs-tag {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 0;
  box-shadow: none;
}
body.theme-classic .feed-filter.is-active {
  background: #000;
  color: #fff;
}
body.theme-classic .elsewhere-link,
body.theme-classic .elsewhere-label,
body.theme-classic .elsewhere-value,
body.theme-classic .feed-item-title a,
body.theme-classic .cert-since-value,
body.theme-classic .activity-value {
  color: #000 !important;
}

/* @section Feed items
   Simple ruled rows (like a Finder list) rather than a title bar each --
   repeating that chrome once per item would be a lot of visual noise. */
body.theme-classic .feed-item {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  box-shadow: none;
  font-family: 'ChicagoFLF', Geneva, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
body.theme-classic .feed-item + .feed-item {
  margin-top: -1px;
}
