/* *
* CryptoNews Timeline Theme for Liveblog
*/

/* Main container */
.liveblog-feed {
  background: #ffffff;
  padding: 0;
  margin: 0;
  position: relative;
  max-width: 800px;
}

/* Last Update badge - VISIBLE for cryptonews style */
.liveblog-last-update-badge {
  display: flex !important;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animated SVG icon for the badge */
.liveblog-last-update-badge .live-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.liveblog-last-update-badge .live-icon svg {
  width: 16px;
  height: 16px;
}

.liveblog-last-update-badge .live-icon .wave1 {
  animation: wave-pulse 2s ease-in-out infinite;
  animation-delay: 0s;
}

.liveblog-last-update-badge .live-icon .wave2 {
  animation: wave-pulse 2s ease-in-out infinite;
  animation-delay: 0.4s;
}

.liveblog-last-update-badge .live-icon .wave3 {
  animation: wave-pulse 2s ease-in-out infinite;
  animation-delay: 0.8s;
}

@keyframes wave-pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}


/* Individual entry styling */
.liveblog-entry {
  display: flex;
  background: #ffffff;
  border: 2px solid #f7f5f9;
  box-shadow: #f7f5f9 0px 10px;
  border-radius: 0;
  margin: 0 0 10px 0;
  padding: 16px;
  position: relative;
  align-items: flex-start;
  overflow: hidden;
}

.liveblog-entry:last-child {
  border-bottom: none;
}

/* Timeline node for each entry */
.liveblog-entry::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 15px;
  width: 24px;
  height: 24px;
  background-image: url('../src/live-article.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
}

/* Key events get special styling */
.liveblog-entry.is-key-event::before {
  filter: brightness(1.2) saturate(1.3);
}

/* Left sidebar - time area */
.liveblog-entry-aside {
  width: 22px;
  padding: 15px 10px 15px 0;
  flex-shrink: 0;
  text-align: right;
  order: 1;
}

.liveblog-meta-time {
  text-decoration: none;
  color: #9ca3af;
  display: block;
  font-size: 11px;
}

.liveblog-meta-time:hover {
  color: #6b7280;
  text-decoration: none;
}

/* No global hiding - let each theme control its own display */

/* CryptoNews theme: Show author (override the default hiding) */
.liveblog-entry-cryptonews .liveblog-meta-time span:first-child,
.cryptonews-timeline .liveblog-meta-time span:first-child {
  display: inline !important;
  color: #9ca3af;
  font-size: 11px;
  font-weight: normal;
}

.liveblog-meta-time span:last-child {
  display: block !important;
  font-size: 11px;
  font-weight: normal;
  color: #9ca3af;
}

/* Main content area */
.liveblog-entry-main {
  flex: 1;
  padding: 0;
  order: 2;
  position: relative;
  padding-bottom: 10px;
}

/* Hide avatars completely */
.liveblog-meta-author-avatar {
  display: none !important;
}

/* Author header styling - VISIBLE for cryptonews theme */
.liveblog-entry-cryptonews .liveblog-meta-authors,
.cryptonews-timeline .liveblog-meta-authors {
  display: block !important;
  margin-bottom: 8px;
}

/* Show author elements for cryptonews theme */
.liveblog-entry-cryptonews .liveblog-meta-author,
.cryptonews-timeline .liveblog-meta-author {
  display: block !important;
}

.liveblog-entry-cryptonews .liveblog-meta-author-name,
.cryptonews-timeline .liveblog-meta-author-name {
  display: inline !important;
}

/* Entry content */
.liveblog-entry-content {
  color: #374151;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 0px;
}

/* Make first paragraph look like a headline - the main news headline */
.liveblog-entry-content p:first-child {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: #111827;
  margin-bottom: 12px;
  border: none;
  padding: 0;
}

/* Remove the wrong pseudo-element approach */

.liveblog-entry-content h1,
.liveblog-entry-content h2,
.liveblog-entry-content h3 {
  color: #14171a;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.liveblog-entry-content h1 {
  font-size: 20px;
}

.liveblog-entry-content h2 {
  font-size: 18px;
}

.liveblog-entry-content h3 {
  font-size: 16px;
}

.liveblog-entry-content p {
  margin: 0 0 12px 0;
}

.liveblog-entry-content a {
  color: #1da1f2;
  text-decoration: none;
}

.liveblog-entry-content a:hover {
  text-decoration: underline;
}

/* Embedded content styling */
.liveblog-entry-content blockquote {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  background: #f9fafb;
  font-size: 13px;
}

