/* Chart Detail Page Styles - Enhanced responsive fixes */

/* Chart Detail Section */
.chart-detail-section {
  padding: var(--space-md) 0 0 0; /* Removed bottom padding */
  background-color: var(--color-background);
}

/* Chart Title Styling - matches blog-title style but centered for chart pages */
.chart-detail-section .h2-for-titles-style {
  color: #115151;
  font-weight: 500;
  font-size: var(--text-xl);
  margin-bottom: 0.5em;
  text-align: center; /* Changed from left to center */
}

/* Chart Entry Description - Reusable style for chart page descriptions */
.chart-entry-description {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #2d2d2d;
  font-size: 0.875em; /* 14px equivalent */
  line-height: 1.5;
  margin-bottom: 2.5em; /* Reduced from 3.5em to 2.5em */
  text-align: left;
  max-width: 100%;
  display: none; /* Hide the paragraph */
}

/* Chart Title Styling - matches blog-title style */
.chart-detail-section .blog-title {
  color: #115151;
  font-weight: 500;
  font-size: var(--text-xl);
  margin-bottom: 2em;
  text-align: center;
}

/* Alternative chart title class */
.chart-page-title {
  color: #115151;
  font-weight: 500;
  font-size: var(--text-xl);
  margin-bottom: 2em;
  text-align: center;
}

.chart-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.chart-main-card {
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  width: 100%;
  margin-bottom: 0;
  overflow: hidden; /* Prevent overflow */
  box-sizing: border-box;
}

/* Chart Controls Section */
.chart-controls {
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.chart-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem; /* Keep more compact than original 0.5rem */
  margin-bottom: 0.8rem; /* Keep more compact than original 1rem */
  align-items: center;
  justify-content: flex-start; 
}

.category-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* Returned to original */
  padding: 0.5rem 0.75rem; /* Returned to original */
  border: 1px solid #dfe1e1;
  border-radius: var(--radius-sm);
  background-color: var(--color-background);
  color: #686868;
  font-size: 0.75em; /* Returned to 0.75em */
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-button:hover {
  background-color: var(--color-light-gray);
}

.category-button.active {
  background-color: var(--color-background);
  border-color: var(--color-text);
}

.category-button.inactive {
  /* Remove: opacity: 0.6; background-color: #f8f8f8; */
}

.category-button.inactive .category-indicator {
  background-color: #f1f1f1 !important;
}

.category-button.active .category-indicator {
  /* Color will be set dynamically through JavaScript */
  /* Don't use !important here to allow dynamic overriding */
}

.category-indicator {
  width: 12px; /* Returned to original */
  height: 12px; /* Returned to original */
  border-radius: 2px;
  flex-shrink: 0;
}

.show-more-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* Returned to original */
  padding: 0.5rem 0.75rem; /* Returned to original */
  border: 1px solid #dfe1e1;
  border-radius: var(--radius-sm);
  background-color: var(--color-background);
  color: #686868;
  font-size: 0.75em; /* Returned to original */
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

.show-more-button:hover {
  background-color: var(--color-light-gray);
}

.show-more-arrow {
  width: 16px; /* Returned to original */
  height: 16px; /* Returned to original */
  transition: transform 0.2s ease;
}

.show-more-arrow.expanded {
  transform: rotate(90deg);
}

.additional-category-buttons {
  display: none;
}

.additional-category-buttons.visible {
  display: block;
}

.category-list-additional {
  display: none;
}

.category-list-additional.visible {
  display: block;
}

.show-all-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dfe1e1;
  border-radius: var(--radius-sm);
  background-color: var(--color-background);
  color: #686868;
  font-size: 0.75em;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.show-all-button:hover {
  background-color: var(--color-light-gray);
}

.show-all-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.show-all-arrow.expanded {
  transform: rotate(90deg);
}

