/* Telegram Channel Sources Styles */

/* Общие отступы для секций */
.container > .card,
.container > .sources-monitoring-status {
  margin-bottom: 32px;
}

/* Padding для карточек на странице источников */
.container > .card {
  padding: 24px;
}

/* Статус мониторинга */
.sources-monitoring-status {
  padding: 24px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sources-monitoring-status.sources-monitoring-enabled {
  border-left: 4px solid #28a745;
}

.sources-monitoring-status.sources-monitoring-disabled {
  border-left: 4px solid #dc3545;
}

.sources-monitoring-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Разделитель после заголовка только если есть информация */
.sources-monitoring-status.sources-monitoring-enabled .sources-monitoring-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e9ecef;
}

.sources-monitoring-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
}

.sources-status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sources-status-badge.sources-badge-success {
  background-color: #28a745;
  color: white;
}

.sources-status-badge.sources-badge-secondary {
  background-color: #6c757d;
  color: white;
}

.sources-status-info {
  margin: 20px 0;
  display: grid;
  gap: 12px;
}

.sources-info-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.sources-info-label {
  font-weight: 600;
  color: #495057;
  min-width: 160px;
}

.sources-info-value {
  color: #212529;
}

.sources-status-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 0;
}

/* Разделитель перед кнопками только если есть информация */
.sources-monitoring-status.sources-monitoring-enabled .sources-status-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

/* Формы */
.sources-interval-form,
.sources-add-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sources-interval-form .form-group,
.sources-add-form .form-group {
  margin-bottom: 0;
}

.sources-add-form .form-control,
.sources-interval-form .form-control {
  background-color: #ffffff;
}

/* Заголовки в карточках */
.container > .card h2,
.container > .card h3 {
  margin-top: 0;
  margin-bottom: 20px;
}

.container > .card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
}

.container > .card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
}

/* Таблица источников */
.sources-table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

.sources-table-wrapper .table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.sources-table-wrapper .table thead {
  background-color: #f8f9fa;
}

.sources-table-wrapper .table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sources-table-wrapper .table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

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

.sources-table-wrapper .table tbody tr:last-child {
  border-bottom: none;
}

.sources-table-wrapper .table tbody td {
  padding: 14px 16px;
  color: #212529;
  vertical-align: middle;
}

.sources-table-wrapper .table tbody td:first-child {
  font-weight: 500;
}

.sources-table-wrapper .table tbody td:last-child {
  text-align: right;
  white-space: nowrap;
}

.sources-empty-message {
  color: #6c757d;
  font-style: italic;
  padding: 32px 0;
  text-align: center;
  margin: 0;
}

/* Карточка управления источниками */
.sources-management-card {
  border-left: 4px solid #28a745;
}

/* Секция добавления источника */
.sources-add-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #e9ecef;
}

.sources-add-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.125rem;
  font-weight: 600;
  color: #212529;
}

/* Информационная карточка */
.sources-info-card {
  background-color: #f8f9fa;
  border-left: 4px solid #0d6efd;
}

.sources-info-card h3 {
  color: #0d6efd;
  margin-top: 0;
}

.sources-info-list {
  margin: 16px 0 8px 0;
  padding-left: 24px;
  list-style-type: disc;
}

.sources-info-list li {
  margin: 10px 0;
  line-height: 1.6;
  color: #495057;
}

.sources-info-list a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

.sources-info-list a:hover {
  text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
  .sources-monitoring-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sources-status-actions {
    flex-direction: column;
  }

  .sources-status-actions .btn {
    width: 100%;
  }

  .sources-info-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .sources-info-label {
    min-width: auto;
    margin-bottom: 4px;
  }
}