:root {
  --ps-primary: #8b2635;
  --ps-primary-light: #9b3645;
  --ps-primary-dark: #6b1e2a;
  --ps-primary-darker: #5b1620;
  --ps-primary-rgb: 139, 38, 53;
}

.page_statistics :where(*:not([class*="leaflet-"])),
.page_statistics :where(*:not([class*="leaflet-"]))::before,
.page_statistics :where(*:not([class*="leaflet-"]))::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.page_statistics :where(*:not([class*="fa-"]):not([class*="leaflet-"])),
.page_statistics :where(*:not([class*="fa-"]):not([class*="leaflet-"]))::before,
.page_statistics :where(*:not([class*="fa-"]):not([class*="leaflet-"]))::after {
  font-family: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.page_statistics ul,
.page_statistics ol {
  list-style: none;
}

.page_statistics button,
.page_statistics select,
.page_statistics input {
  font: inherit;
  color: inherit;
}

.page_statistics a {
  text-decoration: none;
}

.page_statistics h2,
.page_statistics h3,
.page_statistics h4 {
  font-weight: 600;
  text-transform: none;
  border: 0;
}

.page_statistics table {
  border-collapse: collapse;
  width: 100%;
}

.page_statistics .container {
  display: flex;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.page_statistics {
  container-type: inline-size;
  container-name: publicstats;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: normal;
  background-color: #f8f9fa;
  color: #333;
}

.page_statistics .stats-layout {
  display: flex;
  min-height: 100vh;
}

.page_statistics .sidebar {
  width: 280px;
  background: #fff;
  margin-top: 30px;
  height: fit-content;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page_statistics .sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.page_statistics .sidebar-header h1 {
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.page_statistics .sidebar-section {
  margin: 20px 0;
}

.page_statistics .section-header {
  padding: 0 20px;
  margin-bottom: 8px;
}

.page_statistics .section-title {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  letter-spacing: normal;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.page_statistics .sidebar .section-title,
.page_statistics .sidebar .section-title span {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page_statistics .section-content {
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  max-height: 1000px;
  opacity: 1;
}

.page_statistics .section-content.section-collapsed {
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease;
}

.page_statistics .section-toggle {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.page_statistics .section-toggle i {
  font-size: 11px;
  transition: transform 0.3s ease;
}

.page_statistics .section-collapsed .section-toggle i {
  transform: rotate(-90deg);
}

.page_statistics .section-icon {
  margin-right: 8px;
  font-size: 14px;
  opacity: 0.9;
  width: 18px;
  text-align: center;
}

.page_statistics .sidebar-menu {
  list-style: none;
}

.page_statistics .menu-item {
  margin: 0;
}

.page_statistics .menu-link {
  display: block;
  padding: 10px 20px 10px 36px;
  color: #555 !important;
  cursor: pointer;
  text-decoration: none !important;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.page_statistics .menu-link:hover {
  background-color: #f5f5f5;
  color: #333 !important;
  text-decoration: none !important;
}

.page_statistics .menu-link.active {
  background-color: var(--ps-primary) !important;
  color: white !important;
  border-left-color: var(--ps-primary-dark);
}

.page_statistics .main-content {
  flex: 1;
  margin: 30px;
  position: relative;
  min-height: 400px;
}

.page_statistics .content-header {
  margin-bottom: 30px;
}

.page_statistics .content-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.page_statistics .content-subtitle {
  color: #666;
  font-size: 14px;
}

.page_statistics .stats-grid {
  display: grid;
  gap: 24px;
}

.page_statistics .stats-card {
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page_statistics .card-header {
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfc;
}

.page_statistics .card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.page_statistics .card-body {
  padding: 20px;
}

.page_statistics .chart-container {
  position: relative;
  height: 350px;
}

.page_statistics .map-container {
  height: 450px;
  border-radius: 4px;
  overflow: hidden;
}

.page_statistics .table-container {
  overflow-x: auto;
}

.page_statistics .stats-table {
  width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

.page_statistics .stats-table th,
.page_statistics .stats-table td {
  padding: 12px !important;
  text-align: left !important;
  border: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
  color: #333 !important;
  background: transparent !important;
}

.page_statistics .stats-table th {
  background: #fafbfc !important;
  font-weight: 600 !important;
  color: #555 !important;
  font-size: 13px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.page_statistics .stats-table td:first-child,
.page_statistics .stats-table th:first-child {
  white-space: nowrap !important;
  width: 40px !important;
}

.page_statistics .stats-table td:last-child {
  text-align: right !important;
  font-weight: 600 !important;
  color: #333 !important;
}

.page_statistics .stats-table th:last-child {
  text-align: right !important;
}

.page_statistics .stats-table > tbody > tr:hover:not(.journal-articles-row) {
  background-color: #f8f9fa !important;
}

.page_statistics
  .stats-table
  > tbody
  > tr:hover:not(.journal-articles-row)
  > td {
  background-color: #f8f9fa !important;
}

/* Overlay appended to <body>, outside .page_statistics; cannot use parent scope */
.export-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  animation: fadeIn 0.2s ease;
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.page_statistics .ps-computing-placeholder {
  padding: 20px;
  text-align: center;
}

/* !important needed to override OJS theme a { color } rules */
.page_statistics .stats-table a,
.page_statistics .ps-article-link {
  color: var(--ps-primary) !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

.page_statistics .stats-table a:hover,
.page_statistics .ps-article-link:hover {
  color: var(--ps-primary-dark) !important;
  text-decoration: underline !important;
}

.page_statistics .map-legend {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 12px;
}

.page_statistics .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page_statistics .legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.page_statistics .year-selector-container {
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
}

.page_statistics .year-selector-container label {
  font-weight: 600;
  margin-right: 10px;
}

.page_statistics select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.page_statistics .filter-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.page_statistics .table-color-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.page_statistics .reset-zoom-btn {
  padding: 6px 12px;
  background-color: var(--ps-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.page_statistics .reset-zoom-btn:hover {
  background-color: var(--ps-primary-dark);
}

.page_statistics .reset-zoom-btn i {
  margin-right: 4px;
}

.page_statistics .loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: 12px;
  width: 100%;
  height: 100%;
}

.page_statistics .loading-content {
  text-align: center;
  padding: 40px;
}

.page_statistics .loading-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--ps-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.page_statistics .loading-indicator p {
  color: #666;
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}

.page_statistics .loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
}

.page_statistics .loading-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--ps-primary);
  animation: loading-dots 1.4s infinite ease-in-out both;
}

.page_statistics .loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.page_statistics .loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading-dots {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.page_statistics .skeleton-loader {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 4px;
  height: 20px;
  margin: 10px 0;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.page_statistics .metric-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #e9ecef;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.page_statistics .metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page_statistics .metric-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--ps-primary);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.page_statistics .metric-label {
  font-size: 14px;
  color: #6c757d;
  letter-spacing: normal;
}

.page_statistics .export-csv-btn {
  background: linear-gradient(135deg, #28a745 0%, #20883a 100%);
  color: white;
  border: none;
  padding: 6px 14px;
  line-height: 1.35;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.page_statistics .export-csv-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1a6e2e 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.page_statistics .export-csv-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.page_statistics .export-csv-btn i {
  margin-right: 5px;
  font-size: 0.9em;
}

.page_statistics .global-export-container {
  display: flex;
  justify-content: flex-end;
  padding: 15px 0;
  margin-bottom: 10px;
}

.page_statistics .export-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #28a745 0%, #20883a 100%);
  color: white;
  border: none;
  padding: 2px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
  transition: all 0.2s ease;
  width: auto;
  height: auto;
  line-height: 1.2;
}

.page_statistics .export-menu-toggle:hover {
  background: linear-gradient(135deg, #218838 0%, #1a6e2e 100%);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.page_statistics .export-menu-dropdown {
  display: none;
}

.page_statistics .export-menu-dropdown hr {
  margin: 5px 0;
  border: none;
  border-top: 1px solid #e9ecef;
}

.page_statistics .ps-group-disabled {
  display: none !important;
}
.page_statistics .ps-item-disabled {
  display: none !important;
}

.page_statistics .content-section .section-header,
.page_statistics .content-section h2,
.page_statistics .content-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page_statistics .ps-section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page_statistics .ps-empty-message {
  text-align: center;
  padding: 40px;
  color: #666;
}

.page_statistics .ps-error-message {
  text-align: center;
  padding: 40px;
  color: #e74c3c;
}

.page_statistics .ps-cell-bold-right {
  font-weight: bold;
  text-align: right;
}
.page_statistics .ps-cell-center {
  text-align: center;
}
.page_statistics .ps-cell-clickable {
  cursor: pointer;
}

.page_statistics .ps-color-success {
  color: #27ae60 !important;
}
.page_statistics .ps-color-warning {
  color: #f39c12 !important;
}
.page_statistics .ps-color-muted {
  color: #666 !important;
}
.page_statistics .ps-color-error {
  color: #e74c3c !important;
}
.page_statistics .ps-color-primary {
  color: var(--ps-primary) !important;
}
.page_statistics .ps-color-blue {
  color: #3498db !important;
}
.page_statistics .ps-color-green {
  color: #2ecc71 !important;
}
.page_statistics .ps-color-purple {
  color: #9b59b6 !important;
}

.page_statistics .ps-stat-box {
  text-align: center;
}

.page_statistics .ps-stat-value {
  font-size: 32px;
  font-weight: bold;
}

.page_statistics .ps-stat-value-large {
  font-size: 48px;
  font-weight: bold;
  margin: 20px 0;
}

.page_statistics .ps-stat-label {
  color: #666;
  margin-top: 5px;
}

.page_statistics .ps-stat-label-sm {
  color: #666;
  font-size: 14px;
}

.page_statistics .ps-no-data-container {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.page_statistics .ps-no-data-icon {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.3;
}

.page_statistics .ps-no-data-text {
  font-size: 14px;
}

.page_statistics .ps-grid-span-2 {
  grid-column: span 2;
}

.page_statistics .leaflet-popup-content-wrapper {
  padding: 1px;
  text-align: left;
  border-radius: 12px;
}

.page_statistics .leaflet-popup-content {
  margin: 13px 24px 13px 20px;
  line-height: 1.3;
  min-height: 1px;
  width: auto;
}

.page_statistics .leaflet-popup-tip-container {
  width: 40px;
  height: 20px;
  margin-top: -1px;
  margin-left: -20px;
  overflow: hidden;
}

.page_statistics .leaflet-popup-tip {
  width: 17px;
  height: 17px;
  padding: 1px;
  margin: -10px auto 0;
  transform: rotate(45deg);
}

.page_statistics .leaflet-popup table,
.page_statistics .leaflet-popup a {
  width: auto;
}
.page_statistics .ps-map-tooltip {
  text-align: center;
  min-width: 120px;
}

.page_statistics .ps-map-tooltip-title {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 14px;
}

.page_statistics .ps-map-tooltip-value {
  font-size: 16px;
  font-weight: bold;
  color: var(--ps-primary);
}

.page_statistics .ps-map-tooltip-label {
  font-size: 12px;
  color: #666;
}

.page_statistics .ps-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #666;
}

.page_statistics .ps-empty-state-icon {
  margin-bottom: 20px;
  opacity: 0.3;
}

.page_statistics .ps-empty-state-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 10px 0;
}

.page_statistics .ps-empty-state-desc {
  font-size: 14px;
  margin: 0;
  opacity: 0.7;
}

#citingJournalsTable {
  table-layout: fixed;
  width: 100%;
}

.page_statistics .journal-row {
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.page_statistics .journal-row:hover {
  background-color: #f5f5f5;
}
.page_statistics .journal-row td {
  vertical-align: middle;
}

.page_statistics .expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #666;
  transition: transform 0.2s;
}

.page_statistics .expand-icon i {
  font-size: 12px;
}

.page_statistics .journal-articles-row td {
  padding: 0 !important;
  border-top: none;
}

.page_statistics .journal-articles-row table th,
.page_statistics .journal-articles-row table td {
  text-transform: none !important;
  letter-spacing: normal !important;
}

.page_statistics .ps-articles-detail {
  padding: 20px 25px;
  background: linear-gradient(to bottom, #f8f9fa, #f1f3f4);
  border-bottom: 2px solid #dee2e6;
}

.page_statistics .ps-articles-detail-title {
  color: #495057;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 12px;
}

.page_statistics .ps-articles-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  font-size: 0.9em;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.page_statistics .ps-articles-table thead tr {
  background-color: #495057 !important;
  color: white !important;
}

.page_statistics .ps-articles-table th {
  padding: 12px 10px !important;
  text-align: left !important;
  font-weight: 500 !important;
  font-size: 0.85em !important;
  border: none !important;
  color: white !important;
  background: transparent !important;
}

.page_statistics .ps-articles-table th.ps-col-center {
  text-align: center !important;
}

.page_statistics .ps-articles-table td {
  padding: 10px !important;
  border: none !important;
  border-bottom: 1px solid #eee !important;
  color: #333 !important;
  background: transparent !important;
}

.page_statistics .ps-articles-table tr:nth-child(even) td {
  background-color: #f8f9fa !important;
}
.page_statistics .ps-articles-table tr:nth-child(odd) td {
  background-color: #ffffff !important;
}

.page_statistics .ps-articles-table .ps-cell-num {
  text-align: center;
  color: #999;
  font-size: 0.9em;
  padding-left: 15px;
}

.page_statistics .ps-articles-table .ps-cell-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.page_statistics .ps-articles-table .ps-cell-authors {
  color: #666;
  font-size: 0.9em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page_statistics .ps-articles-table .ps-cell-year {
  text-align: center;
  color: #666;
}

.page_statistics .ps-articles-table .ps-cell-cited {
  text-align: center !important;
  font-weight: 600;
  color: var(--ps-primary);
  font-size: 1.05em;
}

.page_statistics .ps-article-link {
  color: var(--ps-primary) !important;
  text-decoration: none !important;
}

.page_statistics .ps-article-link:hover {
  text-decoration: underline !important;
  color: var(--ps-primary-dark) !important;
}

.page_statistics .ps-col-num {
  width: 45px;
}
/* .ps-col-title is intentionally fluid, no fixed width */
.page_statistics .ps-col-authors {
  width: 180px;
}
.page_statistics .ps-col-year {
  width: 65px;
}
.page_statistics .ps-col-cited {
  width: 85px;
}
.page_statistics .ps-col-expand {
  width: 40px;
  text-align: center;
}
.page_statistics .ps-col-index {
  width: 50px;
}
.page_statistics .ps-col-color {
  width: 40px;
}
.page_statistics .ps-col-issn {
  width: 120px;
}
.page_statistics .ps-col-citations {
  width: 80px;
}

.page_statistics .ps-author-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

@container publicstats (max-width: 992px) {
  .page_statistics .container {
    flex-direction: column;
  }

  .page_statistics .sidebar {
    width: 100%;
    margin-top: 0;
    margin-bottom: 20px;
  }

  .page_statistics .sidebar-header {
    padding: 15px;
  }
  .page_statistics .sidebar-header h1 {
    font-size: 16px;
  }

  .page_statistics .sidebar-section {
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
  }

  .page_statistics .sidebar-section:last-child {
    border-bottom: none;
  }

  .page_statistics .section-header {
    padding: 12px 15px;
    margin-bottom: 0;
  }

  .page_statistics .section-title {
    font-size: 13px;
  }
  .page_statistics .section-content {
    background: #f8f9fa;
  }

  .page_statistics .sidebar-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 15px;
  }

  .page_statistics .menu-item {
    flex: 0 0 auto;
  }

  .page_statistics .menu-link {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
    background: white;
    font-size: 13px;
    white-space: nowrap;
  }

  .page_statistics .menu-link.active {
    background-color: var(--ps-primary);
    color: white;
    border-color: var(--ps-primary);
  }

  .page_statistics .main-content {
    padding: 15px;
    margin: 0;
  }
  .page_statistics .content-title {
    font-size: 20px;
  }
  .page_statistics .content-subtitle {
    font-size: 13px;
  }
  .page_statistics .year-selector-container {
    padding: 12px;
  }
  .page_statistics .filter-group {
    flex-direction: column;
    gap: 15px;
  }
  .page_statistics .stats-table {
    font-size: 13px;
  }

  .page_statistics .stats-table th,
  .page_statistics .stats-table td {
    padding: 8px;
  }

  .page_statistics .chart-container {
    height: 250px;
  }
  .page_statistics .card-title {
    font-size: 14px;
  }
  .page_statistics .card-body {
    padding: 15px;
  }
  .page_statistics .loading-spinner {
    width: 50px;
    height: 50px;
  }
  .page_statistics .loading-indicator p {
    font-size: 14px;
  }

  .page_statistics .export-csv-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .page_statistics .global-export-container {
    padding: 10px 15px;
    justify-content: center;
  }

  .page_statistics .export-menu {
    position: static;
    width: 100%;
  }

  .page_statistics .export-menu-toggle {
    width: auto;
    justify-content: center;
    padding: 2px 12px;
    font-size: 0.85rem;
  }

  .page_statistics .export-menu-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    min-width: unset;
    max-width: unset;
    margin-top: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .page_statistics .export-menu-dropdown button {
    padding: 14px 20px;
    font-size: 1rem;
    text-align: center;
  }

  .page_statistics .export-menu-dropdown button:hover {
    padding-left: 20px;
  }

  .page_statistics .ps-articles-table .ps-col-authors,
  .page_statistics .ps-articles-table .ps-cell-authors,
  .page_statistics .ps-articles-table th.ps-col-authors,
  .page_statistics .ps-articles-table .ps-col-year,
  .page_statistics .ps-articles-table .ps-cell-year,
  .page_statistics .ps-articles-table th.ps-col-year {
    display: none;
  }
}

@container publicstats (max-width: 480px) {
  .page_statistics .sidebar-header h1 {
    font-size: 14px;
  }
  .page_statistics .section-title {
    font-size: 12px;
  }
  .page_statistics .menu-link {
    padding: 6px 12px;
    font-size: 12px;
  }
  .page_statistics .content-title {
    font-size: 18px;
  }
  .page_statistics .stats-table {
    font-size: 12px;
  }

  .page_statistics .stats-table th,
  .page_statistics .stats-table td {
    padding: 6px;
  }

  .page_statistics .map-legend {
    font-size: 10px;
    gap: 8px;
  }
  .page_statistics .legend-color {
    width: 10px;
    height: 10px;
  }
  .page_statistics .export-menu-dropdown button {
    padding: 16px 20px;
  }

  #languageTrendsSummary,
  #editorialSummary,
  #editorialAnnualSummary,
  #rejectionRateSummary {
    grid-template-columns: 1fr !important;
  }
}

@supports not (container-type: inline-size) {
  @media (max-width: 992px) {
  .page_statistics .container {
    flex-direction: column;
  }

  .page_statistics .sidebar {
    width: 100%;
    margin-top: 0;
    margin-bottom: 20px;
  }

  .page_statistics .sidebar-header {
    padding: 15px;
  }
  .page_statistics .sidebar-header h1 {
    font-size: 16px;
  }

  .page_statistics .sidebar-section {
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
  }

  .page_statistics .sidebar-section:last-child {
    border-bottom: none;
  }

  .page_statistics .section-header {
    padding: 12px 15px;
    margin-bottom: 0;
  }

  .page_statistics .section-title {
    font-size: 13px;
  }
  .page_statistics .section-content {
    background: #f8f9fa;
  }

  .page_statistics .sidebar-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 15px;
  }

  .page_statistics .menu-item {
    flex: 0 0 auto;
  }

  .page_statistics .menu-link {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
    background: white;
    font-size: 13px;
    white-space: nowrap;
  }

  .page_statistics .menu-link.active {
    background-color: var(--ps-primary);
    color: white;
    border-color: var(--ps-primary);
  }

  .page_statistics .main-content {
    padding: 15px;
    margin: 0;
  }
  .page_statistics .content-title {
    font-size: 20px;
  }
  .page_statistics .content-subtitle {
    font-size: 13px;
  }
  .page_statistics .year-selector-container {
    padding: 12px;
  }
  .page_statistics .filter-group {
    flex-direction: column;
    gap: 15px;
  }
  .page_statistics .stats-table {
    font-size: 13px;
  }

  .page_statistics .stats-table th,
  .page_statistics .stats-table td {
    padding: 8px;
  }

  .page_statistics .chart-container {
    height: 250px;
  }
  .page_statistics .card-title {
    font-size: 14px;
  }
  .page_statistics .card-body {
    padding: 15px;
  }
  .page_statistics .loading-spinner {
    width: 50px;
    height: 50px;
  }
  .page_statistics .loading-indicator p {
    font-size: 14px;
  }

  .page_statistics .export-csv-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .page_statistics .global-export-container {
    padding: 10px 15px;
    justify-content: center;
  }

  .page_statistics .export-menu {
    position: static;
    width: 100%;
  }

  .page_statistics .export-menu-toggle {
    width: auto;
    justify-content: center;
    padding: 2px 12px;
    font-size: 0.85rem;
  }

  .page_statistics .export-menu-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    min-width: unset;
    max-width: unset;
    margin-top: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .page_statistics .export-menu-dropdown button {
    padding: 14px 20px;
    font-size: 1rem;
    text-align: center;
  }

  .page_statistics .export-menu-dropdown button:hover {
    padding-left: 20px;
  }

  .page_statistics .ps-articles-table .ps-col-authors,
  .page_statistics .ps-articles-table .ps-cell-authors,
  .page_statistics .ps-articles-table th.ps-col-authors,
  .page_statistics .ps-articles-table .ps-col-year,
  .page_statistics .ps-articles-table .ps-cell-year,
  .page_statistics .ps-articles-table th.ps-col-year {
    display: none;
  }
}

  @media (max-width: 480px) {
  .page_statistics .sidebar-header h1 {
    font-size: 14px;
  }
  .page_statistics .section-title {
    font-size: 12px;
  }
  .page_statistics .menu-link {
    padding: 6px 12px;
    font-size: 12px;
  }
  .page_statistics .content-title {
    font-size: 18px;
  }
  .page_statistics .stats-table {
    font-size: 12px;
  }

  .page_statistics .stats-table th,
  .page_statistics .stats-table td {
    padding: 6px;
  }

  .page_statistics .map-legend {
    font-size: 10px;
    gap: 8px;
  }
  .page_statistics .legend-color {
    width: 10px;
    height: 10px;
  }
  .page_statistics .export-menu-dropdown button {
    padding: 16px 20px;
  }

  #languageTrendsSummary,
  #editorialSummary,
  #editorialAnnualSummary,
  #rejectionRateSummary {
    grid-template-columns: 1fr !important;
  }
}
}

@media print {
  .page_statistics .export-csv-btn,
  .page_statistics .export-menu,
  .page_statistics .global-export-container {
    display: none !important;
  }
}
