/* =================================================================
   SYSTEM 7 THEME — applied when html[data-theme="system7"]
   ================================================================= */

/* Classic Mac 7.6-era Platinum desktop */
html[data-theme="system7"] {
  background:
    repeating-linear-gradient(0deg, #8f8f8f 0px, #8f8f8f 1px, #959595 1px, #959595 2px),
    repeating-linear-gradient(90deg, #8f8f8f 0px, #8f8f8f 1px, #999 1px, #999 2px);
}

[data-theme="system7"] body {
  font-family: 'ChicagoKare', "Geneva", Helvetica, Arial, sans-serif;
  background: transparent;
  color: #000;
  padding-top: 4.5rem;
}

/* ---- Fake menubar ---- */
[data-theme="system7"] .s7-menubar {
  display: flex;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 22px;
  background: linear-gradient(to bottom, #f5f5f5 0%, #dfdfdf 100%);
  border-bottom: 1px solid #8e8e8e;
  box-shadow: inset 0 1px 0 #fff;
  align-items: stretch;
  font-size: 15px;
  z-index: 200;
  user-select: none;
  font-family: 'ChicagoKare', "Geneva", Helvetica, Arial, sans-serif;
}
[data-theme="system7"] .s7-apple {
  display: flex; align-items: center;
  padding: 0 8px; font-size: 13px;
  cursor: default;
}
[data-theme="system7"] .s7-item {
  display: flex; align-items: center;
  padding: 0 9px; cursor: default;
}
[data-theme="system7"] .s7-item.bold { font-weight: 100; }
[data-theme="system7"] .s7-item:hover { background: #2d64da; color: #fff; }
[data-theme="system7"] .s7-spacer { flex: 1; }
[data-theme="system7"] .s7-clock {
  display: flex; align-items: center;
  padding: 0 8px;
}

/* ---- Theme switcher ---- */
[data-theme="system7"] .theme-bar {
  position: fixed;
  top: 34px;
  right: 1rem;
  left: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 160;
  align-items: center;
}
[data-theme="system7"] .theme-btn {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #000;
  font-family: 'ChicagoKare', "Geneva", Helvetica, Arial, sans-serif;
  font-size: 12px;
  padding: 0;
  box-shadow: none;
  transition: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 76px;
}
[data-theme="system7"] .theme-btn:hover { background: transparent; }
[data-theme="system7"] .theme-btn.active {
  background: transparent;
  box-shadow: none;
  color: #000;
}
[data-theme="system7"] .theme-btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 2px;
}
[data-theme="system7"] .folder-icon {
  display: block;
  width: 48px;
  height: 40px;
  background: url('/images/s7-folder.png') center / contain no-repeat;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.35));
}
[data-theme="system7"] .folder-label {
  padding: 1px 6px;
  line-height: 1.1;
  text-shadow: 1px 1px 0 #f3f3f3;
}
[data-theme="system7"] .theme-btn.active .folder-label {
  background: #2d64da;
  color: #fff;
  text-shadow: none;
}

/* ---- Header — Stickies note ---- */
[data-theme="system7"] header {
  margin-bottom: 1.75rem;
  background: #ffffa0;
  border: 1px solid #c8c040;
  box-shadow:
    inset 1px 1px 0 #ffffe8,
    2px 3px 6px rgba(0,0,0,0.35),
    4px 5px 0 rgba(0,0,0,0.08);
  padding: 0;
  width: 260px;
  position: relative;
  overflow: hidden;
  /* slight tilt for authenticity */
  transform: rotate(-0.5deg);
}
/* Stickies title bar strip */
[data-theme="system7"] header::before {
  content: '';
  display: block;
  height: 16px;
  background: repeating-linear-gradient(
    to bottom,
    #e6e060 0px, #e6e060 1px,
    #ffffa0 1px, #ffffa0 2px
  );
  border-bottom: 1px solid #c8c040;
}
/* Close box inside the strip */
[data-theme="system7"] .sticky-closebox {
  display: block;
  position: absolute;
  top: 2px;
  left: 3px;
  width: 11px;
  height: 11px;
  border: 1px solid #888;
  background: #ffffa0;
  z-index: 1;
}
[data-theme="system7"] header h1 {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #000;
  background-clip: unset;
  color: #000;
  font-size: 48px;
  font-weight: 100;
  letter-spacing: 0;
  text-shadow: none;
  padding: 8px 10px 2px;
  font-family: 'ChicagoKare', "Geneva", Helvetica, Arial, sans-serif;
}
[data-theme="system7"] header p {
  color: #222;
  font-size: 11px;
  font-family: "Geneva", Helvetica, Arial, sans-serif;
  text-shadow: none;
  margin-top: 0;
  padding: 2px 10px 8px;
}

/* ---- Card — Mac window chrome (Platinum) ---- */
[data-theme="system7"] .card {
  background: #dcdcdc;
  border: 1px solid #7d7d7d;
  border-radius: 6px 6px 0 0;
  box-shadow:
    inset 1px 1px 0 #fefefe,
    inset -1px -1px 0 #b3b3b3,
    2px 2px 0 rgba(0,0,0,0.4);
  overflow: visible;
  transition: none;
}
[data-theme="system7"] .card::after { display: none; }
[data-theme="system7"] .card:hover {
  transform: none;
  border-color: #7d7d7d;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #b3b3b3, 3px 3px 0 rgba(0,0,0,0.35);
}

/* Window title bar */
[data-theme="system7"] .card-titlebar {
  display: flex;
  align-items: center;
  height: 20px;
  background: linear-gradient(to bottom, #f3f3f3 0%, #d6d6d6 100%);
  border-bottom: 1px solid #8f8f8f;
  border-radius: 5px 5px 0 0;
  padding: 0 3px;
  flex-shrink: 0;
  gap: 3px;
}
/* Alternating-line stripes */
[data-theme="system7"] .tb-stripes {
  flex: 1;
  height: 8px;
  background: repeating-linear-gradient(
    to bottom,
    #f7f7f7 0px, #f7f7f7 1px,
    #c3c3c3 1px, #c3c3c3 2px
  );
}
/* Close box */
[data-theme="system7"] .tb-closebox {
  width: 11px; height: 11px;
  border: 1px solid #5c5c5c;
  background: #ececec;
  flex-shrink: 0;
}
/* Title text */
[data-theme="system7"] .tb-title {
  font-size: 15px; font-weight: 100;
  white-space: nowrap;
  font-family: 'ChicagoKare', "Geneva", Helvetica, Arial, sans-serif;
}
/* Zoom box */
[data-theme="system7"] .tb-zoombox {
  width: 11px; height: 11px;
  border: 1px solid #5c5c5c;
  background: #ececec;
  flex-shrink: 0;
  position: relative;
}
[data-theme="system7"] .tb-zoombox::after {
  content: ''; position: absolute;
  top: 1px; left: 1px;
  width: 5px; height: 5px;
  border: 1px solid #5c5c5c;
}

/* Card body — white content area */
[data-theme="system7"] .card-body { gap: 5px; padding: 10px 12px; background: #fff; }
[data-theme="system7"] .card-icon { font-size: 2rem; }
[data-theme="system7"] .card-title { display: none; }
[data-theme="system7"] .card-desc {
  font-size: 11px; color: #000; line-height: 1.45;
  font-family: "Geneva", Helvetica, Arial, sans-serif;
}
[data-theme="system7"] .card-tag {
  font-size: 10px; color: #555; opacity: 1;
  font-family: "Geneva", Helvetica, Arial, sans-serif;
}

/* Footer */
[data-theme="system7"] footer {
  color: #fff; font-size: 11px;
  font-family: "Geneva", Helvetica, Arial, sans-serif;
  text-shadow: 1px 1px 0 #000;
}