.chart-container {
  height: 300px;
  position: relative;
  width: 100%;
  overflow: hidden; /* Critical: prevent chart overflow */
  box-sizing: border-box;
  max-width: 100%; /* Ensure it never exceeds container */
}

.chart-description {
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-md);
  display: none; /* Hide the section */
}

.chart-description h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.chart-description p {
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
  font-size: var(--text-md);
}

.read-more {
  display: flex;
  align-items: center;
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  margin-left: auto;
  width: fit-content;
}

.read-more svg {
  margin-left: 0.25rem;
  transition: transform 0.2s ease;
}

.read-more:hover svg {
  transform: translateX(3px);
}

/* Related Content Section */
.related-content-section {
  padding: var(--space-md) 0 var(--space-xl);
  background-color: var(--color-background);
}

/* Related Content Section */
.blog {
  background-color: #eceeee;
}

.related-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

/* Add hover effect to blog cards in chart detail page */
.related-content-section .blog-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.related-content-section .blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.btn-other-content {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-size: var(--text-sm);
  background-color: var(--color-accent);
  color: var(--color-background);
}

.btn-other-content:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-2px);
}

/* NEW SECTION: Chart Info Section */
.chart-info-section {
  padding: 0.5rem 0 var(--space-md) 0; /* Significantly reduced top padding */
  background-color: var(--color-background);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.chart-info-container {
  /* Use the same container as the chart section */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem); /* Same padding as .container */
}

.chart-full-question {
  margin-bottom: var(--space-md);
}

