/**
 * Sports Odds Pro - Frontend Styles
 * Professional styling for odds displays, tables, and widgets
 */

/* =============================================================================
   GLOBAL STYLES
   ============================================================================= */

.sports-odds-pro-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sports-odds-pro-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
}

.sports-odds-pro-loading::before {
    content: "⏳";
    margin-right: 8px;
}

.sports-odds-pro-error {
    text-align: center;
    padding: 20px;
    color: #d63638;
    background: #ffeaea;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    font-size: 14px;
}

/* =============================================================================
   ODDS TABLES
   ============================================================================= */

.sports-odds-pro-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

.sports-odds-pro-table .odds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sports-odds-pro-table .odds-table thead th {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sports-odds-pro-table .odds-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.sports-odds-pro-table .odds-table tbody tr:hover {
    background: #f8f9fa;
    transition: background 0.2s ease;
}

.sports-odds-pro-table .odds-table tbody tr:last-child td {
    border-bottom: none;
}

/* Event column styling */
.sports-odds-pro-table .event-cell {
    font-weight: 600;
    color: #333;
}

.sports-odds-pro-table .league-info {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

/* Bookmaker styling */
.sports-odds-pro-table .bookmaker-cell {
    font-weight: 500;
    color: #0073aa;
}

/* Odds value styling */
.sports-odds-pro-table .odds-value {
    font-weight: bold;
    font-size: 15px;
    color: #28a745;
    background: #f0f9f0;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

.sports-odds-pro-table .odds-value.high-value {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.sports-odds-pro-table .odds-value.extreme-value {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Start time styling */
.sports-odds-pro-table .start-time {
    font-size: 12px;
    color: #666;
}

.sports-odds-pro-table .start-time.live {
    color: #dc3545;
    font-weight: bold;
}

.sports-odds-pro-table .start-time.soon {
    color: #ffc107;
    font-weight: bold;
}

/* =============================================================================
   WIDGETS
   ============================================================================= */

.sports-odds-pro-widget {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.sports-odds-pro-widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0073aa, #005a87);
    border-radius: 4px 0 0 4px;
}

.sports-odds-pro-widget h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.sports-odds-pro-widget .odds-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sports-odds-pro-widget .odd-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
    transition: all 0.2s ease;
}

.sports-odds-pro-widget .odd-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.sports-odds-pro-widget .teams {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.sports-odds-pro-widget .details {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sports-odds-pro-widget .odds-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 11px;
}

/* =============================================================================
   HOT GAMES
   ============================================================================= */

.sports-odds-pro-hot-games {
    margin: 20px 0;
}

.sports-odds-pro-hot-games h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.sports-odds-pro-hot-games h3::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #feca57);
    border-radius: 2px;
}

.sports-odds-pro-hot-games .hot-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.sports-odds-pro-hot-games .hot-game-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sports-odds-pro-hot-games .hot-game-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #0abde3);
    background-size: 400% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.sports-odds-pro-hot-games .hot-game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.sports-odds-pro-hot-games .game-info .teams {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.sports-odds-pro-hot-games .game-info .league {
    color: #666;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

.sports-odds-pro-hot-games .game-info .start-time {
    color: #0073aa;
    font-size: 13px;
    font-weight: 600;
    background: #f0f8ff;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.sports-odds-pro-hot-games .game-stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sports-odds-pro-hot-games .stat {
    background: #f8f9fa;
    color: #495057;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.sports-odds-pro-hot-games .stat:nth-child(1) {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.sports-odds-pro-hot-games .stat:nth-child(2) {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #ce93d8;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .sports-odds-pro-table {
        overflow-x: auto;
    }
    
    .sports-odds-pro-table .odds-table {
        min-width: 600px;
        font-size: 13px;
    }
    
    .sports-odds-pro-table .odds-table thead th,
    .sports-odds-pro-table .odds-table tbody td {
        padding: 10px 8px;
    }
    
    .sports-odds-pro-widget {
        padding: 15px;
        margin: 10px 0;
    }
    
    .sports-odds-pro-hot-games .hot-games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sports-odds-pro-hot-games .hot-game-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .sports-odds-pro-table .odds-table {
        min-width: 500px;
        font-size: 12px;
    }
    
    .sports-odds-pro-widget .odd-item {
        padding: 10px;
    }
    
    .sports-odds-pro-widget .details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* =============================================================================
   ADMIN STYLES
   ============================================================================= */

.sports-odds-pro-admin {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sports-odds-pro-admin .card {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    padding: 20px;
    margin-bottom: 20px;
}

.sports-odds-pro-admin .card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.sports-odds-pro-admin .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.sports-odds-pro-admin .stat-box {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.sports-odds-pro-admin .stat-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sports-odds-pro-admin .endpoint-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.sports-odds-pro-admin .endpoint-list h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.sports-odds-pro-admin .endpoint-list code {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 13px;
    color: #333;
    display: block;
    margin-bottom: 8px;
    word-break: break-all;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.sports-odds-pro-text-center { text-align: center; }
.sports-odds-pro-text-left { text-align: left; }
.sports-odds-pro-text-right { text-align: right; }

.sports-odds-pro-mb-10 { margin-bottom: 10px; }
.sports-odds-pro-mb-20 { margin-bottom: 20px; }
.sports-odds-pro-mt-10 { margin-top: 10px; }
.sports-odds-pro-mt-20 { margin-top: 20px; }

.sports-odds-pro-hidden { display: none; }
.sports-odds-pro-visible { display: block; }

/* =============================================================================
   DARK MODE SUPPORT
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    .sports-odds-pro-table {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .sports-odds-pro-table .odds-table tbody td {
        border-bottom-color: #333;
    }
    
    .sports-odds-pro-table .odds-table tbody tr:hover {
        background: #2a2a2a;
    }
    
    .sports-odds-pro-widget {
        background: #1a1a1a;
        color: #e0e0e0;
        border-color: #333;
    }
    
    .sports-odds-pro-widget .odd-item {
        background: #2a2a2a;
    }
    
    .sports-odds-pro-widget .odd-item:hover {
        background: #333;
    }
    
    .sports-odds-pro-hot-games .hot-game-card {
        background: #1a1a1a;
        color: #e0e0e0;
        border-color: #333;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .sports-odds-pro-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .sports-odds-pro-table .odds-table thead th {
        background: #f0f0f0 !important;
        color: #333 !important;
    }
    
    .sports-odds-pro-widget,
    .sports-odds-pro-hot-games .hot-game-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}