/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-text {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 1px;
}

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

/* App Container */
#app-container {
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

#app-container.ready {
  opacity: 1;
}

/* Общие стили */
:root {
  --primary-color: #2a7de1;
  --primary-hover: #1c5eb6;
  --secondary-color: #4c4c4c;
  --accent-color: #f7a41d;
  --light-gray: #e6e6e6;
  --border-color: #ddd;
  --text-color: #333;
  --text-light: #777;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f8f9fa;
}

/* Основной контейнер */
#app-container {
  display: flex;
  flex-direction: column;
}

/* Верхний колонтитул */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.logo h1 {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-color);
}

.toolbar {
  display: flex;
  gap: 0.5rem;
}

.toolbar-btn {
  background: none;
  border: none;
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--secondary-color);
  transition: var(--transition);
}

.toolbar-btn:hover {
  background-color: var(--light-gray);
  color: var(--primary-color);
}

.auth-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  font-size: 0.9rem;
}

.auth-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.auth-button:hover {
  background-color: var(--primary-hover);
}

.logout-button {
  background-color: var(--secondary-color);
}

.logout-button:hover {
  background-color: #333;
}

/* Основное содержимое */
.main-content {
  display: flex;
  flex: 1;
}

/* Боковая панель */
.sidebar {
  width: 280px;
  background-color: white;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

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

.sidebar-section h3 {
  font-size: 1rem;
  color: var(--secondary-color);
}

.file-upload-group {
  margin-bottom: 0.75rem;
}

.upload-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--light-gray);
  color: var(--secondary-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.upload-btn:hover {
  background-color: var(--border-color);
}

.file-name {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-light);
  word-break: break-word;
}

.loading-indicator {
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 15px;
  color: #666;
}

.loading-indicator.active {
  display: flex !important;
}

.loading-indicator .spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ccc;
  border-top-color: #4285f4;
  animation: spin 1s linear infinite;
}

#annotations-loading {
  display: none;
  margin-top: 8px;
  margin-bottom: 8px;
  color: #4285f4;
}

#annotations-loading .spinner {
  border-color: #ccc;
  border-top-color: #4285f4;
}

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

