/* =========================================================
   2008 Google Reader Authentic CSS (#C3D9FF Periwinkle Chrome)
   ========================================================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #ffffff;
  color: #222222;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

a {
  color: #0000cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* ---------- 2008 GOOGLE TOP BAR ---------- */
#gbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  border-bottom: 1px solid #c9d7f1;
  background: #ffffff;
}

.gbar-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.gbar-active {
  font-weight: bold;
  color: #000000;
}

.gbar-right {
  font-size: 11px;
  color: #666666;
}

.gsep {
  color: #cccccc;
  margin: 0 5px;
}

.mcp-link {
  color: #006600;
  font-weight: bold;
}

.mcp-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22aa22;
  margin-right: 4px;
  vertical-align: middle;
}

/* ---------- 2008 GOOGLE READER HEADER ---------- */
#reader-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: #ffffff;
}

.gr-logo {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: bold;
  letter-spacing: -1px;
  line-height: 1;
}

.g-blue { color: #0039b6; }
.g-red { color: #c41200; }
.g-yellow { color: #e5b800; }
.g-green { color: #30a72f; }

.gr-word {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: normal;
  font-size: 20px;
  color: #666666;
  margin-left: 6px;
  letter-spacing: -0.4px;
}

.gr-stamp {
  background: #ffffcc;
  border: 1px solid #d8cc55;
  color: #554400;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
}

.gr-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}

#gr-search-input {
  width: 310px;
  padding: 4px 6px;
  font-size: 13px;
  border: 1px solid #7f9db9;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ---------- 2008 BUTTONS ---------- */
.gr-btn {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #222222;
  padding: 4px 10px;
  background: linear-gradient(to bottom, #ffffff 0%, #e4e4e4 100%);
  border: 1px solid #999999;
  border-radius: 2px;
  cursor: pointer;
}

.gr-btn:hover {
  border-color: #666666;
  background: linear-gradient(to bottom, #ffffff 0%, #efefef 100%);
}

.gr-btn-primary {
  color: #ffffff;
  background: linear-gradient(to bottom, #5c8ee6 0%, #3366cc 100%);
  border-color: #244b99;
}

.gr-btn-primary:hover {
  background: linear-gradient(to bottom, #6c9cf0 0%, #3c73de 100%);
}

.gr-btn-add {
  width: 100%;
  text-align: left;
  padding: 5px 10px;
  color: #003388;
  background: linear-gradient(to bottom, #f5f9ff 0%, #d8e6fb 100%);
  border-color: #93b0de;
}

.gr-btn-toggle.active {
  background: #dce7fa;
  border-color: #6b8fd4;
  color: #003388;
}

.gr-btn-mini {
  font-size: 11px;
  padding: 2px 7px;
  border: 1px solid #999999;
  background: #eeeeee;
  cursor: pointer;
}

#gr-banner {
  margin: 0 14px 8px 14px;
  background: #fff8c4;
  border: 1px solid #d6c54b;
  padding: 6px 10px;
  font-size: 12px;
}

#gr-banner.error {
  background: #ffecec;
  border-color: #cc3333;
  color: #990000;
}

/* ---------- 2-PANE GOOGLE READER WORKSPACE ---------- */
#gr-workspace {
  display: flex;
  height: calc(100vh - 82px);
  min-height: 500px;
  padding: 0 10px 10px 10px;
  gap: 8px;
}

#gr-nav {
  width: 235px;
  flex-shrink: 0;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 12px;
}

.gr-add-wrap {
  margin-bottom: 10px;
}

.add-sub-box {
  margin-top: 6px;
  background: #e5ecf9;
  border: 1px solid #a2bae2;
  padding: 8px;
  font-size: 11px;
}

.add-sub-box input {
  width: 100%;
  padding: 4px 5px;
  margin-bottom: 4px;
  border: 1px solid #8ea8d4;
  font-size: 11px;
}

.gr-nav-section {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e8f5;
}

.gr-nav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  color: #222222;
  border-radius: 2px;
  margin-bottom: 2px;
}

.gr-nav-item:hover {
  background: #f0f5fd;
  text-decoration: none;
}

.gr-nav-item.active {
  background: #c3d9ff;
  font-weight: bold;
  color: #000000;
}

.gr-unread-badge {
  font-weight: bold;
  font-size: 11px;
  color: #222222;
}

.gr-count-muted {
  font-size: 11px;
  color: #666666;
}

.gr-subs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: #444444;
  padding: 2px 6px 5px 6px;
  font-size: 12px;
}

.gr-folder-block {
  margin-bottom: 4px;
}

.gr-folder-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  cursor: pointer;
  border-radius: 2px;
  font-weight: bold;
  color: #333333;
}

.gr-folder-row:hover {
  background: #f0f5fd;
}

.gr-folder-row.active {
  background: #c3d9ff;
}

.gr-feed-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
}

