/* ============================================
   FeediX Mini App - Blog Niche Stylesheet
   Creator publication style (Medium, Substack, Ghost mobile)
   ============================================ */

/* -----------------------------------------------
   Publication header
----------------------------------------------- */

.pub-header {
  background: #0e0e16;
  border-bottom: 1px solid #1e1e2a;
  padding: 20px 16px 16px;
}

.pub-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pub-header-text {
  flex: 1;
  min-width: 0;
}

.pub-channel-name {
  font-size: 24px;
  font-weight: 800;
  color: #f0f0f0;
  letter-spacing: -0.5px;
  line-height: 1.2;
  font-family: Georgia, 'Times New Roman', serif;
}

.pub-tagline {
  color: #6c5ce7;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.pub-meta {
  color: #555;
  font-size: 12px;
  margin-top: 4px;
}

.pub-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.pub-admin-btn {
  color: #a29bfe;
  border: 1px solid #3d3d6b;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.15s ease;
  line-height: 1.6;
}

.pub-admin-btn:active {
  opacity: 0.65;
}

/* -----------------------------------------------
   Featured article
----------------------------------------------- */

.pub-featured {
  cursor: pointer;
  background: #0e0e16;
  border-bottom: 1px solid #1e1e2a;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.pub-featured.visible {
  opacity: 1;
  transform: translateY(0);
}

.pub-featured:active {
  background: #13131e;
}

.pub-featured-img {
  height: 220px;
  overflow: hidden;
  background: #1e1e2a;
}

.pub-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pub-featured-img img.loaded {
  opacity: 1;
}

.pub-featured-body {
  padding: 16px;
}

.pub-featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pub-featured-title {
  font-size: 22px;
  font-weight: 800;
  color: #f0f0f0;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.3;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-featured-excerpt {
  font-size: 15px;
  color: #999;
  line-height: 1.65;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -----------------------------------------------
   Section divider
----------------------------------------------- */

.pub-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 12px;
}

.pub-divider-line {
  flex: 1;
  height: 1px;
  background: #1e1e2a;
  display: block;
}

.pub-divider-text {
  font-size: 11px;
  color: #555;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 600;
}

/* -----------------------------------------------
   Article card
----------------------------------------------- */

.pub-article-card {
  background: #131320;
  border: 1px solid #1e1e2a;
  border-radius: 10px;
  margin: 0 16px 12px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.15s ease;
}

.pub-article-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.pub-article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.1);
}

.pub-article-card:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Staggered reveal delays */
.pub-article-card:nth-child(1) { transition-delay: 0.05s; }
.pub-article-card:nth-child(2) { transition-delay: 0.10s; }
.pub-article-card:nth-child(3) { transition-delay: 0.15s; }
.pub-article-card:nth-child(4) { transition-delay: 0.20s; }
.pub-article-card:nth-child(5) { transition-delay: 0.25s; }

.pub-article-cover {
  height: 160px;
  overflow: hidden;
  background: #1e1e2a;
}

.pub-article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pub-article-cover img.loaded {
  opacity: 1;
}

.pub-article-body {
  padding: 14px;
}

.pub-article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pub-article-title {
  font-size: 16px;
  font-weight: 700;
  color: #e8e8e8;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.pub-article-excerpt {
  font-size: 13px;
  color: #777;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

/* -----------------------------------------------
   Shared meta elements
----------------------------------------------- */

.pub-reading-time {
  display: inline-block;
  background: rgba(108, 92, 231, 0.15);
  color: #a29bfe;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.pub-date {
  font-size: 12px;
  color: #555;
  line-height: 1.8;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pub-tag {
  color: #6c5ce7;
  font-size: 12px;
  font-weight: 500;
}

/* -----------------------------------------------
   Feed container
----------------------------------------------- */

#blog-feed {
  background: #0e0e16;
  padding-top: 4px;
  padding-bottom: 16px;
  min-height: 50vh;
}

#blog-feed-pre {
  background: #0e0e16;
  padding-top: 4px;
}

/* -----------------------------------------------
   Empty state
----------------------------------------------- */

.pub-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: #555;
  font-size: 15px;
}

.pub-empty-icon {
  font-size: 36px;
  opacity: 0.6;
}

/* -----------------------------------------------
   Scroll sentinel
----------------------------------------------- */

#blog-feed ~ .scroll-sentinel {
  display: flex;
  justify-content: center;
  padding: 20px 0 32px;
}

/* -----------------------------------------------
   RTL support
----------------------------------------------- */

[dir="rtl"] .pub-header-inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .pub-featured-meta {
  flex-direction: row-reverse;
}

[dir="rtl"] .pub-article-meta {
  flex-direction: row-reverse;
}

[dir="rtl"] .pub-tags {
  flex-direction: row-reverse;
}
