/**
 * Компоненты для РПЛ 2025
 * Кнопки, карточки, формы, модальные окна
 */

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
  min-height: 40px;
  gap: 0.5rem;
}

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

/* Варианты кнопок */
.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--secondary-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  min-height: 32px;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  min-height: 48px;
}

/* ОРИГИНАЛЬНЫЕ СТИЛИ ИЗ БЕКАПА - МАТЧИ */

/* Секции туров */
.round-section {
  background: white;
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.round-header {
  background: #ff6b35;
  color: white;
  padding: 15px 20px;
  font-weight: bold;
  font-size: 16px;
}

.match-list {
  padding: 12px 20px;
}

.match-item {
  display: grid;
  grid-template-columns: 150px 1fr 80px 1fr 150px 120px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.match-item:last-child {
  border-bottom: none;
}

.match-item:hover {
  background: #f8f8f8;
}

.match-date {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.team-rank {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #0b63ce;
  background: #eaf3ff;
  border: 1px solid #cfe3ff;
  border-radius: 999px;
  padding: 2px 6px;
  margin: 0 6px 0 0;
}

.team-home, .team-away {
  text-align: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  transition: background 0.2s;
}

/* Увеличенный жирный шрифт для названий команд в списке матчей */
.match-item .team-home,
.match-item .team-away {
  font-weight: 800;
  font-size: 16px;
}

/* Чуть крупнее бейдж ранга на карточке матча */
.match-item .team-rank { font-size: 12px; }

.team-home:hover, .team-away:hover {
  background: #e3f2fd;
  color: #1976d2;
}

.score {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  padding: 10px;
  border-radius: 5px;
  transition: all 0.2s;
}

.score:hover {
  background: #ff6b35;
  color: white;
  transform: scale(1.1);
}

.score-finished {
  color: #333;
}

.score-upcoming {
  color: #999;
  font-size: 14px;
}

.match-status {
  font-size: 12px;
  color: #666;
  text-align: center;
}

/* Карточки */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--gray-900);
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.badge-success { background: rgba(76, 175, 80, 0.1); color: var(--success); }
.badge-warning { background: rgba(255, 152, 0, 0.1); color: var(--warning); }
.badge-danger { background: rgba(244, 67, 54, 0.1); color: var(--danger); }
.badge-info { background: rgba(33, 150, 243, 0.1); color: var(--info); }

/* Формы */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius-sm);
  background: var(--white);
  color: var(--gray-800);
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-control:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

/* Select */
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-info {
  background: rgba(33, 150, 243, 0.1);
  border-color: rgba(33, 150, 243, 0.2);
  color: var(--info);
}

.alert-warning {
  background: rgba(255, 152, 0, 0.1);
  border-color: rgba(255, 152, 0, 0.2);
  color: var(--warning);
}

.alert-danger {
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.2);
  color: var(--danger);
}

.alert-success {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.2);
  color: var(--success);
} 

/* Панель управления таблицей */
.table-controls {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 2px solid #ff6b35;
}