.gr-feed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  border-radius: 2px;
  font-size: 11px;
}

.gr-feed-row:hover {
  background: #f0f5fd;
}

.gr-feed-row.active {
  background: #c3d9ff;
  font-weight: bold;
}

.gr-feed-link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #222222;
}

.gr-feed-row.has-unread .gr-feed-link {
  font-weight: bold;
}

.gr-feed-unsub {
  color: #999999;
  font-weight: bold;
  margin-left: 5px;
  display: none;
}

.gr-feed-row:hover .gr-feed-unsub {
  display: inline;
}

.gr-feed-unsub:hover {
  color: #cc0000;
  text-decoration: none;
}

/* ---------- RIGHT READING PANE (#C3D9FF ICONIC CHROME) ---------- */
#gr-main-frame {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #c3d9ff;
  border: 1px solid #9dbbf0;
  border-radius: 4px;
  padding: 6px;
}

#gr-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 4px 6px 4px;
  font-size: 11px;
}

.gr-toolbar-left,
.gr-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tb-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: #8aaee6;
  margin: 0 2px;
}

.tb-link {
  color: #003399;
}

.tb-link.active {
  font-weight: bold;
  color: #000000;
  text-decoration: none;
}

#gr-stream-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ebeff9;
  border: 1px solid #a8c2ec;
  border-bottom: none;
  padding: 5px 10px;
  font-size: 12px;
}

#gr-stream-meta {
  font-size: 11px;
  color: #555555;
}

#gr-entries {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #a8c2ec;
  padding: 10px;
}

.gr-loading {
  padding: 40px 20px;
  text-align: center;
  color: #666666;
}

/* ---------- EXPANDED ARTICLE CARD (2008 GOOGLE READER) ---------- */
.gr-entry {
  border: 1px solid #d5dff2;
  border-left: 3px solid #d5dff2;
  background: #ffffff;
  margin-bottom: 10px;
  border-radius: 2px;
}

.gr-entry.is-read {
  background: #f9fafc;
}

.gr-entry.is-selected {
  border-color: #6688ee;
  border-left: 3px solid #3366cc;
  box-shadow: 0 1px 4px rgba(51, 102, 204, 0.16);
}

.gr-entry-main {
  padding: 10px 14px;
}

.gr-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.gr-entry-title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.gr-star-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.1;
  padding: 0;
  color: #cccccc;
}

.gr-star-btn.starred {
  color: #f0b400;
}

.gr-entry-title {
  font-size: 16px;
  font-weight: bold;
  color: #0000cc;
  line-height: 1.25;
}

.gr-entry.is-read .gr-entry-title {
  color: #555588;
}

.gr-entry-date {
  font-size: 11px;
  color: #666666;
  white-space: nowrap;
}

.gr-entry-sub {
  font-size: 11px;
  color: #666666;
  margin: 3px 0 8px 22px;
}

.gr-entry-body {
  margin-left: 22px;
  font-size: 13px;
  line-height: 1.5;
  color: #222222;
  max-width: 740px;
  white-space: pre-wrap;
  word-break: break-word;
}

.gr-entry-img {
  display: block;
  max-width: 340px;
  max-height: 200px;
  margin: 8px 0 8px 22px;
  border: 1px solid #dddddd;
  padding: 2px;
  background: #ffffff;
}

