/* Custom CSS for Football Matches Plugin - Enhanced Front-end Layout */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

.fmp-matches-container {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl;
}

/* General Match Container Styling */
.fmp-match {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.fmp-match:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
}

.fmp-match-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Competition Badge */
.fmp-match-competition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.fmp-competition-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Top Row Styling (Teams, Logos, Score) */
.fmp-match-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

/* Team Box Styling */
.fmp-team-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
    position: relative;
}

.fmp-team-side-icon-wrapper {
    margin-bottom: -10px;
    z-index: 2;
}

.fmp-team-side-icon {
    font-size: 12px;
    background: #fff;
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.fmp-team-logo-container {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px;
    transition: transform 0.3s ease;
    border: 1px solid #f1f5f9;
}

.fmp-match:hover .fmp-team-logo-container {
    transform: scale(1.1);
}

.fmp-team-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fmp-team-name {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    margin: 0;
}

/* Match Result (Score Box) Styling */
.fmp-match-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.fmp-score {
    background: #1e293b; /* Default dark */
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Upcoming / Countdown State */
.fmp-status-upcoming .fmp-score,
.fmp-status-ns .fmp-score,
[data-status="NS"] .fmp-score {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #ffedd5;
}

/* Live State */
.fmp-status-live .fmp-score,
[data-status="LIVE"] .fmp-score,
[data-status="HT"] .fmp-score {
    background: #e11d48;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.3);
}

/* Finished State */
.fmp-status-ft .fmp-score,
[data-status="FT"] .fmp-score {
    background: #0f172a;
    color: #94a3b8;
}

/* Match Status Badge */
.fmp-match-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fmp-status-live {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #ffe4e6;
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.1);
}

.fmp-status-live i {
    color: #e11d48;
    font-size: 8px;
    animation: fmp-pulse 1.2s infinite;
}

.fmp-status-ft {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.fmp-status-ns {
    background: #f0fdf4;
    color: #22c55e;
    border: 1px solid #dcfce7;
}

/* Info Bar Styling */
.fmp-match-info-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 12px;
    margin-top: 15px;
}

.fmp-info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
}

.fmp-info-icon {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Extra Info Section */
.fmp-extra-info {
    margin-top: 15px;
    padding: 10px;
    background: #fffbeb;
    border-right: 4px solid #f59e0b;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #92400e;
    text-align: center;
}

/* Countdown Styling */
.fmp-countdown {
    font-family: monospace;
    font-weight: 700;
    color: #f59e0b;
}

/* Animations */
@keyframes fmp-pulse {
    0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
    70% { transform: scale(1.1); opacity: 0.7; box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
    100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

/* Responsive Design */
@media (max-width: 640px) {
    .fmp-match {
        padding: 12px;
    }
    
    .fmp-team-logo-container {
        width: 55px;
        height: 55px;
        padding: 6px;
    }
    
    .fmp-team-name {
        font-size: 0.85rem;
    }
    
    .fmp-score {
        font-size: 1.2rem;
        padding: 5px 10px;
        min-width: 70px;
    }

    .fmp-match-result {
        min-width: 80px;
    }
    
    .fmp-match-info-bar {
        grid-template-columns: 1fr 1fr;
        padding: 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .fmp-match-top-row {
        gap: 8px;
    }
    
    .fmp-team-logo-container {
        width: 45px;
        height: 45px;
        padding: 4px;
    }

    .fmp-team-name {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .fmp-score {
        font-size: 1rem;
        padding: 4px 8px;
        min-width: 60px;
        letter-spacing: 1px;
    }

    .fmp-match-result {
        min-width: 70px;
        gap: 4px;
    }

    .fmp-match-status {
        font-size: 0.65rem;
        padding: 2px 8px;
    }
    
    .fmp-match-info-bar {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        padding: 6px;
    }

    .fmp-info-item {
        font-size: 0.7rem;
    }
}

@media (max-width: 350px) {
    .fmp-match-info-bar {
        grid-template-columns: 1fr;
    }
}
