/* Override `.vjs-menu li { text-transform: lowercase; }`, from video-js.css */
#peertube-plugin-chapters-menu li {
	text-transform: none;
}

#peertube-plugin-chapters-menu {
	width: max-content;
	max-width: 18em;
	max-height: 20em;
}

#peertube-plugin-chapters-menu li:not(:first-child) {
	padding-left: 1em;
	padding-right: 1em;
	text-align: left;
}
#json-categories-as-text {
  border: 1px solid #c6c6c6;
  color: var(--textareaForegroundColor);
  padding: 5px 15px;
  background-color: var(--markdownTextareaBackgroundColor);
  font-family: monospace;
  font-size: 13px;
  border-bottom: 0;
  border-radius: 3px 3px unset unset;
  width: 100%;
}

#json-categories-as-text.error {
  border-color: red;
  color: red;
  border-bottom: 1px solid;
}

#categories-table th {
  border-color: currentcolor;
  border-bottom: none;
  border: var(--submenuBackgroundColor);
  border-bottom: 1px solid var(--submenuBackgroundColor);
  padding: 5px;
  font-weight: 600;
  color: var(--mainForegroundColor);
}

#categories-table tr {
  outline: 0;
  background-color: var(--mainBackgroundColor);
}

#categories-table tbody tr:nth-child(odd) {
  background-color: var(--submenuBackgroundColor);
}

#categories-table td {
  padding: 5px;
}

#categories-table .category__deleted {
  text-decoration: line-through;
  color: red;
}

#categories-table .category__added {
  color: green;
}
.top-menu .panel-block .custom-link {
    display: flex;
    align-items: center;
    padding-left: 26px;
    color: var(--menuForegroundColor);
    cursor: pointer;
    min-height: 40px;
    font-size: 16px;
    transition: background-color .1s ease-in-out;
    white-space: normal;
    word-break: break-word;
    padding-right: 20px;
}
.root-header .publish-button {
  display: none;
}

.show-publish-button .root-header .publish-button {
  display: inline-block;
}
/* Static Files Plugin Styles - Scoped to Plugin Elements Only */

/* Ограничиваем стили только элементами плагина */
.static-files-container,
.static-files-footer-section,
.static-files-fixed-footer,
.static-files-menu-section {
  /* Наследуем цвета от темы PeerTube */
  color: inherit;
  background: inherit;
}

/* Upload Drop Zone - только для плагина */
.upload-drop-zone {
  border: 2px dashed #ddd;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-drop-zone:hover,
.upload-drop-zone.dragging {
  border-color: #007bff;
  background: rgba(0, 123, 255, 0.05);
  transform: scale(1.01);
}

/* File Items - только для плагина */
.file-item {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  color: inherit;
  transition: all 0.2s ease;
}

.file-item:hover {
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transform: translateY(-1px);
}

/* File Metadata Text */
.file-metadata {
  color: #6c757d;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.file-metadata div {
  margin-bottom: 0.25rem;
}

/* Status Badges */
.file-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

.status-with-metadata {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-without-metadata {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* Buttons - только outline стили для совместимости */
.file-actions .btn {
  transition: all 0.2s ease;
}

.btn-outline-primary:hover {
  transform: translateY(-1px);
}

.btn-outline-secondary:hover {
  transform: translateY(-1px);
}

.btn-outline-danger:hover {
  transform: translateY(-1px);
}

.btn-outline-info:hover {
  transform: translateY(-1px);
}

/* Progress Bar */
.progress-container {
  background: #e9ecef;
  border: 1px solid #dee2e6;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar {
  background: #007bff;
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 3px;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 6px;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
  border: 1px solid transparent;
}

.toast-notification.success {
  background: #28a745;
  color: white;
  border-color: #1e7e34;
}

.toast-notification.error {
  background: #dc3545;
  color: white;
  border-color: #bd2130;
}

/* File Icons */
.file-icon {
  font-size: 1.2rem;
  margin-right: 8px;
  color: #6c757d;
}

/* Loading Spinner */
.loading-spinner, .spinner-border {
  color: #007bff;
}

/* Stats Numbers */
.stats-number {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
  color: inherit;
}

/* Footer Section - ограниченные стили */
.static-files-footer-section {
  background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
  color: white;
  padding: 20px 0;
  text-align: center;
  margin: 40px 0 20px 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  position: relative;
  z-index: 100;
}

.static-files-footer-section h4 {
  margin: 0;
  color: white !important;
  font-weight: 600;
  font-size: 1.1rem;
}

.static-files-footer-section p {
  margin: 5px 0 0 0;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
}

.static-files-footer-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255,255,255,0.15);
  color: white !important;
  text-decoration: none;
  border-radius: 25px;
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.static-files-footer-link:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  color: white !important;
  text-decoration: none;
}

/* Fixed Footer */
.static-files-fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
  color: white;
  padding: 15px 20px;
  text-align: center;
  box-shadow: 0 -2px 15px rgba(0,0,0,0.2);
  z-index: 10000;
  backdrop-filter: blur(10px);
}

.static-files-fixed-footer a {
  color: white !important;
  text-decoration: none;
  font-weight: 500;
  margin: 0 15px;
}