.gr-entry-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f3f5fc;
  border-top: 1px solid #e1e8f7;
  padding: 5px 14px 5px 36px;
  font-size: 11px;
}

.gr-entry-actions a {
  color: #335599;
}

/* ---------- COMPACT 1-LINE LIST VIEW (ICONIC GOOGLE READER!) ---------- */
.gr-list-row {
  border-bottom: 1px solid #e5ebf5;
  border-left: 3px solid transparent;
}

.gr-list-row.is-selected {
  border-left-color: #3366cc;
  background: #eef4ff;
}

.gr-list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 12px;
}

.gr-list-header:hover {
  background: #f3f7fe;
}

.gr-list-row.is-read .gr-list-header {
  background: #f8f9fb;
  color: #666666;
}

.gr-list-source {
  width: 145px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #555555;
  font-size: 11px;
}

.gr-list-headline {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: bold;
  color: #111111;
}

.gr-list-row.is-read .gr-list-headline {
  font-weight: normal;
  color: #555555;
}

.gr-list-snippet {
  color: #777777;
  font-weight: normal;
  margin-left: 5px;
}

.gr-list-time {
  font-size: 11px;
  color: #666666;
  white-space: nowrap;
}

.gr-list-expanded-body {
  background: #ffffff;
  border-top: 1px solid #dce6f7;
}

/* ---------- MODALS ---------- */
.gr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.gr-modal-box {
  width: 480px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 2px solid #7d9ec9;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #c3d9ff;
  border-bottom: 1px solid #96b5ea;
  padding: 7px 10px;
  font-weight: bold;
  font-size: 13px;
}

.gr-modal-close {
  border: 1px solid #888888;
  background: #ffffff;
  cursor: pointer;
  font-weight: bold;
}

.gr-modal-body {
  padding: 12px;
  font-size: 12px;
}

.gr-modal-body textarea {
  width: 100%;
  font-family: monospace;
  font-size: 11px;
  padding: 5px;
  border: 1px solid #999999;
}

.gr-hr {
  border: none;
  border-top: 1px solid #dddddd;
  margin: 10px 0;
}

.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
}

.shortcuts-table td {
  padding: 5px 6px;
  border-bottom: 1px dotted #dddddd;
}

.shortcuts-table kbd {
  display: inline-block;
  background: #f0f0f0;
  border: 1px solid #aaaaaa;
  border-radius: 3px;
  padding: 1px 5px;
  font-family: monospace;
  font-weight: bold;
}

/* ---------- MCP PIPE DRAWER ---------- */
.mcp-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;
  background: #f4f4f4;
  border-top: 2px solid #666666;
  z-index: 900;
  display: flex;
  flex-direction: column;
  font-family: Monaco, Menlo, Consolas, monospace;
  font-size: 11px;
}

.mcp-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #dddddd;
  border-bottom: 1px solid #999999;
  padding: 4px 10px;
}

.mcp-meta {
  color: #006600;
  margin-left: 8px;
}

.mcp-drawer-body {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
  padding: 6px 10px;
}

.mcp-tools-bar {
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e0e0e0;
}

.mcp-tool-tag {
  display: inline-block;
  background: #e8f0fe;
  border: 1px solid #a8c2ec;
  color: #003388;
  padding: 1px 5px;
  margin: 2px 3px 2px 0;
  border-radius: 2px;
  font-size: 10px;
}

.mcp-table {
  width: 100%;
  border-collapse: collapse;
}

.mcp-table th,
.mcp-table td {
  text-align: left;
  padding: 3px 6px;
  border-bottom: 1px solid #eeeeee;
}

.mcp-table th {
  background: #f0f0f0;
}

.mcp-ok { color: #007700; font-weight: bold; }
.mcp-err { color: #cc0000; font-weight: bold; }

@media (max-width: 820px) {
  #reader-header { flex-wrap: wrap; }
  #gr-search-input { width: 100%; }
  #gr-workspace { flex-direction: column; height: auto; }
  #gr-nav { width: 100%; max-height: 240px; }
  #gr-entries { min-height: 450px; }
  .gr-list-source { width: 90px; }
}