.chart-full-question h4 {
  font-size: 1rem;
  font-weight: 500;
  color: #19807e;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.chart-full-question p {
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.chart-info-divider {
  height: 1px;
  background-color: #dfe1e1;
  margin: var(--space-md) 0;
  width: 100%;
}

.chart-info-columns {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .chart-info-columns {
    flex-direction: row;
  }

  .chart-info-left {
    flex: 1;
    padding-right: var(--space-md);
  }

  .chart-info-right {
    flex: 1;
    padding-left: var(--space-md);
  }
}

.chart-info-left h5,
.chart-info-right h5 {
  font-size: 1rem;
  font-weight: 500;
  color: #19807e;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

.chart-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.chart-info-icon {
  margin-right: 0.75rem;
  color: #686868;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.chart-info-text {
  font-size: 0.875rem;
  color: var(--color-text);
}

.chart-related-content {
  margin-bottom: var(--space-md);
}

.chart-related-item {
  display: flex;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f9f9f9;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.chart-related-item:hover {
  background-color: #f1f1f1;
}

.chart-related-image {
  width: 80px;
  height: 60px;
  background-color: #ddd;
  margin-right: 0.75rem;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #888;
  text-align: center;
  line-height: 1.2;
}

.chart-related-image::after {
  content: "";
}

.chart-related-image-list::before {
  content: "";
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 6.00067L21 6.00139M8 12.0007L21 12.0015M8 18.0007L21 18.0015M3.5 6H3.51M3.5 12H3.51M3.5 18H3.51M4 6C4 6.27614 3.77614 6.5 3.5 6.5C3.22386 6.5 3 6.27614 3 6C3 5.72386 3.22386 5.5 3.5 5.5C3.77614 5.5 4 5.72386 4 6ZM4 12C4 12.2761 3.77614 12.5 3.5 12.5C3.22386 12.5 3 12.2761 3 12C3 11.7239 3.22386 11.5 3.5 11.5C3.77614 11.5 4 11.7239 4 12ZM4 18C4 18.2761 3.77614 18.5 3.5 18.5C3.22386 18.5 3 18.2761 3 18C3 17.7239 3.22386 17.5 3.5 17.5C3.77614 17.5 4 17.7239 4 18Z' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.chart-related-image-timeseries::before {
  content: "";
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21 21H6.2C5.07989 21 4.51984 21 4.09202 20.782C3.71569 20.5903 3.40973 20.2843 3.21799 19.908C3 19.4802 3 18.9201 3 17.8V3M7 15L12 9L16 13L21 7' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.chart-related-content-info {
  flex: 1;
}

.chart-related-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.chart-related-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #686868;
}

.chart-related-category {
  padding: 0.15rem 0.5rem;
  background-color: #f1f1f1;
  border-radius: 2px;
}

.chart-share {
  margin-top: var(--space-md);
}

.chart-share h5 {
  font-size: 0.875rem;
  font-weight: 500;
  color: #19807e; /* Changed to match other titles */
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.chart-share-buttons {
  display: flex;
  gap: 0.75rem;
}

.chart-share-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #686868;
  transition: all 0.2s ease;
  cursor: pointer;
}

.chart-share-button:hover {
  transform: translateY(-2px);
}

.chart-share-button.facebook:hover {
  background-color: #1877f2;
  color: white;
}

.chart-share-button.twitter:hover {
  background-color: #1da1f2;
  color: white;
}

.chart-share-button.linkedin:hover {
  background-color: #0a66c2;
  color: white;
}

.chart-share-button.email:hover {
  background-color: #ea4335;
  color: white;
}

/* Image placeholder styles for blog section */
.blog-image-placeholder {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: var(--radius-blog);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background-color: #ddd;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-image-placeholder::after {
  content: "Image placeholder";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.875rem;
  color: #888;
  text-align: center;
}

/* New styles for subtitle and specific titles */
.chart-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: #19807e;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.chart-explore-more {
  font-size: 1rem;
  font-weight: 500;
  color: #19807e;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Documentation of styles for future use */
/* 
  Specific colors for chart elements:
  --chart-subtitle-color: #19807E; (Color for chart subtitles)
  --chart-explore-more-color: #19807E; (Color for exploration titles)
  
  Reusable classes:
  .chart-subtitle - For subtitles in chart sections
  .chart-explore-more - For titles in exploration sections
  .chart-info-text - For informative text in chart sections
  .chart-info-item - For information elements with icon and text
*/

/* Ensure all elements use Helvetica Neue */
.chart-info-section,
.chart-full-question,
.chart-info-left,
.chart-info-right,
.chart-info-text,
.chart-related-title,
.chart-related-meta,
.chart-share h5 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Media Queries */

/* 320px - Extra Small Mobile */
@media (min-width: 320px) {
  .chart-container {
    height: 250px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .chart-title {
    font-size: var(--text-xl);
  }

  .chart-description h3 {
    font-size: var(--text-lg);
  }

  .chart-description p {
    font-size: var(--text-sm);
  }

  .chart-category-buttons {
    gap: 0.3rem; /* More compact on mobile */
  }

  .category-button {
    padding: 0.4rem 0.6rem; /* Slightly more compact on mobile */
    font-size: 0.75em; /* Keep at 0.75em */
  }

  .show-more-button {
    font-size: 0.75em; /* Keep at 0.75em */
    padding: 0.4rem 0.6rem; /* Slightly more compact on mobile */
  }

  /* Responsive adjustments for chart entry description */
  .chart-entry-description {
    font-size: 0.875em; /* Maintain 14px equivalent on mobile */
    line-height: 1.4; /* Slightly tighter line height on mobile */
  }

  /* Chart info responsive adjustments */
  .chart-full-question h4 {
    font-size: 0.875rem;
  }

  .chart-full-question p {
    font-size: 1rem;
  }

  .chart-info-item {
    margin-bottom: 0.75rem;
  }

  /* Reduce spacing even more on mobile */
  .chart-info-section {
    padding: 0.25rem 0 var(--space-md) 0;
  }
}

/* 390px - Small Mobile */
@media (min-width: 390px) {
  .chart-container {
    height: 260px;
  }

  .chart-category-buttons {
    gap: 0.35rem;
  }

  .category-button {
    padding: 0.45rem 0.65rem;
    font-size: 0.75em;
  }

  .show-more-button {
    font-size: 0.75em;
    padding: 0.45rem 0.65rem;
  }
}

/* 430px - Medium Mobile */
@media (min-width: 430px) {
  .chart-container {
    height: 270px;
  }
}

/* 540px - Large Mobile */
@media (min-width: 540px) {
  .chart-container {
    height: 280px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .chart-title {
    font-size: var(--text-2xl);
  }

  .chart-category-buttons {
    gap: 0.4rem;
  }

  .category-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.75em;
  }

  .show-more-button {
    font-size: 0.75em;
    padding: 0.5rem 0.75rem;
  }

  /* Restore normal line height on larger screens */
  .chart-entry-description {
    line-height: 1.5;
  }

  /* Chart info responsive adjustments */
  .chart-full-question h4 {
    font-size: 1rem;
  }

  .chart-full-question p {
    font-size: 1.125rem;
  }
}

/* 620px - Small Tablet */
@media (min-width: 620px) {
  .chart-container {
    height: 300px;
  }

  .chart-description h3 {
    font-size: var(--text-xl);
  }

  .chart-description p {
    font-size: var(--text-md);
  }
}

/* 728px - Tablet */
@media (min-width: 728px) {
  .chart-container {
    height: 350px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .chart-main-card {
    padding: var(--space-lg);
  }
}

/* 1024px - Small Desktop */
@media (min-width: 1024px) {
  .chart-container {
    height: 400px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .chart-title {
    margin-bottom: var(--space-lg);
  }
}

/* 1280px - Medium Desktop */
@media (min-width: 1280px) {
  .chart-container {
    height: 450px;
  }
}

/* 1440px - Large Desktop */
@media (min-width: 1440px) {
  .chart-container {
    height: 500px;
  }
}

/* Adjust style for all h5 in chart-info-right */
.chart-info-right h5 {
  font-size: 1rem;
  font-weight: 500;
  color: #19807e;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Adjustment for the share block when in the left column */
.chart-info-left .chart-share {
  margin-top: var(--space-md);
  margin-bottom: 0;
}

.chart-info-left .chart-share h5 {
  color: #19807e; /* Updated to match other titles */
}

/* ===== UNIFIED CHART STYLES (CONSOLIDATED) ===== */
/* Base Chart Container Styles - Enhanced from charts-unified.css */
.chart-container {
  position: relative;
  width: 100%;
  min-height: 250px;
  height: 300px;
  margin-bottom: 1rem;
  background-color: #ffffff;
  border-radius: var(--radius-md);
}

/* Chart Canvas Element */
.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: var(--radius-md);
}

/* Chart Card Styles (for homepage grid) */
.chart-card {
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 300px;
}

.chart-card h4 {
  color: #4d4f4f;
  font-weight: 500;
  font-size: var(--text-md);
  margin-bottom: 0.5rem;
  margin-top: 0;
}

/* Grid System Integration */
.grid-sixty-thirty-item .chart-container {
  height: 300px;
  width: 100%;
  min-height: 250px;
}

.grid-two-columns-item .chart-container {
  height: 280px;
  width: 100%;
  min-height: 220px;
}

/* ===== CHART LOADING STATES ===== */
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #686868;
  font-size: 0.875rem;
}

.chart-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #dc2626;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

/* ===== CHART LEGEND CUSTOMIZATION ===== */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
}

.chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== ACCESSIBILITY ===== */
.chart-container:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.category-button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.show-more-button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  .chart-controls {
    display: none;
  }

  .chart-container {
    height: 400px !important;
    page-break-inside: avoid;
  }
}

/* ===== ENHANCED RESPONSIVE BREAKPOINTS FOR UNIFIED CHARTS ===== */

/* Mobile (320px - 539px) - Enhanced */
@media (max-width: 539px) {
  .chart-container,
  .grid-sixty-thirty-item .chart-container,
  .grid-two-columns-item .chart-container {
    height: 250px;
    min-height: 200px;
  }

  .chart-card {
    min-width: 280px;
    padding: var(--space-sm);
  }
}

/* Tablet (540px - 1023px) - Enhanced */
@media (min-width: 540px) and (max-width: 1023px) {
  .grid-sixty-thirty-item .chart-container {
    height: 280px;
    min-height: 220px;
  }

  .grid-two-columns-item .chart-container {
    height: 260px;
    min-height: 200px;
  }

  .chart-card {
    min-width: 320px;
  }
}

/* Desktop (1024px+) - Enhanced */
@media (min-width: 1024px) {
  .grid-sixty-thirty-item .chart-container {
    height: 300px;
    min-height: 250px;
  }

  .grid-two-columns-item .chart-container {
    height: 280px;
    min-height: 220px;
  }

  .chart-card {
    min-width: 400px;
  }
}

/* Large Desktop (1440px+) - Enhanced */
@media (min-width: 1440px) {
  .grid-sixty-thirty-item .chart-container {
    height: 350px;
    min-height: 300px;
  }

  .grid-two-columns-item .chart-container {
    height: 320px;
    min-height: 280px;
  }
}

/* Enhanced responsive breakpoints for chart detail page */
@media (min-width: 700px) and (max-width: 750px) {
  .chart-detail-section .container {
    overflow-x: hidden;
  }

  .chart-main-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  .chart-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 280px !important;
    overflow: hidden;
    box-sizing: border-box;
  }

  .chart-container canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
  }
}