.liveblog-entry-content .twitter-tweet,
.liveblog-entry-content .embedded-tweet,
.liveblog-entry-content iframe[src*="twitter.com"],
.liveblog-entry-content iframe[src*="x.com"] {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0;
  margin: 12px 0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  max-width: 100%;
}

/* Images and media */
.liveblog-entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 12px 0;
}

/* Entry actions for editors */
.liveblog-entry-actions {
  padding: 12px 0 0 0;
  border-top: 1px solid #e1e8ed;
}

.liveblog-entry-actions button {
  background: #f7f9fa;
  color: #657786;
  border: 1px solid #e1e8ed;
  padding: 6px 12px;
  border-radius: 16px;
  margin-right: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.liveblog-entry-actions button:hover {
  background: #e1e8ed;
  color: #14171a;
}

/* Load more button */
.liveblog-load-more {
  background: #1da1f2;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin: 20px auto;
  display: block;
  transition: all 0.2s ease;
}

.liveblog-load-more:hover {
  background: #1991db;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(29, 161, 242, 0.3);
}

/* Archived message */
.liveblog-archived-message {
  background: #fd7e14;
  color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
}

/* Last Update badge */
.liveblog-last-update {
  background: #e74c3c;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Fixed elements */
#liveblog-fixed-nag,
#liveblog-socketio-error-container {
  background: #14171a;
  color: #ffffff;
  border-top: 2px solid #1da1f2;
  border-radius: 8px 8px 0 0;
}

/* Pagination styling */
.liveblog-pagination {
  text-align: center;
  margin: 20px 0;
}

.liveblog-pagination button {
  background: #f7f9fa;
  color: #657786;
  border: 1px solid #e1e8ed;
  padding: 8px 16px;
  border-radius: 20px;
  margin: 0 4px;
  cursor: pointer;
  font-weight: 500;
}

.liveblog-pagination button:hover {
  background: #1da1f2;
  color: #ffffff;
  border-color: #1da1f2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .liveblog-entry::before {
    left: -9px;
    width: 20px;
    height: 20px;
  }
  
  .liveblog-entry-aside {
    width: 18px;
    padding-right: 8px;
  }
  
  /* On mobile, show content below the badge */
  .liveblog-entry.has-latest-badge .liveblog-entry-content {
    padding-left: 0px !important;
    padding-top: 35px !important;
  }
}
  
  .liveblog-entry-main {
    padding: 15px 15px 15px 5px;
  }
  
  .liveblog-entry {
    margin-bottom: 10px;
  }
}

/* Headline and Custom Editor Styles */
.liveblog-headline {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.3 !important;
  border: none !important;
  padding: 0 !important;
}

.liveblog-custom-editor {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}

/* Default theme styles for headline and editor */
.liveblog-entry-text .liveblog-headline {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #14171a !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.4 !important;
}

/* Ensure headlines work in both themes */
.liveblog-entry-content .liveblog-headline,
.liveblog-entry-text .liveblog-headline {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  background: none;
}

/* Position author/date info in right lower corner for cryptonews style */
.liveblog-entry-main {
  position: relative;
  padding-bottom: 10px; /* Add space for positioned meta info */
}

/* Add padding to content only when entry has latest update badge */
.liveblog-entry.has-latest-badge .liveblog-entry-content {
  padding-left: 110px;
  padding-top: 0px;
}

/* Remove top padding from main container when badge exists */
.liveblog-entry.has-latest-badge .liveblog-entry-main {
  padding-top: 0px;
}

/* Position the meta time link properly */
a.liveblog-meta-time {
  position: absolute !important;
  bottom: 8px !important;
  right: 8px !important;
  left: auto !important;
  top: auto !important;
  font-size: 12px !important;
  color: #9ca3af !important;
  text-decoration: none !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: right !important;
  z-index: 2;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

a.liveblog-meta-time:hover {
  color: #6b7280 !important;
  text-decoration: none !important;
}

a.liveblog-meta-time span {
  font-size: 12px !important;
  color: inherit !important;
  display: inline !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* Author and date styling for cryptonews theme - SHOW author name */
.liveblog-entry-cryptonews a.liveblog-meta-time .author-name,
.cryptonews-timeline a.liveblog-meta-time .author-name {
  display: inline !important;
  color: #9ca3af !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

a.liveblog-meta-time .time-text {
  font-size: 12px !important;
  color: #9ca3af !important;
  font-weight: 400 !important;
  display: inline !important;
}

/* Show bullet separator for cryptonews theme */
.liveblog-entry-cryptonews a.liveblog-meta-time .author-name::after,
.cryptonews-timeline a.liveblog-meta-time .author-name::after {
  content: " • ";
  display: inline !important;
  color: #9ca3af !important;
}