/* Global Time Formatter Styles for Sphynx Tequila Website */
/* Used across all support articles and pages */

.article-last-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: rgba(139, 115, 85, 0.8);
  font-weight: 500;
  font-family: 'Montserrat', sans-serif; /* Match the main site font */
  background: rgba(198, 165, 124, 0.08);
  padding: 0.25rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(198, 165, 124, 0.15);
  text-transform: none;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.article-last-updated:hover {
  background: rgba(198, 165, 124, 0.12);
  border-color: rgba(198, 165, 124, 0.25);
  color: rgba(139, 115, 85, 1);
  transform: scale(1.02);
}

.article-last-updated i {
  font-size: 0.7rem;
  opacity: 0.8;
  color: rgba(139, 115, 85, 0.7);
  transition: color 0.3s ease;
}

/* Article Title with Time Display */
.article-title-with-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-title-with-time h3 {
  flex: 1;
  margin: 0;
  min-width: 0; /* Allow text to wrap */
}

.article-title-with-time .article-last-updated {
  flex-shrink: 0;
}

/* Support Article List Items */
.article-item .article-title-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.article-item .article-title-content h4 {
  flex: 1;
  margin: 0;
  min-width: 0; /* Allow text to shrink */
}

.article-item .article-last-updated {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: rgba(198, 165, 124, 0.06);
  border: 1px solid rgba(198, 165, 124, 0.1);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  margin-left: auto;
  flex-shrink: 0;
}

/* Active article item styling - Keep the same beautiful gold/brown colors */
.article-item.active .article-last-updated {
  background: rgba(198, 165, 124, 0.9) !important;
  color: rgba(255, 255, 255, 1) !important;
  border: 1px solid rgba(198, 165, 124, 1) !important;
  text-shadow: none; /* Remove text shadow to match h4 styling */
  font-weight: 500 !important; /* Match h4 font weight */
  font-family: 'Montserrat', sans-serif !important;
  box-shadow: 0 2px 8px rgba(198, 165, 124, 0.3) !important;
}

.article-item.active .article-last-updated i {
  color: rgba(255, 255, 255, 1) !important;
  text-shadow: none;
}

.article-item.active .article-last-updated span {
  color: rgba(255, 255, 255, 1) !important;
  text-shadow: none;
  font-weight: 500; /* Match h4 font weight */
}

.article-item.active .article-last-updated:hover {
  background: rgba(198, 165, 124, 1) !important;
  border-color: rgba(198, 165, 124, 1) !important;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(198, 165, 124, 0.4) !important;
}

/* Mobile selector item active styling - Keep the same beautiful gold/brown colors */
.mobile-selector-item.selected .article-last-updated {
  background: rgba(198, 165, 124, 0.9) !important;
  color: rgba(255, 255, 255, 1) !important;
  border: 1px solid rgba(198, 165, 124, 1) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(198, 165, 124, 0.3) !important;
}

.mobile-selector-item.selected .article-last-updated i {
  color: rgba(255, 255, 255, 1) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mobile-selector-item.selected .article-last-updated span {
  color: rgba(255, 255, 255, 1) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .article-title-with-time {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .article-last-updated {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }
  
  .article-item .article-title-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}

/* Blog card time styling */
.blog-card .article-last-updated {
  background: rgba(198, 165, 124, 0.1);
  color: var(--primary-gold);
  border-color: rgba(198, 165, 124, 0.2);
  font-weight: 600;
}

/* Template article styling */
.article-card .article-last-updated {
  font-size: 0.8rem;
  margin-left: auto;
}

/* Support template specific */
.support-template .article-last-updated {
  color: rgba(198, 165, 124, 0.8);
}

/* Content panel title with time */
.content-panel-title-with-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(198, 165, 124, 0.1);
  flex-wrap: wrap;
}

.content-panel-title-with-time h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.content-panel-title-with-time .article-last-updated {
  flex-shrink: 0;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
}

/* Panel header title with time replacing controls */
.panel-time-display {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.panel-time-display .article-last-updated {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
}

/* Hide time display on mobile to prevent layout issues */
@media (max-width: 768px) {
  .panel-time-display {
    display: none !important;
  }
}

/* Article time stamp styling for content panel */
.article-time-stamp {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(198, 165, 124, 0.1);
}

.article-time-stamp .article-last-updated {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
}

/* Ensure FontAwesome icons always display */
.article-last-updated i {
  font-size: 0.7rem;
  opacity: 0.8;
  color: rgba(139, 115, 85, 0.7);
  transition: color 0.3s ease;
}

/* Different time variants */
.article-last-updated.small {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
}

.article-last-updated.large {
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
}

/* Color variants for different contexts */
.article-last-updated.subtle {
  background: rgba(139, 115, 85, 0.05);
  color: rgba(139, 115, 85, 0.6);
  border-color: rgba(139, 115, 85, 0.1);
}

.article-last-updated.prominent {
  background: rgba(198, 165, 124, 0.15);
  color: rgba(139, 115, 85, 1);
  border-color: rgba(198, 165, 124, 0.3);
  font-weight: 600;
}

/* Final override rules to ensure time formatter is always visible and structured */
/* These rules must come last to override any conflicting styles */
.article-item .article-last-updated,
.mobile-selector-item .article-last-updated,
.content-panel-title-with-time .article-last-updated {
  visibility: visible !important;
  opacity: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.25rem 0.7rem !important;
  border-radius: 12px !important;
  white-space: nowrap !important;
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  font-family: 'Montserrat', sans-serif !important;
}

.content-panel-title-with-time .article-last-updated {
  font-size: 0.8rem !important;
  padding: 0.3rem 0.8rem !important;
}

.article-item.active .article-last-updated,
.mobile-selector-item.selected .article-last-updated {
  visibility: visible !important;
  opacity: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  background: rgba(198, 165, 124, 0.9) !important;
  color: rgba(255, 255, 255, 1) !important;
  border: 1px solid rgba(198, 165, 124, 1) !important;
  padding: 0.25rem 0.7rem !important;
  border-radius: 12px !important;
  white-space: nowrap !important;
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  font-family: 'Montserrat', sans-serif !important;
  text-shadow: none !important;
  box-shadow: 0 2px 8px rgba(198, 165, 124, 0.3) !important;
}

.article-item.active .article-last-updated *,
.mobile-selector-item.selected .article-last-updated *,
.content-panel-title-with-time .article-last-updated * {
  color: inherit !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-shadow: none !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 500 !important;
}

/* Force FontAwesome clock icon to display everywhere */
.article-last-updated i,
.content-panel-title-with-time .article-last-updated i,
.article-item .article-last-updated i,
.mobile-selector-item .article-last-updated i {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Specific override for active states to prevent square icon */
.article-item.active .article-last-updated i,
.mobile-selector-item.selected .article-last-updated i {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  color: rgba(255, 255, 255, 1) !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
