/* AK Football Prediction Frontend Styles */

/* Match display styles */
.ak-fp-match {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ak-fp-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ak-fp-match-teams {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.ak-fp-team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.ak-fp-team-home {
    justify-content: flex-end;
    text-align: right;
}

.ak-fp-team-away {
    justify-content: flex-start;
    text-align: left;
}

.ak-fp-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.ak-fp-team-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.ak-fp-match-vs {
    font-size: 1.2em;
    font-weight: bold;
    color: #666;
    margin: 0 15px;
}

.ak-fp-match-score {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    text-align: center;
    min-width: 60px;
}

.ak-fp-match-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.ak-fp-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ak-fp-info-label {
    font-weight: 600;
    color: #666;
}

.ak-fp-info-value {
    color: #333;
}

/* Status indicators */
.ak-fp-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.ak-fp-status-finished {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ak-fp-status-live {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    animation: pulse 2s infinite;
}

.ak-fp-status-upcoming {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Predictions section */
.ak-fp-predictions {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ak-fp-predictions-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

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

.ak-fp-prediction-item {
    text-align: center;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.ak-fp-prediction-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.ak-fp-prediction-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #007cba;
}

.ak-fp-prediction-percentage {
    position: relative;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.ak-fp-prediction-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.ak-fp-prediction-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
}

/* Odds section */
.ak-fp-odds {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

.ak-fp-odds-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #856404;
}

.ak-fp-odds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.ak-fp-odds-item {
    text-align: center;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
}

.ak-fp-odds-label {
    font-size: 0.85em;
    color: #856404;
    margin-bottom: 3px;
}

.ak-fp-odds-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #533f03;
}

/* Match list styles */
.ak-fp-matches-list {
    display: grid;
    gap: 20px;
}

.ak-fp-matches-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    flex-wrap: wrap;
}

.ak-fp-filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ak-fp-filter-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #666;
}

.ak-fp-filter-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

/* Responsive design */
@media (max-width: 768px) {
    .ak-fp-match-teams {
        flex-direction: column;
        gap: 10px;
    }
    
    .ak-fp-team {
        justify-content: center;
        text-align: center;
    }
    
    .ak-fp-match-vs {
        order: 2;
        margin: 10px 0;
    }
    
    .ak-fp-match-info {
        grid-template-columns: 1fr;
    }
    
    .ak-fp-predictions-grid,
    .ak-fp-odds-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ak-fp-matches-filter {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ak-fp-match {
        padding: 15px;
        margin: 15px 0;
    }
    
    .ak-fp-team-name {
        font-size: 1em;
    }
    
    .ak-fp-match-score {
        font-size: 1.3em;
    }
    
    .ak-fp-predictions-grid,
    .ak-fp-odds-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for live matches */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Loading states */
.ak-fp-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.ak-fp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility classes */
.ak-fp-text-center { text-align: center; }
.ak-fp-text-left { text-align: left; }
.ak-fp-text-right { text-align: right; }

.ak-fp-mb-10 { margin-bottom: 10px; }
.ak-fp-mb-15 { margin-bottom: 15px; }
.ak-fp-mb-20 { margin-bottom: 20px; }

.ak-fp-mt-10 { margin-top: 10px; }
.ak-fp-mt-15 { margin-top: 15px; }
.ak-fp-mt-20 { margin-top: 20px; }

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ak-fp-match {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .ak-fp-team-name,
    .ak-fp-match-score,
    .ak-fp-info-value {
        color: #ecf0f1;
    }
    
    .ak-fp-info-label {
        color: #bdc3c7;
    }
    
    .ak-fp-predictions,
    .ak-fp-odds {
        background: #34495e;
        border-color: #4a5f7a;
    }
    
    .ak-fp-prediction-item,
    .ak-fp-odds-item {
        background: #2c3e50;
        border-color: #4a5f7a;
    }
}
