/* Prediction Widget - Slider Style */
/* Scoped styles - no global selectors */

/* Container */
.prediction-container {
    width: 100%;
    max-width: 420px;
    background: #1e1e32;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.prediction-container *,
.prediction-container *::before,
.prediction-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header */
.prediction-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.prediction-header-bar {
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #4CAF50, #2196F3);
    border-radius: 2px;
}

.prediction-header-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Loading */
.prediction-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.prediction-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.prediction-loading-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Empty State */
.prediction-empty {
    padding: 60px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* Slider Wrapper */
.prediction-slider-wrapper {
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Slider */
.prediction-slider {
    width: 100%;
    overflow: hidden;
}

.prediction-slider-track {
    display: flex;
    transition: transform 0.4s ease;
}

/* Prediction Card */
.prediction-card {
    flex: 0 0 100%;
    width: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Question */
.prediction-question {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 500;
}

/* Teams Section */
.prediction-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.prediction-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.prediction-team-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
}

.prediction-team-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Match Center (VS / Time) */
.prediction-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.prediction-vs-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prediction-vs-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.prediction-time-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prediction-time {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

/* Live Badge */
.prediction-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #e74c3c;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.prediction-live-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.prediction-live-text {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.prediction-score {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

/* Voting Buttons */
.prediction-voting {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
    padding: 0 10px;
}

.prediction-vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.prediction-vote-btn:hover {
    transform: translateY(-2px);
}

.prediction-vote-btn:active {
    transform: scale(0.98);
}

.prediction-vote-percent {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.prediction-vote-percent.has-value {
    color: #ffffff;
}

.prediction-vote-box {
    width: 80px;
    height: 90px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.prediction-vote-box.home {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}

.prediction-vote-box.draw {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.prediction-vote-box.away {
    background: linear-gradient(135deg, #f44336, #D32F2F);
}

/* Hover effect for vote boxes */
.prediction-vote-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s ease;
}

.prediction-vote-btn:hover .prediction-vote-box::after {
    background: rgba(255, 255, 255, 0.1);
}

.prediction-vote-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* Navigation */
.prediction-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px 24px;
}

/* Dots */
.prediction-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.prediction-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.prediction-dot.active {
    background: #ffffff;
    width: 10px;
    height: 10px;
}

.prediction-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .prediction-container {
        max-width: 100%;
        border-radius: 12px;
    }

    .prediction-header {
        padding: 16px 20px;
    }

    .prediction-header-title {
        font-size: 18px;
    }

    .prediction-card {
        padding: 20px 10px;
        gap: 16px;
    }

    .prediction-team-logo {
        width: 56px;
        height: 56px;
    }

    .prediction-team-name {
        font-size: 12px;
        max-width: 80px;
    }

    .prediction-vote-box {
        width: 70px;
        height: 80px;
        border-radius: 10px;
    }

    .prediction-voting {
        gap: 12px;
    }

    .prediction-navigation {
        padding: 12px 20px 20px;
    }
}

/* Vote animation */
@keyframes voteSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.prediction-vote-btn.voted .prediction-vote-box {
    animation: voteSuccess 0.3s ease;
}

.prediction-vote-btn.voted .prediction-vote-percent {
    color: #4CAF50;
}

/* Toast notification */
.prediction-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.prediction-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.prediction-toast.success {
    background: #4CAF50;
}

.prediction-toast.error {
    background: #f44336;
}
