/*
Theme Name: Chronically macOS
Description: Custom macOS Sierra desktop theme for Chronically on the Internet.
Version: 1.2
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #2f5b7c;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: #222;
  min-height: 100vh;
}

/* Fixed Left Desktop Sidebar */
.desktop-sidebar {
  position: fixed;
  top: 28px;
  left: 24px;
  bottom: 28px;
  width: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

.desktop-folders,
.desktop-trash {
  display: flex;
  flex-direction: column;
  gap: 18px;
  pointer-events: auto;
}

.desktop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  text-align: center;
  width: 96px;
  padding: 6px 4px;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: background 0.12s ease;
}

/* macOS Highlight & Hover State */
.desktop-item:hover,
.desktop-item:focus {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
}

.desktop-item .folder-icon {
  width: 54px;
  height: 44px;
  margin-bottom: 5px;
  display: block;
}

.desktop-item .item-label {
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  word-break: break-word;
}

.desktop-item:hover .item-label,
.desktop-item:focus .item-label {
  background-color: #0b5ed7;
  text-shadow: none;
}

/* Floating Yellow Sticky Note (Top Right) */
.sticky-note {
  position: fixed;
  top: 76px;
  right: 36px;
  width: 245px;
  background: #fef08a;
  border: 1px solid #d4b938;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  z-index: 20;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.sticky-note-bar {
  height: 16px;
  background: #f5df5b;
  border-bottom: 1px solid #dcc33c;
  padding: 0 6px;
  display: flex;
  align-items: center;
}

.sticky-note-square {
  width: 8px;
  height: 8px;
  border: 1px solid #b59e26;
}

.sticky-note-body {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #1f1f1f;
}

/* Center Scrollable Post Feed */
.desktop-workspace {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 20px 80px;
  position: relative;
  z-index: 5;
}

/* macOS TextEdit Window Card */
.macos-window {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  margin-bottom: 34px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.22);
}

.window-titlebar {
  background: linear-gradient(to bottom, #ededed, #dcdcdc);
  height: 28px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #bdbdbd;
  position: relative;
}

.traffic-lights {
  display: flex;
  gap: 7px;
  z-index: 2;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ff5f56; border: 1px solid #e0443e; }
.dot.yellow { background: #ffbd2e; border: 1px solid #dea123; }
.dot.green { background: #27c93f; border: 1px solid #1aab29; }

.window-title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: #444;
  pointer-events: none;
}

.window-title a {
  color: #333;
  text-decoration: none;
  pointer-events: auto;
}

/* TextEdit Formatting Toolbar & Ruler */
.textedit-toolbar {
  background: #f3f3f3;
  border-bottom: 1px solid #cfcfcf;
  padding: 5px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: #444;
}

.toolbar-pill {
  background: #fff;
  border: 1px solid #c5c5c5;
  border-radius: 3px;
  padding: 1px 7px;
}

.textedit-ruler {
  height: 14px;
  background: repeating-linear-gradient(
    to right,
    #f9f9f9,
    #f9f9f9 9px,
    #b5b5b5 10px
  );
  border-bottom: 1px solid #c9c9c9;
}

/* Post Content Area */
.window-content {
  padding: 26px 32px 30px;
  font-size: 15px;
  line-height: 1.65;
  color: #1c1c1c;
}

.window-content h1,
.window-content h2.post-title {
  font-size: 22px;
  margin-bottom: 14px;
  line-height: 1.3;
}

.window-content h2.post-title a {
  color: #111;
  text-decoration: none;
}

.window-content h2.post-title a:hover {
  text-decoration: underline;
}

.window-content p {
  margin-bottom: 16px;
}

.window-content img,
.window-content iframe,
.window-content video {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  margin: 10px 0;
}

.window-footer {
  padding: 10px 32px;
  background: #fafafa;
  border-top: 1px solid #eeeeee;
  font-size: 12px;
  color: #666;
  display: flex;
  justify-content: space-between;
}

.window-footer a {
  color: #0b5ed7;
  text-decoration: none;
}

/* Responsive Mobile Layout */
@media (max-width: 980px) {
  .desktop-sidebar {
    position: static;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 12px 0;
    gap: 10px;
  }

  .desktop-folders,
  .desktop-trash {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .sticky-note {
    position: static;
    width: auto;
    max-width: 640px;
    margin: 14px 20px 0;
  }

  .desktop-workspace {
    padding-top: 20px;
  }
}
