/* BETTING ANALYSIS STYLES - MVP VERSION 💰 */

.betting-analysis-container {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ЗАГОЛОВОК */
.betting-analysis-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.betting-analysis-header h2 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
}

.betting-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.betting-summary span {
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 20px;
    font-weight: 600;
    color: #495057;
}

.season-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.matches-info {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    color: white !important;
}

/* СЕКЦИИ */
.betting-sections {
    display: grid;
    gap: 30px;
}

.betting-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.section-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    margin: -20px -20px 20px -20px;
    border-radius: 10px 10px 0 0;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

/* ТАБЛИЦЫ */
.betting-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.betting-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 13px; /* как в таблице все матчи */
}

.betting-table th {
    background: #f5f5f5; /* как в team-analysis */
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
    font-size: 12px;
}

.betting-table td {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    vertical-align: middle;
    font-size: 13px;
}

/* СТРОКИ СТАВОК */
.betting-row:hover {
    background-color: #f8f9fa;
}

.bet-name {
    text-align: left !important;
    min-width: 150px;
}

.bet-name strong {
    color: #2c3e50;
    font-size: 14px;
}

.bet-name small {
    color: #6c757d;
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

.bet-wins, .bet-total {
    font-weight: 600;
    color: #495057;
}

/* ЦВЕТОВАЯ КОДИРОВКА ПРОЦЕНТОВ */
.bet-percentage, .bet-status {
    font-weight: bold;
    border-radius: 4px;
    padding: 6px 8px;
}

.percentage-excellent {
    background-color: #28a745 !important;
    color: white !important;
}

.percentage-good {
    background-color: #17a2b8 !important;
    color: white !important;
}

.percentage-average {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.percentage-poor {
    background-color: #fd7e14 !important;
    color: white !important;
}

.percentage-bad {
    background-color: #dc3545 !important;
    color: white !important;
}

/* РАЗДЕЛИТЕЛИ СЕКЦИЙ */
.section-separator {
    background-color: #e9ecef !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    color: #6c757d;
    letter-spacing: 1px;
}

.section-separator td {
    padding: 8px !important;
    border-top: 2px solid #adb5bd !important;
    border-bottom: 2px solid #adb5bd !important;
}

/* ОШИБКИ */
.betting-error {
    text-align: center;
    padding: 40px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

.betting-error h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
}

.betting-error p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

.retry-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.retry-button:hover {
    background: #0056b3;
}

/* Группировка заголовков */
.group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: bold !important;
}

/* Разделители между группами */
.separator-header {
    background: #f8f9fa !important;
    border: none !important;
    width: 8px !important;
    padding: 0 !important;
}

.separator-cell {
    background: #f8f9fa !important;
    border: none !important;
    width: 8px !important;
    padding: 0 !important;
}

/* Ячейки матчей с результатами */
.match-info {
    font-size: 11px !important;
    text-align: left !important;
    padding: 4px 6px !important;
    max-width: 100px !important;
    word-wrap: break-word !important;
}

/* Ячейки выигрыша/проигрыша в таблице матчей */
.win-cell {
    background-color: #d4edda !important;
    color: #155724 !important;
    font-weight: bold !important;
    text-align: center !important;
    font-size: 14px !important;
}

.lose-cell {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    font-weight: bold !important;
    text-align: center !important;
    font-size: 14px !important;
}

/* Таблица форы - специальная компактная версия */
.betting-section .betting-table thead tr:first-child th {
    background: #343a40 !important;
    color: white !important;
    font-size: 11px !important;
    padding: 6px 3px !important;
}

.betting-section .betting-table thead tr:last-child th {
    background: #6c757d !important;
    color: white !important;
    font-size: 10px !important;
    padding: 4px 2px !important;
}

/* Сжатие колонок для большого количества данных */
.betting-table.compact th,
.betting-table.compact td {
    padding: 3px 2px !important;
    font-size: 10px !important;
    text-align: center !important;
}

/* НОВАЯ СТРУКТУРА: Матчи по столбцам - УЛУЧШЕННЫЕ ШРИФТЫ */
.betting-matches-table {
    font-size: 13px !important; /* такой же размер, как в таблице все матчи */
    border-collapse: collapse !important;
}

.bet-type-header {
    background: #f5f5f5 !important;
    color: #333 !important;
    font-weight: bold !important;
    min-width: 60px !important; /* как первая колонка 60px */
    max-width: 60px !important;
    padding: 8px 6px !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 11 !important;
    font-size: 12px !important;
}

.match-header {
    background: #f5f5f5 !important;
    color: #333 !important;
    padding: 4px 6px !important;
    text-align: center !important;
    min-width: 80px !important;
    font-size: 11px !important;
}

.match-date {
    font-weight: bold !important;
    font-size: 11px !important; /* Увеличиваем с 10px */
}

.match-opponent {
    font-size: 10px !important; /* Увеличиваем с 9px */
    margin: 2px 0 !important;
}

.match-score {
    font-weight: bold !important;
    font-size: 12px !important; /* Увеличиваем с 11px */
    color: #FFD700 !important;
}

.match-location, .total-goals, .individual-goals, .goal-info, .goal-diff, .halftime-info, .live-info, .exact-score {
    font-size: 10px !important; /* Увеличиваем с 8-9px */
    color: #FFD700 !important;
    font-weight: bold !important;
}

.bet-type-cell {
    background: #fafafa !important;
    color: #333 !important;
    font-weight: 600 !important;
    padding: 6px 8px !important;
    text-align: center !important;
    border-right: 1px solid #e0e0e0 !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
    min-width: 60px !important;
    max-width: 60px !important;
    font-size: 12px !important;
}

.bet-type-cell small {
    display: block !important;
    font-weight: normal !important;
    margin-top: 2px !important;
    font-size: 10px !important; /* Увеличиваем */
    color: #666 !important;
}

.summary-row .bet-type-cell {
    background: #6c757d !important;
    color: white !important;
}

.summary-cell {
    background: #e9ecef !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 4px !important;
}

/* Колонка с процентами - ИСПРАВЛЯЕМ БЕЛОЕ НА БЕЛОМ */
.percentage-header {
    background: #f5f5f5 !important;
    color: #333 !important;
    font-weight: bold !important;
    min-width: 60px !important; /* как второй столбец */
    max-width: 60px !important;
    padding: 8px 6px !important;
    position: sticky !important;
    left: 60px !important; /* вплотную к первому */
    z-index: 9 !important;
    text-align: center !important;
    font-size: 12px !important;
}

.percentage-cell {
    background: #f8f9fa !important;
    color: #333 !important;
    font-weight: bold !important;
    padding: 6px 8px !important;
    text-align: center !important;
    border-right: 1px solid #e0e0e0 !important;
    position: sticky !important;
    left: 60px !important;
    z-index: 4 !important;
    min-width: 60px !important;
    max-width: 60px !important;
    font-size: 12px !important;
}

.percentage-cell small {
    display: block !important;
    font-weight: normal !important;
    margin-top: 2px !important;
    font-size: 10px !important; /* Увеличиваем */
    color: #666 !important;
}

/* Разделители */
.separator-row {
    background: #343a40 !important;
    color: white !important;
    font-weight: bold !important;
    text-align: center !important;
    font-size: 12px !important; /* Увеличиваем */
}

.separator-cell {
    background: #343a40 !important;
    color: white !important;
    padding: 8px !important;
    text-align: center !important;
    font-size: 12px !important; /* Увеличиваем */
}

/* Горизонтальная прокрутка для широких таблиц */
.betting-table-container {
    overflow-x: auto !important;
    max-width: 100% !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
}

.betting-matches-table {
    min-width: 800px !important;
    width: max-content !important;
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 768px) {
    .betting-analysis-container {
        margin: 10px 0;
        padding: 15px;
    }
    
    .betting-analysis-header h2 {
        font-size: 22px;
    }
    
    .betting-summary {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .betting-summary span {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .betting-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 16px;
        padding: 10px 15px;
        margin: -15px -15px 15px -15px;
    }
    
    .betting-table {
        font-size: 12px;
    }
    
    .betting-table th,
    .betting-table td {
        padding: 8px 4px;
    }
    
    .bet-name {
        min-width: 120px;
    }
    
    .bet-name strong {
        font-size: 13px;
    }
    
    .bet-name small {
        font-size: 10px;
    }

    .betting-matches-table {
        font-size: 11px !important; /* Увеличиваем с 9px */
        min-width: 600px !important;
    }
    
    .match-header {
        min-width: 60px !important;
        padding: 3px 4px !important;
        font-size: 10px !important; /* Увеличиваем */
    }
    
    .bet-type-cell {
        min-width: 100px !important;
        padding: 4px 6px !important;
        font-size: 11px !important; /* Увеличиваем */
    }
    
    .bet-type-cell small {
        font-size: 9px !important; /* Увеличиваем */
    }
    
    .percentage-header {
        left: 100px !important;
        min-width: 80px !important;
        font-size: 11px !important; /* Увеличиваем */
    }
    
    .percentage-cell {
        left: 100px !important;
        min-width: 80px !important;
        font-size: 11px !important; /* Увеличиваем */
        background: #f8f9fa !important; /* Светло-серый фон */
        color: #333 !important; /* ТЕМНЫЙ ТЕКСТ */
    }
    
    .match-date, .match-score {
        font-size: 10px !important; /* Увеличиваем */
    }
    
    .match-opponent, .match-location {
        font-size: 9px !important; /* Увеличиваем */
    }
    
    .win-cell, .lose-cell {
        font-size: 12px !important; /* Увеличиваем ✅❌ на мобильных */
    }
}

@media (max-width: 480px) {
    .betting-table {
        font-size: 11px;
    }
    
    .betting-table th,
    .betting-table td {
        padding: 6px 3px;
    }
    
    .bet-name {
        min-width: 100px;
    }
    
    .bet-percentage, .bet-status {
        padding: 4px 6px;
        font-size: 11px;
    }
} 

/* СТИЛИ ДЛЯ УПРАВЛЕНИЯ ТАБЛИЦАМИ В MATCHVIEW */
.table-controls-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.controls-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

/* СТИЛИ ДЛЯ MATCH BETTING ANALYSIS */
.match-betting-analysis {
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    margin: 30px 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.match-betting-analysis .betting-analysis-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.match-betting-analysis .betting-analysis-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.match-info {
    font-size: 14px;
    opacity: 0.9;
}

.match-info .teams {
    font-weight: bold;
    margin-right: 15px;
}

.match-info .date {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

/* СТИЛИ ДЛЯ ПЕРЕКЛЮЧАТЕЛЯ РЕЖИМОВ */
.betting-mode-toggle {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 20px;
}

.mode-toggle-header h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.mode-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.mode-toggle-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.mode-btn {
    flex: 1;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-btn:hover {
    border-color: #667eea;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.2);
}

.mode-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mode-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.mode-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
}

.mode-desc {
    font-size: 11px;
    line-height: 1.3;
    opacity: 0.8;
}

.mode-info {
    background: white;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.current-mode-name {
    color: #667eea;
    font-weight: bold;
}

/* КОНТЕЙНЕР ДЛЯ БЕТТИНГОВЫХ ТАБЛИЦ */
.betting-tables-container {
    padding: 20px;
}

.betting-mode-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.betting-mode-info h4 {
    margin: 0 0 8px 0;
    color: #0056b3;
}

.betting-mode-info p {
    margin: 0;
    font-size: 13px;
    color: #0056b3;
}

/* СТИЛИ ДЛЯ ОТДЕЛЬНЫХ КОМАНД */
.match-betting-container {
    margin: 20px 0;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
}

.match-betting-container.home-team {
    border-color: #28a745;
}

.match-betting-container.away-team {
    border-color: #dc3545;
}

.match-betting-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.match-betting-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.betting-summary {
    font-size: 13px;
    opacity: 0.9;
}

.betting-summary span {
    margin: 0 10px;
}

.betting-sections {
    padding: 15px;
}

.betting-sections .section-title {
    font-size: 14px;
    background: #f8f9fa;
    color: #333;
    padding: 8px 12px;
    margin: 15px 0 10px 0;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

/* ОШИБКИ БЕТТИНГА */
.betting-error {
    padding: 20px;
    text-align: center;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px;
}

.retry-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #5a67d8;
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 768px) {
    .mode-toggle-buttons {
        flex-direction: column;
    }
    
    .mode-btn {
        padding: 12px;
    }
    
    .mode-title {
        font-size: 13px;
    }
    
    .mode-desc {
        font-size: 10px;
    }
    
    .match-betting-analysis .betting-analysis-header h2 {
        font-size: 20px;
    }
    
    .match-info {
        font-size: 12px;
    }
    
    .table-controls-section {
        padding: 15px;
    }
    
    .betting-tables-container {
        padding: 10px;
    }
} 

/* ПЛАШКИ СТАТИСТИКИ КАК В ШАБЛОНЕ */
.stats-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0 25px 0;
    border: 1px solid #dee2e6;
}

.stats-summary h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    text-align: center;
}

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

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.stat-item:hover {
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}

.profit-positive {
    color: #28a745 !important;
}

.profit-negative {
    color: #dc3545 !important;
}

.profit-neutral {
    color: #6c757d !important;
}

/* ИНТЕРЛЕЙСИНГ СТИЛИ */
.interleaved-home {
    border-left: 4px solid #28a745;
    margin-bottom: 15px;
}

.interleaved-away {
    border-left: 4px solid #dc3545;
    margin-bottom: 15px;
}

.interleaved-home .section-title::after {
    content: " (ДОМА)";
    font-size: 12px;
    opacity: 0.8;
}

.interleaved-away .section-title::after {
    content: " (В ГОСТЯХ)";
    font-size: 12px;
    opacity: 0.8;
}

/* КОНТРОЛИРУЕМЫЕ ТАБЛИЦЫ */
.controlled-table {
    transition: all 0.3s ease;
}

.controlled-table.edit-mode {
    border: 2px dashed #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ ПЛАШЕК */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stats-summary {
        padding: 15px;
        margin: 10px 0 20px 0;
    }
    
    .stats-summary h4 {
        font-size: 14px;
    }
} 

/* ОТОБРАЖЕНИЕ ОШИБОК */
.betting-analysis-error {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

.betting-error-header h3 {
    color: #dc3545;
    margin-bottom: 20px;
}

.retry-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.retry-button:hover {
    background: #0056b3;
}

/* ЦВЕТОВАЯ КОДИРОВКА ПРОЦЕНТА РЕАЛИЗАЦИИ (из шаблона) */
.percentage-orange,
.percentage-cell.percentage-orange {
    background-color: #ff8c00 !important;
    color: white !important;
    font-weight: bold !important;
}

.percentage-blue,
.percentage-cell.percentage-blue {
    background-color: #1e90ff !important;
    color: white !important;
    font-weight: bold !important;
}

.percentage-lightblue,
.percentage-cell.percentage-lightblue {
    background-color: #87ceeb !important;
    color: #333 !important;
    font-weight: bold !important;
}

.percentage-gray,
.percentage-cell.percentage-gray {
    background-color: #d3d3d3 !important;
    color: #666 !important;
    font-weight: bold !important;
}

.percentage-header {
    background-color: #f8f9fa !important;
    font-size: 10px !important;
    font-weight: bold !important;
    color: #666 !important;
    padding: 4px 2px !important;
    text-align: center !important;
} 