.controls-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zoom-display {
  font-weight: bold;
  color: #ff6b35;
  min-width: 45px;
  text-align: center;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.control-btn {
  background: #f8f9fa;
  border: 2px solid #ff6b35;
  color: #ff6b35;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s;
}

.control-btn:hover {
  background: #ff6b35;
  color: white;
  transform: translateY(-1px);
}

.control-btn.active {
  background: #ff6b35;
  color: white;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.columns-panel {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #dee2e6;
}

.columns-panel h4 {
  margin: 0 0 10px 0;
  color: #ff6b35;
  font-size: 14px;
}

.columns-panel label {
  font-size: 12px;
  cursor: pointer;
  display: inline-block;
  margin-right: 15px;
}

.columns-panel input[type="checkbox"] {
  margin-right: 5px;
}

/* Стили для drag & drop */
.team-analysis-table th.dragging {
  opacity: 0.5;
  background: #ff6b35 !important;
  color: white !important;
}

.team-analysis-table th[draggable="true"]:hover {
  background: #ffebf0;
  cursor: move;
}

/* Простая панель управления таблицей */
.simple-table-controls {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 15px;
  box-shadow: 0 3px 12px rgba(255, 107, 53, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.controls-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.controls-info span {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 500;
}

.control-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.control-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #ff6b35;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Компактный режим для таблицы */
.team-analysis-table.compact-mode {
  font-size: 10px;
}

.team-analysis-table.compact-mode th,
.team-analysis-table.compact-mode td {
  padding: 4px 6px;
  font-size: 9px;
}

.team-analysis-table.compact-mode .param-column {
  font-size: 10px;
  min-width: 120px;
}

.team-analysis-table.compact-mode .category-header {
  font-size: 11px;
  padding: 6px 8px;
}

/* Доп. шапка над матчами и подсветка столбцов */
.team-analysis-table thead .header-secondary-row th {
  background: #f7fafc;
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.team-analysis-table thead .header-place-row th {
  background: #ffffff;
  font-weight: 700;
  font-size: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}
.team-analysis-table .match-top-cell:hover {
  background: #eef6ff;
}
.team-analysis-table .col-selected {
  box-shadow: inset 0 0 0 2px #0b63ce;
}

/* Контейнер отчета команды */
.team-report-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
  .controls-section {
    flex-direction: column;
    gap: 10px;
  }
  
  .table-actions {
    justify-content: center;
  }
  
  .control-btn {
    font-size: 10px;
    padding: 5px 8px;
  }
  
  .columns-panel label {
    display: block;
    margin-bottom: 5px;
  }

  .simple-table-controls {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }
  
  .controls-group {
    justify-content: center;
    width: 100%;
  }
  
  .control-btn {
    font-size: 11px;
    padding: 5px 10px;
  }
  
  .controls-info {
    text-align: center;
    width: 100%;
  }
  
  .controls-info span {
    font-size: 11px;
  }
} 

/* Заглушка Betting Analysis */
.betting-analysis-stub {
  background: white;
  border-radius: 15px;
  margin: 40px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 3px solid #ff6b35;
  overflow: hidden;
}

.betting-stub-header {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.betting-stub-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.stub-status {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.betting-stub-content {
  padding: 25px;
}

.stub-description {
  margin-bottom: 30px;
}

.stub-description h4 {
  color: #ff6b35;
  margin-bottom: 15px;
  font-size: 18px;
}

.stub-description ul {
  list-style: none;
  padding: 0;
}

.stub-description li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.stub-description li:last-child {
  border-bottom: none;
}

/* Превью статистики */
.stub-preview {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
}

.stub-preview h4 {
  color: #ff6b35;
  margin-bottom: 15px;
  font-size: 16px;
}

.stub-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.stub-stat {
  background: white;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  border: 2px solid #e0e0e0;
  transition: transform 0.3s ease;
}

.stub-stat:hover {
  transform: translateY(-2px);
  border-color: #ff6b35;
}

.stub-value {
  font-size: 24px;
  font-weight: bold;
  color: #ff6b35;
  margin-bottom: 5px;
}

.stub-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* Roadmap */
.stub-roadmap {
  margin-bottom: 25px;
}

.stub-roadmap h4 {
  color: #ff6b35;
  margin-bottom: 15px;
  font-size: 16px;
}

.roadmap-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roadmap-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.step-icon {
  width: 24px;
  text-align: center;
  font-size: 14px;
}

.step-text {
  font-size: 14px;
  color: #333;
}

.roadmap-step.completed .step-text {
  color: #28a745;
  font-weight: 500;
}

.roadmap-step.active .step-text {
  color: #ff6b35;
  font-weight: 600;
}

.roadmap-step .step-text {
  color: #999;
}

/* Кнопка */
.betting-stub-button {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.betting-stub-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* Адаптивность */
@media (max-width: 768px) {
  .betting-analysis-stub {
    margin: 20px 0;
  }
  
  .betting-stub-header {
    padding: 15px 20px;
    flex-direction: column;
    gap: 10px;
  }
  
  .betting-stub-header h3 {
    font-size: 20px;
  }
  
  .betting-stub-content {
    padding: 20px;
  }
  
  .stub-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .roadmap-steps {
    gap: 8px;
  }
} 