/* ====== STILI CSS COMUNI VALUEBETS ====== */

/* ====== CONTAINER PRINCIPALE ====== */
.bets-container {
  background: #ffffff;
  padding: 16px;
  border-radius: 14px;
}

.bets-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #111827;
  letter-spacing: -0.5px;
}

.bets-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
  font-weight: 500;
}

/* ====== FILTRI ====== */
.bets-filters {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.bets-filters .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.bets-filters .form-control,
.bets-filters .selectize-control {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* ====== BOTTONE FILTRA ====== */
.tbc-btn--filter {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  color: white;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  cursor: pointer;
  margin-top: 22px;
}

.tbc-btn--filter:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.tbc-btn--filter:active {
  transform: translateY(0);
}

/* ====== DATATABLE ====== */
.dataTables_wrapper {
  font-size: 13px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info {
  color: #6b7280;
  font-size: 12px;
}

.dataTables_wrapper .dataTables_paginate {
  margin-top: 12px;
}

.dataTables_wrapper .paginate_button {
  padding: 6px 8px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 2px;
}

.dataTables_wrapper .paginate_button:hover:not(.disabled) {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.dataTables_wrapper .paginate_button.current {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  font-weight: 600;
}

/* ====== TABELLA HEADER ====== */
table.dataTable thead th {
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  border-bottom: 2px solid #e5e7eb !important;
  color: #111827;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 8px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

table.dataTable tbody td {
  padding: 11px 8px !important;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: middle;
}

table.dataTable tbody tr:hover {
  background-color: #f9fafb !important;
  transition: background-color 0.15s ease;
}

/* ====== CELLE NUMERICHE ====== */
.cell-numero {
  text-align: right;
  font-weight: 600;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}

.cell-positivo {
  color: #059669;
}

.cell-negativo {
  color: #dc2626;
}

.cell-neutro {
  color: #6b7280;
}

/* ====== BADGES TIPO SCHEDINA ====== */
.badge-tipo {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-singola {
  background: #dbeafe;
  color: #1e40af;
}

.badge-multipla {
  background: #fce7f3;
  color: #be185d;
}

.badge-sistema {
  background: #d1fae5;
  color: #065f46;
}

/* ====== BADGES REFERTO ====== */
.badge-referto {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-vinta {
  background: #dcfce7;
  color: #166534;
}

.badge-persa {
  background: #fee2e2;
  color: #7f1d1d;
}

.badge-rimborsata {
  background: #fef3c7;
  color: #92400e;
}

/* ====== DETTAGLI LEGS ====== */
.legs-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.legs-container::-webkit-scrollbar {
  width: 6px;
}

.legs-container::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.legs-container::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.legs-container::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.leg-card {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
  padding: 8px 10px;
  transition: all 0.15s ease;
  font-size: 12px;
  line-height: 1.5;
}

.leg-card:hover {
  background: linear-gradient(135deg, #f3f4f6 0%, #eff6ff 100%);
  border-left-color: #1d4ed8;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.leg-time {
  font-size: 10px;
  color: #9ca3af;
  margin-bottom: 3px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.leg-time::before {
  content: '🕐';
  font-size: 11px;
}

.leg-teams {
  font-weight: 700;
  color: #111827;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leg-league {
  font-size: 10px;
  color: #6b7280;
  margin-bottom: 3px;
}

.leg-market {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
}

.leg-selection {
  font-size: 11px;
  color: #374151;
  padding: 3px 6px;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 2px;
}

.leg-hdp {
  font-size: 10px;
  color: #7c3aed;
  font-weight: 600;
  display: inline-block;
  margin-left: 4px;
}

.legs-empty {
  font-style: italic;
  color: #9ca3af;
  padding: 8px;
  text-align: center;
  font-size: 12px;
}

/* ====== BOTTONI AZIONI ====== */
.delete-btn {
  border: none;
  background: transparent;
  padding: 5px 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  color: #6c757d;
  font-size: 16px;
}

.delete-btn:hover {
  transform: scale(1.2);
  color: #dc3545;
}

/* ====== CELLE EDITABILI ====== */
.editable-cell {
  position: relative;
  cursor: text;
  transition: all 0.2s ease;
}

.editable-cell::after {
  content: '✏️';
  font-size: 10px;
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.editable-cell:hover::after {
  opacity: 0.7;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .bets-container {
    padding: 12px;
  }
  
  .bets-title {
    font-size: 18px;
  }
  
  table.dataTable thead th {
    font-size: 11px;
    padding: 8px 4px !important;
  }
  
  table.dataTable tbody td {
    padding: 8px 4px !important;
    font-size: 12px;
  }
  
  .leg-card {
    padding: 6px 8px;
    font-size: 11px;
  }
  
  .legs-container {
    max-height: 180px;
  }
}