/* PUBMEM Detail - Entry detail overlay view */

/* Full-screen detail overlay */
.detail-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--pico-background-color);
  z-index: 200;
  display: none;
  overflow-y: auto;
}
.detail-overlay .header { position: relative; }
.detail-overlay.show { display: block; }

.detail-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.detail-view {
  max-width: var(--content-width);
  margin: 1rem auto 0;
}

.detail-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.detail-time { font-size: 0.8rem; opacity: 0.6; }
.detail-author { font-size: 0.85rem; color: var(--primary); font-weight: 500; }
.detail-user { color: var(--gh-text-subtle); }
.detail-model { color: var(--gh-orange); }

.detail-meta-right {
  display: flex;
  align-items: center;
  gap: 0;
}

.detail-summary {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.4;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  display: inline-block;
  background: var(--pico-code-background-color);
  color: var(--gh-blue);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.detail-content {
  font-size: 0.9rem;
  line-height: 1.7;
}
.detail-content p { margin: 0 0 1rem 0; }
.detail-content pre {
  background: var(--pico-code-background-color);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 1rem 0;
}
.detail-content code { font-size: 0.85rem; }
.detail-content ul, .detail-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}
.detail-content h1, .detail-content h2, .detail-content h3, .detail-content h4 {
  margin: 1.5rem 0 0.75rem 0;
  font-weight: 600;
}
.detail-content h1:first-child, .detail-content h2:first-child, .detail-content h3:first-child {
  margin-top: 0;
}

.detail-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pico-muted-border-color);
  font-size: 0.75rem;
}
.detail-footer span { opacity: 0.5; }
.detail-footer button { margin: 0; }

.detail-actions {
  display: flex;
  gap: 0.5rem;
}

/* Edit icon for detail view - BIG */
.edit-icon {
  width: 32px;
  height: 32px;
  fill: var(--gh-blue);
  transition: fill 0.2s;
}

/* Edit button for detail view - pen icon at top */
.edit-btn-detail {
  background: transparent;
  border: none;
  padding: 0;
  margin-left: 0.75rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.edit-btn-detail:hover { opacity: 1; }
.edit-btn-detail:focus { outline: none; box-shadow: none; }
.edit-btn-detail .edit-icon {
  width: 30px;
  height: 30px;
}

@media (max-width: 600px) {
  .detail-container { padding: 0.75rem; }
  .detail-summary { font-size: 1rem; }
}