.action-btn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background-color: var(--light-gray);
  color: var(--secondary-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.action-btn:hover {
  background-color: var(--border-color);
}

.action-btn.primary {
  background-color: var(--primary-color);
  color: white;
}

.action-btn.primary:hover {
  background-color: var(--primary-hover);
}

.action-btn[data-action="undo-last-action"] {
  background-color: #f0f2f5;
  color: #666;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

.action-btn[data-action="undo-last-action"]:hover:not(:disabled) {
  background-color: #e8e8e8;
  color: #333;
  border-color: #ccc;
}

.action-btn[data-action="undo-last-action"]:disabled {
  background-color: #f5f5f5;
  color: #aaa;
  border-color: #e0e0e0;
  cursor: not-allowed;
}

.action-btn[data-action="undo-last-action"] i {
  margin-right: 8px;
}

.button-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0.3rem 0;
  background-color: #f5f7fa;
  border-radius: 6px;
  padding: 0.5rem;
  transition: all 0.2s ease;
  border: 1px solid #e0e4e8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.button-container.used {
  background-color: rgba(66, 133, 244, 0.08);
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 0 0 1px rgba(66, 133, 244, 0.2);
}

.button-container button.button-30 {
  flex: 1;
  text-align: left;
  background: none;
  border: none;
  padding: 0.4rem 0.6rem;
  margin: 0;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.button-container button.button-30:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.button-container button.button-30 i {
  margin-right: 0.5rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

.button-controls {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.6rem;
}

.button-controls button {
  background-color: #f0f2f5;
  border: 1px solid #e0e4e8;
  color: var(--secondary-color);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.button-controls .edit-button:hover {
  background-color: #edf5ff;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.button-controls .delete-button:hover {
  background-color: #ffefef;
  color: var(--danger);
  border-color: var(--danger);
}

/* Новый стиль для кнопок без контейнера */
.horizontal-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 230px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.horizontal-buttons button.button-30 {
  display: flex;
  align-items: center;
  background-color: #f5f7fa;
  border: 1px solid #e0e4e8;
  border-radius: 6px;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.horizontal-buttons button.button-30:hover {
  background-color: rgba(66, 133, 244, 0.08);
  border-color: rgba(66, 133, 244, 0.4);
}

.horizontal-buttons button.button-30.used {
  background-color: rgba(66, 133, 244, 0.08);
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 0 0 1px var(--success);
}

.horizontal-buttons button.button-30 i {
  margin-right: 0.5rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

.segments-controls .horizontal-buttons button.button-30 {
  border-left: 4px solid var(--primary-color);
}

.segments-controls .horizontal-buttons button.button-30.used {
  border-left: 4px solid var(--success);
}

.segments-controls .horizontal-buttons button.button-30 i {
  color: var(--primary-color);
}

.points-controls .horizontal-buttons button.button-30 {
  border-left: 4px solid var(--accent-color);
}

.points-controls .horizontal-buttons button.button-30.used {
  border-left: 4px solid var(--success);
}

.points-controls .horizontal-buttons button.button-30 i {
  color: var(--accent-color);
}

/* Стили для скроллбара */
.horizontal-buttons::-webkit-scrollbar {
  width: 6px;
}

.horizontal-buttons::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.horizontal-buttons::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.horizontal-buttons::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.control-btn {
  padding: 0.4rem;
  background-color: var(--light-gray);
  color: var(--secondary-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.control-btn:hover {
  background-color: var(--border-color);
}

.zoom-indicator {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary-color);
  text-align: center;
  background-color: #eef4ff;
  border-radius: 4px;
  border: 1px solid #d1e1ff;
  font-weight: 500;
}

.control-group {
  margin-top: 0.75rem;
}

.control-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.input-with-btn {
  display: flex;
  gap: 0.25rem;
}

input[type="number"], input[type="text"] {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
}

.slider {
  width: 100%;
  margin-top: 0.25rem;
}

.autosave-container {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 0.5rem;
}

.autosave-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.toggle-btn {
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}

.toggle-btn[data-state="on"] {
  background-color: var(--success);
  color: white;
}

.toggle-btn[data-state="off"] {
  background-color: var(--danger);
  color: white;
}

.autosave-info {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Рабочая область */
.workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-x: hidden;
  background-color: #f8f9fa;
}

.video-wrapper {
  position: relative;
  width: 100%;
  min-height: fit-content;
  background-color: #000;
  border-radius: 4px;
  overflow: hidden;
}

.video-player {
  width: 100%;
  height: auto;
  min-height: 400px;
  max-height: 400px;
  display: block;
}

.video-player::-webkit-media-controls-enclosure {
  display: none !important;
}

.video-player::-webkit-media-controls {
  display: none !important;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-wrapper:hover .video-controls {
  opacity: 1;
}

.video-controls button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-controls button:hover {
  opacity: 0.8;
}

.video-progress {
  flex-grow: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  position: relative;
}

.video-progress-filled {
  background: white;
  height: 100%;
  width: 0;
}

.video-time {
  color: white;
  font-size: 14px;
  min-width: 100px;
  text-align: center;
}

.waveform-wrapper {
  width: 100%;
  margin-top: 0.5rem;
}

.zoomview {
  height: 120px;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px 4px 0 0;
}

.overview {
  height: 60px;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 4px 4px;
}

/* Таблицы данных */
.data-tables {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.data-table {
  flex: 1;
  min-width: 300px;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.data-table h3 {
  padding: 0.75rem;
  background-color: var(--light-gray);
  font-size: 1rem;
  color: var(--secondary-color);
  border-bottom: 1px solid var(--border-color);
}

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

.data-table th, .data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.data-table th {
  background-color: #f8f9fa;
  font-weight: 500;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Модальные окна */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 6px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--primary-color);
  color: white;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 500;
}

.close {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.modal-body {
  padding: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Google Drive Panel */
.drive-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background-color: white;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 900;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.drive-panel.active {
  right: 0;
}

.drive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--primary-color);
  color: white;
}

.drive-header h2 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.drive-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.drive-navigation {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 2rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
}

.search-box i {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.drive-files-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.folders-list {
  width: 30%;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 0.5rem;
}

.files-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.folder-item, .file-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.folder-item:hover, .file-item:hover {
  background-color: #f0f5ff;
}

.folder-icon, .file-icon {
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 0.5rem;
}

.folder-icon {
  color: #f8d775;
}

.video-icon {
  color: #ff7b72;
}

.document-icon {
  color: #79c0ff;
}

.file-info {
  flex: 1;
  overflow: hidden;
}

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

.file-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: var(--transition);
}

.file-item:hover .file-actions {
  opacity: 1;
}

.file-action {
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--secondary-color);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.file-action:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.download-btn:hover {
  color: var(--success);
}

/* Состояние для недоступности API */
.api-unavailable {
  position: relative;
  background-color: #f8d7da !important;
  color: #721c24 !important;
  border: 1px solid #f5c6cb !important;
}

.api-unavailable:hover {
  background-color: #f1bbc1 !important;
}

.error-indicator {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Сообщение об ошибке */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
  margin-top: 10px;
}

.error-message i {
  margin-right: 5px;
}

/* Google Drive Integration Styles */
.google-drive-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow-y: auto;
  transition: right 0.3s ease;
}

.google-drive-sidebar.open {
  right: 0;
}

.gdrive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f8f9fa;
}

.gdrive-header h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
}

.gdrive-header h3 i {
  margin-right: 10px;
  color: #4285f4;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #555;
  cursor: pointer;
}

.close-btn:hover {
  color: #d32f2f;
}

.gdrive-content {
  padding: 0 10px;
}

.gdrive-section {
  margin: 15px 0;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.gdrive-section h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #333;
}

.google-drive-files {
  max-height: 700px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 5px;
  background-color: #f8f9fa;
}

.drive-file-item {
  display: flex;
  align-items: center;
  padding: 8px;
  margin-bottom: 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  background-color: #fff;
  border: 1px solid transparent;
}

.drive-file-item:hover {
  background-color: #f0f0f0;
  border-color: #ddd;
}

.drive-file-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  margin-right: 10px;
  border-radius: 4px;
  color: #555;
}

.drive-file-info {
  flex: 1;
  overflow: hidden;
}

.drive-file-name {
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drive-file-size {
  font-size: 12px;
  color: #777;
}

.folder-icon {
  color: #f8d775;
}

.video-icon {
  color: #ff7b72;
}

.image-icon {
  color: #79c0ff;
}

.document-icon {
  color: #4285f4;
}

.drive-folder-navigation {
  margin-bottom: 10px;
}

.drive-back-link {
  display: inline-block;
  color: #333;
  text-decoration: none;
  padding: 5px 10px;
  background-color: #f0f0f0;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: 14px;
}

.drive-back-link:hover {
  background-color: #e0e0e0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  margin-bottom: 10px;
  background-color: #f8f9fa;
  padding: 5px;
  border-radius: 4px;
  max-width: 100%;
  overflow-x: auto;
}

.breadcrumb a {
  color: #1a73e8;
  text-decoration: none;
  white-space: nowrap;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 15px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.loading-indicator {
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 15px;
  color: #666;
}

.loading-indicator.active {
  display: flex !important;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

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

/* Стили для кнопки Google Drive в тулбаре */
#drive-button {
  position: relative;
}

#drive-button i {
  color: #4285f4;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
  .google-drive-sidebar {
    width: 300px;
    right: -300px;
  }
}

@media (max-width: 480px) {
  .google-drive-sidebar {
    width: 100%;
    right: -100%;
  }
}

/* Стили для сообщений об ошибках авторизации Google Drive */
.drive-auth-error {
    padding: 15px;
    border: 1px solid #f5c6cb;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

.drive-auth-error p {
    margin-bottom: 10px;
}

.drive-auth-error .action-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.drive-auth-error .action-btn:hover {
    background-color: #c82333;
}

.auth-error {
    padding: 15px;
    border: 1px solid #f5c6cb;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

/* Новые стили для панели управления между видео и аудио */
.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background-color: white;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset;
}

.controls-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 2px solid #4285f4;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-header h3 {
  font-size: 1rem;
  color: #4285f4;
  margin: 0;
  font-weight: 600;
  text-shadow: none;
}

.control-action-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.8rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.control-action-btn:hover {
  background-color: var(--primary-hover);
}

.horizontal-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 80px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.horizontal-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-gray);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 80px;
}

.horizontal-buttons button:hover {
  background-color: var(--primary-color);
  color: var(--primary-hover);
  border-color: var(--primary-color);
}

.horizontal-buttons button.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.segments-controls .horizontal-buttons button {
  border-left: 4px solid var(--primary-color);
}

.points-controls .horizontal-buttons button {
  border-left: 4px solid var(--accent-color);
}

/* Файловые статусы */
.file-status-container {
  margin: 8px 0;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.file-name {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin: 5px 0;
  word-break: break-all;
  font-weight: 500;
}

.loading-indicator {
  display: none !important;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--primary-color);
  margin: 5px 0;
}

.loading-indicator.active {
  display: flex !important;
}

/* Стили для полей ввода времени сегментов и точек */
.segment-time-input, .point-time-input {
  width: 90px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  text-align: center;
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.segment-time-input:focus, .point-time-input:focus {
  border-color: #4285f4;
  outline: none;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
}

.segment-time-input:hover, .point-time-input:hover {
  border-color: #999;
}

/* Стили для выпадающих списков меток */
.segment-label-select, .point-label-select {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.segment-label-select:focus, .point-label-select:focus {
  border-color: #4285f4;
  outline: none;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
}

.segment-label-select:hover, .point-label-select:hover {
  border-color: #999;
}

/* Стили для подсказки по редактированию времени */
.time-edit-help {
  margin-bottom: 10px;
  padding: 6px 10px;
  background-color: #f0f7ff;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #4c4c4c;
  border-left: 3px solid #4285f4;
}

.time-edit-help i {
  margin-right: 5px;
  color: #4285f4;
}

/* Стили для кнопок действий в таблице */
.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 4px;
  padding: 0;
  background-color: #f0f2f5;
  color: #555;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-action-btn:hover {
  background-color: #4285f4;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.table-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.table-action-btn[data-action="play-segment"],
.table-action-btn[data-action="play-point"] {
  background-color: #e8f0fe;
  color: #4285f4;
}

.table-action-btn[data-action="play-segment"]:hover,
.table-action-btn[data-action="play-point"]:hover {
  background-color: #4285f4;
  color: white;
}

.table-action-btn[data-action="delete-segment"],
.table-action-btn[data-action="delete-point"] {
  background-color: #fee8e8;
  color: #f44336;
}

.table-action-btn[data-action="delete-segment"]:hover,
.table-action-btn[data-action="delete-point"]:hover {
  background-color: #f44336;
  color: white;
}

.table-action-btn i {
  font-size: 14px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .table-action-btn {
    width: 36px;
    height: 36px;
  }
  
  .table-action-btn i {
    font-size: 16px;
  }
}

/* Стили для улучшенной кнопки Google Drive */
.drive-button-enhanced {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.drive-button-enhanced:hover {
  background-color: #1a73e8;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.drive-button-enhanced:active {
  background-color: #1967d2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: translateY(1px);
}

.drive-button-enhanced i {
  font-size: 1.1rem;
}

/* Стили для универсальной кнопки выбора файлов из облачного хранилища */
.storage-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.storage-button:hover {
  background-color: #2980b9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.storage-button:active {
  background-color: #2471a3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: translateY(1px);
}

.storage-button i {
  font-size: 1.1rem;
} 

.overlapping-segment {
  background-color: rgba(255, 0, 0, 0.1) !important;
  border-left: 3px solid red !important;
}

.overlapping-segment input {
  border-color: #ff6b6b !important;
}

.overlapping-segment select {
  border-color: #ff6b6b !important;
} 

.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 24px;
  background-color: #4CAF50;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  min-width: 300px;
  max-width: 90%;
  animation: slideInDown 0.5s ease-out, pulse 2s infinite;
}

.notification i {
  font-size: 1.4em;
  color: #fff;
  margin-top: 3px;
}

.notification-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #fff;
}

.notification-message {
  font-size: 0.95em;
  opacity: 0.9;
  line-height: 1.4;
}

.notification .close-notification {
  position: relative;
  right: -8px;
  top: -8px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.2s ease;
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

.notification .close-notification:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.notification .close-notification i {
  font-size: 1em;
  margin: 0;
}

@keyframes slideInDown {
  from {
    transform: translate(-50%, -100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
  }
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}

/* Добавляем медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
  .notification {
    width: 90%;
    min-width: auto;
    padding: 12px 16px;
    top: 10px;
  }
  
  .notification-title {
    font-size: 1em;
  }
  
  .notification-message {
    font-size: 0.9em;
  }
  
  .notification .close-notification {
    right: -4px;
    top: -4px;
    padding: 6px;
    width: 24px;
    height: 24px;
  }
}

.modal-overlay {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 100000;
  pointer-events: none;
}

.modal-content {
  background-color: #fff;
  border-radius: 8px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: slideInRight 0.3s ease-out;
  pointer-events: auto;
}

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

.modal-header {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #eee;
  gap: 12px;
}

.modal-header i {
  font-size: 20px;
  color: #4CAF50;
}

.modal-header h3 {
  flex-grow: 1;
  margin: 0;
  font-size: 1.1em;
  color: #333;
}

.modal-body {
  padding: 15px;
  color: #555;
}

.modal-body p {
  margin: 0 0 8px;
  line-height: 1.4;
  font-size: 0.95em;
}

.modal-hint {
  font-size: 0.9em;
  color: #666;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #4CAF50;
  margin-top: 8px;
}

.modal-footer {
  padding: 12px 15px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

.modal-countdown {
  color: #666;
  font-size: 0.85em;
  margin-right: auto;
}

.modal-btn {
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.modal-btn.primary {
  background-color: #4CAF50;
  color: white;
}

.modal-btn.primary:hover {
  background-color: #45a049;
}

.close-notification {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.close-notification:hover {
  color: #333;
}

@media (max-width: 768px) {
  .modal-overlay {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .modal-content {
    width: 100%;
  }
}

/* File assignment styles */
.assignment-info {
    margin-top: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    border-left: 3px solid #007bff;
}

.assigned-to {
    margin-bottom: 4px;
    color: #495057;
}

.assigned-to i {
    margin-right: 4px;
    color: #007bff;
}

.assigned-to strong {
    color: #007bff;
}

.assigned-to small {
    color: #6c757d;
    margin-left: 4px;
}

.assignment-date {
    font-size: 11px;
    color: #6c757d;
}

.assignment-controls {
    margin-top: 8px;
}

.select-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.user-select {
    flex: 1;
    min-width: 150px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.btn {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-assign {
    background-color: #28a745;
    color: white;
}

.btn-assign:hover:not(:disabled) {
    background-color: #218838;
}

.btn-assign:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-remove {
    background-color: #dc3545;
    color: white;
    font-size: 11px;
}

.btn-remove:hover {
    background-color: #c82333;
}

.btn-remove i {
    margin-right: 4px;
}

/* Стили для пользовательской информации в навбаре */
.main-header .user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 14px;
}

.main-header .user-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.main-header .user-role {
    font-size: 12px;
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Google Drive файлы и папки */
.drive-folders-section,
.drive-files-section {
  margin-bottom: 20px;
}

.drive-folders-section h4,
.drive-files-section h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a73e8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drive-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.drive-item:hover {
  background: #f8f9fa;
  border-color: #1a73e8;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
}

.drive-folder {
  border-left: 4px solid #ffa726;
}

.drive-file {
  border-left: 4px solid #42a5f5;
}

.file-icon {
  font-size: 24px;
  margin-right: 12px;
  min-width: 32px;
  text-align: center;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  color: #202124;
  margin-bottom: 4px;
  word-break: break-word;
}

.file-meta {
  font-size: 12px;
  color: #5f6368;
}

.assignment-info {
  font-size: 11px;
  color: #1a73e8;
  margin-top: 4px;
  padding: 2px 6px;
  background: #e8f0fe;
  border-radius: 4px;
  display: inline-block;
}

/* Comment indicator in file-info */
.comment-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 8px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: help;
  white-space: nowrap;
  transition: background 0.2s ease;
  width: fit-content;
}

.comment-indicator:hover {
  background: #bbdefb;
}

.comment-icon {
  font-size: 14px;
  line-height: 1;
}

.comment-count {
  font-size: 12px;
  font-weight: 600;
}

.file-actions {
  display: flex;
  gap: 6px;
  margin-left: 12px;
}

.file-actions .action-btn {
  padding: 6px 8px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  background: #f1f3f4;
  cursor: pointer;
  transition: background 0.2s ease;
  min-width: unset;
}

.file-actions .action-btn:hover {
  background: #e8eaed;
}

.no-files-message,
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #5f6368;
}

.error-message {
  color: #d93025;
}

.error-message .action-btn {
  margin-top: 12px;
  padding: 8px 16px;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.error-message .action-btn:hover {
  background: #1557b0;
}

/* Загрузочный индикатор */
.loading-indicator {
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #5f6368;
}

.loading-indicator.active {
  display: flex !important;
}

.loading-indicator .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e8eaed;
  border-top: 2px solid #1a73e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 12px;
}

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

/* Comment Modal Styles */
#comment-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}

#comment-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

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

#comment-modal .modal-content {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#comment-modal .modal-content {
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
}

#comment-modal .modal-header {
  padding: 20px 20px 0 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

#comment-modal .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

#comment-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

#comment-modal .modal-close:hover {
  background: #f8f9fa;
  color: #333;
}

#comment-modal .modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

#comment-modal .modal-footer {
  padding: 0 20px 20px 20px;
  border-top: 1px solid #e9ecef;
  flex-shrink: 0;
}

.comment-readonly {
  padding: 20px 0;
}

.comment-content {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.comment-content p {
  margin: 0;
  line-height: 1.5;
  color: #333;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: #666;
}

.comment-editable {
  padding: 20px 0;
}

.comment-editable .form-group {
  margin-bottom: 0;
}

.comment-editable label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.comment-editable textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  min-height: 100px;
}

.comment-editable textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.comment-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.comment-actions .btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.comment-actions .btn-secondary {
  background: #6c757d;
  color: white;
}

.comment-actions .btn-secondary:hover {
  background: #5a6268;
}

.comment-actions .btn-primary {
  background: #007bff;
  color: white;
}

.comment-actions .btn-primary:hover {
  background: #0056b3;
}

/* Error highlighting for table rows */
.table-row-error {
  background-color: #ffe6e6 !important;
  border-left: 4px solid #dc3545 !important;
}

.table-row-error:hover {
  background-color: #ffcccc !important;
}

/* Comment icon in table header */
.comment-icon {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: #007bff;
  font-weight: 500;
  cursor: help;
  transition: color 0.2s ease;
}

.comment-icon:hover {
  color: #0056b3;
}

/* Comment button styles */
.comment-btn {
  background: #ffc107;
  color: #212529;
  border: none;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 2px;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comment-btn:hover {
  background: #e0a800;
  transform: translateY(-1px);
}

.comment-btn.has-comment {
  background: #dc3545;
  color: white;
}

.comment-btn.has-comment:hover {
  background: #c82333;
}

/* Comment status badge styles */
.comment-status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background-color: #ffc107;
  color: #212529;
}

.status-fixed {
  background-color: #17a2b8;
  color: white;
}

.status-validated {
  background-color: #28a745;
  color: white;
}

.status-rejected {
  background-color: #dc3545;
  color: white;
}

/* Comment fix and resolve info styles */
.comment-fix-info,
.comment-resolve-info {
  margin-top: 12px;
  padding: 10px;
  background-color: #f8f9fa;
  border-left: 3px solid #17a2b8;
  border-radius: 4px;
}

.comment-resolve-info {
  border-left-color: #28a745;
}

.fix-meta,
.resolve-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.875rem;
  color: #6c757d;
}

/* Action button styles */
.action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-btn.primary {
  background-color: #007bff;
  color: white;
}

.action-btn.primary:hover {
  background-color: #0056b3;
}

.action-btn.success {
  background-color: #28a745;
  color: white;
}

.action-btn.success:hover {
  background-color: #218838;
}

.action-btn.danger {
  background-color: #dc3545;
  color: white;
}

.action-btn.danger:hover {
  background-color: #c82333;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* General comment item styles */
.general-comment-item {
  padding: 16px;
  background-color: #ffffff;
  border-radius: 8px;
  margin-bottom: 12px;
}

.general-comment-item .comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

.general-comment-item .comment-author {
  font-weight: 600;
  color: #495057;
}

.general-comment-item .comment-date {
  font-size: 0.875rem;
  color: #6c757d;
}

.general-comment-item .comment-content {
  color: #212529;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* General comments section styles */
.general-comments-section {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
}

.general-comments-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.general-comments-btn:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.general-comments-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.general-comments-btn i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.general-comments-btn.has-comments {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.general-comments-btn.has-comments:hover {
  background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
}

/* General comments modal styles */
.general-comment-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #f9f9f9;
}

.general-comment-item:last-child {
  margin-bottom: 0;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.comment-author {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.comment-date {
  color: #666;
  font-size: 0.8rem;
}

.comment-content {
  color: #555;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

#general-comments-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}

#general-comments-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

#general-comments-modal .modal-content {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease-out;
}

#general-comments-modal .modal-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 1rem;
}

#general-comments-modal .modal-footer {
  padding: 1rem;
  border-top: 1px solid #e0e0e0;
  text-align: right;
}

/* General comments edit modal styles */
#general-comments-edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}

#general-comments-edit-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

#general-comments-edit-modal .modal-content {
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease-out;
}

#general-comments-edit-modal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
}

.comment-form {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f9f9f9;
}

.comment-form h4 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1rem;
}

.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.comment-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.comment-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.comment-actions .action-btn.primary {
  background: #667eea;
  color: white;
}

.comment-actions .action-btn.primary:hover {
  background: #5a6fd8;
}

.comment-actions .action-btn {
  background: #f0f0f0;
  color: #333;
}

.comment-actions .action-btn:hover {
  background: #e0e0e0;
}

/* Editable comment styles */
.general-comment-item.editable {
  border-left: 3px solid #667eea;
}

.general-comment-item .comment-header {
  position: relative;
}

.general-comment-item .comment-actions {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  gap: 0.25rem;
  margin: 0;
}

.edit-comment-btn,
.delete-comment-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.edit-comment-btn {
  background: #e3f2fd;
  color: #1976d2;
}

.edit-comment-btn:hover {
  background: #1976d2;
  color: white;
}

.delete-comment-btn {
  background: #ffebee;
  color: #d32f2f;
}

.delete-comment-btn:hover {
  background: #d32f2f;
  color: white;
}

/* Responsive modal styles */
@media screen and (max-width: 768px) {
  #comment-modal {
    padding: 10px;
  }
  
  #comment-modal .modal-content {
    width: 100%;
    max-width: 95%;
    max-height: 90vh;
    margin: 0;
  }

  #comment-modal .modal-header {
    padding: 15px 15px 0 15px;
  }

  #comment-modal .modal-header h3 {
    font-size: 16px;
  }

  #comment-modal .modal-body {
    padding: 15px;
  }

  #comment-modal .modal-footer {
    padding: 0 15px 15px 15px;
  }

  .comment-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  /* General comments modal responsive styles */
  #general-comments-modal {
    padding: 10px;
  }
  
  #general-comments-modal .modal-content {
    width: 100%;
    max-width: 95%;
    max-height: 90vh;
    margin: 0;
  }
  
  #general-comments-edit-modal {
    padding: 10px;
  }
  
  #general-comments-edit-modal .modal-content {
    width: 100%;
    max-width: 95%;
    max-height: 90vh;
    margin: 0;
  }
}