.static-files-fixed-footer a:hover {
  color: rgba(255,255,255,0.8) !important;
  text-decoration: underline;
}

/* Menu Section */
.static-files-menu-section {
  margin: 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  padding-top: 1rem;
}

.static-files-menu-section .menu-block-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding: 0 1rem;
  letter-spacing: 0.05em;
}

.static-files-menu-section .menu-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
  margin: 0.25rem 0.5rem;
}

.static-files-menu-section .menu-link:hover {
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
  text-decoration: none;
  transform: translateX(4px);
}

.static-files-menu-section .menu-icon {
  margin-right: 0.75rem;
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

.static-files-menu-section .menu-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .file-actions {
    margin-top: 10px;
    width: 100%;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .upload-drop-zone {
    padding: 1.5rem !important;
  }
  
  .stats-number {
    font-size: 1.5rem;
  }
  
  .static-files-footer-section {
    padding: 15px 0 !important;
  }
  
  .static-files-footer-section h4 {
    font-size: 1rem !important;
  }
  
  .static-files-footer-link {
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    margin: 5px !important;
  }
  
  .static-files-fixed-footer {
    padding: 10px 15px !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .static-files-footer-section div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .static-files-footer-link {
    width: 100%;
    max-width: 280px;
    justify-content: center !important;
  }
  
  .static-files-menu-section .menu-link {
    padding: 1rem;
    margin: 0.25rem 0;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

.static-files-footer-section {
  animation: slideInUp 0.5s ease-out;
}

.static-files-fixed-footer {
  animation: slideInUp 0.3s ease-out;
}

/* Focus States for Accessibility */
.btn:focus,
.upload-drop-zone:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .file-item {
    border-width: 2px;
  }
  
  .status-with-metadata,
  .status-without-metadata {
    border-width: 2px;
    font-weight: bold;
  }
  
  .btn {
    border-width: 2px;
    font-weight: 600;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .file-item,
  .btn,
  .upload-drop-zone,
  .toast-notification,
  .static-files-footer-section,
  .static-files-fixed-footer {
    transition: none;
    animation: none;
  }
  
  .file-item:hover,
  .btn:hover,
  .static-files-footer-link:hover {
    transform: none;
  }
}

/* Темная тема - только для элементов плагина */
@media (prefers-color-scheme: dark) {
  .upload-drop-zone {
    border-color: #6c757d;
  }
  
  .upload-drop-zone:hover {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
  }
  
  .file-item {
    border-color: #495057;
  }
  
  .file-item:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  
  .file-metadata {
    color: #adb5bd;
  }
  
  .static-files-menu-section .menu-block-title {
    color: #adb5bd;
  }
  
  .static-files-menu-section .menu-link:hover {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
  }
}

.stats-card {
  transition: transform 0.2s;
}

.stats-card:hover {
  transform: translateY(-2px);
}

.stats-number {
  font-size: 2rem;
  font-weight: bold;
}

.chart-container {
  height: 300px;
  padding: 20px;
}

.metric-card {
  border-left: 4px solid #007bff;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.video-stats-table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}/* Modern Stats Dashboard Styles */

.stats-dashboard {
  background: #0f0f0f;
  min-height: 100vh;
  padding: 2rem 0;
  margin: 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.stats-dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header Section */
.stats-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-header h1 {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stats-header p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 0.95rem;
}

/* Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-color);
  opacity: 0;
  transition: opacity 0.3s;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.metric-card:hover::before {
  opacity: 1;
}

/* Accent Colors */
.metric-card.blue { --accent-color: #3b82f6; }
.metric-card.green { --accent-color: #10b981; }
.metric-card.cyan { --accent-color: #06b6d4; }
.metric-card.orange { --accent-color: #f59e0b; }
.metric-card.purple { --accent-color: #8b5cf6; }
.metric-card.pink { --accent-color: #ec4899; }



.metric-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.metric-value {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-unit {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.25rem;
  font-weight: 400;
  margin-left: 0.25rem;
}

.metric-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.stats-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-section-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Data Grid for smaller cards */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.data-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.data-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.data-card-header {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.data-card-content {
  color: #ffffff;
  font-size: 0.9rem;
}

/* Tables */
.stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.stats-table thead th {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-table tbody tr {
  transition: background 0.2s;
}

.stats-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.stats-table tbody td {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
}

.stats-table a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s;
}

.stats-table a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* Chart Container */
.chart-container {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 300px;
}

/* Controls */
.stats-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.control-group {
  flex: 1;
  min-width: 150px;
}

.control-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.control-input,
.control-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  color: #ffffff;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.control-input:hover,
.control-select:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.control-input:focus,
.control-select:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}

.control-button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 8px;
  padding: 0.625rem 1.5rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.control-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.control-button:active {
  transform: translateY(0);
}

/* Loading State */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: rgba(255, 255, 255, 0.6);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .stats-dashboard-container {
    padding: 0 1rem;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .metric-card {
    padding: 1.25rem;
  }
  
  .metric-value {
    font-size: 2rem;
  }
  
  .stats-section {
    padding: 1.25rem;
  }
  
  .stats-controls {
    flex-direction: column;
  }
  
  .control-group {
    width: 100%;
  }
  
  .data-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