/* Daily Category List Styling - Insights Page Only */
.category-list-container {
  padding: var(--space-md);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.category-list-main,
.category-list-additional {
  width: 100%;
  max-width: 100%;
}

.category-list-container .category-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.category-list-container .category-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.category-list-container .category-rank {
  font-weight: 600;
  color: var(--color-text);
  font-size: var(--text-md);
  min-width: 30px;
  text-align: center;
}

.category-list-container .category-indicator {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.category-list-container .category-name {
  font-size: var(--text-md);
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.3;
  flex: 1;
}

.category-list-container .category-value {
  font-size: var(--text-md);
  color: var(--color-text-light);
  font-weight: 500;
  text-align: right;
  min-width: 60px;
}

/* Time span editor styles */
.time-span-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0 0.25rem; /* Remove horizontal padding to align with other items */
  border-radius: 4px;
  transition: background-color 0.2s ease;
  margin-left: -0.25rem; /* Compensate for any remaining offset */
}

.time-span-display:hover {
  background-color: #f5f5f5;
  padding: 0.25rem 0.5rem; /* Add horizontal padding only on hover */
  margin-left: -0.75rem; /* Adjust margin to maintain alignment on hover */
}

.edit-icon {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.time-span-display:hover .edit-icon {
  opacity: 1;
}

.time-span-editor {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 300px;
}

.date-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.date-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-input-group label {
  font-weight: 500;
  min-width: 40px;
  font-size: 0.9rem;
}

.month-select, .year-select {
  padding: 0.375rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

.month-select {
  min-width: 80px;
}

.year-select {
  min-width: 80px;
}

.date-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.date-cancel, .date-apply {
  padding: 0.375rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-cancel {
  background: white;
  color: #666;
}

.date-cancel:hover {
  background: #f5f5f5;
}

.date-apply {
  background: var(--color-primary, #007bff);
  color: white;
  border-color: var(--color-primary, #007bff);
}

.date-apply:hover {
  background: var(--color-primary-dark, #0056b3);
}

/* Date type selector styles */
.date-type-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.date-type-selector label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.date-type-selector input[type="radio"] {
  margin: 0;
}

/* Date input styles */
.date-input {
  padding: 0.375rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 140px;
}

.single-date-input,
.range-date-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Ensure consistent spacing for both single and range inputs */
.date-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-input-group label {
  font-weight: 500;
  min-width: 40px;
  font-size: 0.9rem;
}
