/* PUBMEM Layout - Header, main, timeline, toolbar */

/* Header - sticky like droide */
.logo { height: 42px; width: 42px; vertical-align: middle; margin-right: 8px; }
.logo-link { color: inherit; text-decoration: none !important; display: flex; align-items: center; }
.logo-link:hover { opacity: 0.8; text-decoration: none !important; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--pico-background-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1rem 1rem;
  margin: 0 auto 1rem;
  max-width: var(--content-width);
  border-bottom: 1px solid var(--pico-muted-border-color);
}
.header h1 { display: flex; align-items: center; margin: 0; font-size: 1.65rem; font-weight: 600; }
.header-actions { display: flex; gap: 0.75rem; align-items: center; }
.header-actions button { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.header-actions button.active {
  border-color: var(--pico-primary);
  color: var(--pico-primary);
}

.nav-link {
  color: var(--gh-text-subtle);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--gh-blue); }
.icon-link { display: flex; align-items: center; }
.search-icon { width: 18px; height: 18px; }
.nav-link.logout-link:hover { color: #ef4444; }
.version { font-size: 0.7rem; opacity: 0.5; margin-left: 0.5rem; }
.pubhub-link { margin-left: 0.5rem; color: var(--gh-text-subtle); transition: color 0.2s; }
.pubhub-link:hover { color: var(--gh-blue); }

/* Service description */
.service-description {
  max-width: var(--content-width);
  margin: 0 auto 0;
  padding: 0 1rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.service-description p { margin: 0; color: var(--gh-text-subtle); font-size: 1rem; }
.service-description strong { color: var(--gh-text); }
.service-description a { color: var(--gh-blue); text-decoration: none; }
.service-description a:hover { text-decoration: underline; }

/* Timeline - grid like pubbin */
.timeline {
  max-width: var(--content-width);
  margin: 1rem auto 0;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.timeline.page-view {
  display: block;
}

/* Entries header */
.entries-header {
  max-width: var(--content-width);
  margin: 1rem auto 0.5rem;
  padding: 0 1rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gh-text);
}

/* Toolbar below activity chart */
.entries-toolbar {
  max-width: var(--content-width);
  margin: 0 auto 0.75rem;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.filter-row select {
  margin: 0;
  padding: 0.4rem 2rem 0.4rem 0.6rem;
  font-size: 0.85rem;
  min-width: 140px;
}

.add-btn {
  position: relative;
  background: transparent;
  border: none;
  color: var(--gh-blue);
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  line-height: 1;
}
.add-btn:hover { color: var(--gh-orange); }
.add-btn::after {
  content: "Add entry";
  position: absolute;
  bottom: -2rem;
  right: 0;
  background: var(--gh-bg-subtle);
  color: var(--gh-text);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  transition-delay: 0s;
}
.add-btn:hover::after {
  opacity: 1;
  transition-delay: 700ms;
}

/* Login */
.login-container { max-width: min(360px, 100% - 2rem); margin: 0 auto; padding-top: 20vh; }
.login-container .header { justify-content: center; border-bottom: none; margin-bottom: 1.5rem; }
.login-container .header h1 { font-size: 2.9rem; }
.login-container .logo { height: 74px; width: 74px; }

/* Mobile responsiveness */
@media (max-width: 600px) {
  .header { padding: 1rem 0.75rem 0.75rem; }
  .header h1 { font-size: 1rem; }
  .header-actions { gap: 0.5rem; }
  .header-actions button { padding: 0.3rem 0.5rem; font-size: 0.75rem; }
  .nav-link { padding: 0.5rem; min-height: 44px; display: flex; align-items: center; }
  .entries-toolbar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .filter-row { width: 100%; }
  .filter-row select { flex: 1; min-width: auto; }
  .add-btn { align-self: flex-end; min-width: 44px; min-height: 44px; }
  .timeline { grid-template-columns: 1fr; }
  .login-container { padding-top: 10vh; }
}
