/* Custom CSS for Football Matches Plugin - Redesigned Layout with FontAwesome Icons */

/* General Match Container Styling */
.fmp-match {
    background-color: #f0f0f0; /* Light gray background like reference */
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    font-family: sans-serif; /* Basic font */
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.fmp-match-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Make the link wrap the whole block */
}

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

/* Team Name Box Styling */
.fmp-team-name-box {
    background-color: #007bff; /* Blue background */
    color: white;
    padding: 8px 15px;
    border-radius: 15px; /* Rounded corners */
    display: flex;
    align-items: center;
    font-weight: bold;
    text-align: center;
    justify-content: center; /* Center content */
    position: relative; /* For icon positioning */
    flex-shrink: 0; /* Prevent shrinking */
    width: 150px;
}

.fmp-home-team-box {
    order: 3;
}

.fmp-away-team-box {
    order: 3;
}

/* Team Side Icons (Home/Away) - Styling for FontAwesome */
.fmp-team-side-icon {
    display: block;
    width: 20px;    /* Container width */
    height: 20px;   /* Container height */
    position: absolute;
    top: -8px;     /* Position above the box */
    background-color: #28a745; /* Green background like reference */
    border-radius: 3px;
    padding: 2px;
    box-sizing: border-box; /* Include padding in size */
    font-size: 12px; /* Adjust FA icon size */
    line-height: 16px; /* Center icon vertically in container */
    text-align: center; /* Center icon horizontally */
    color: white; /* Icon color */
}

.fmp-home-icon {
    left: 10px;
}

.fmp-away-icon {
    right: 10px;
}

.fmp-team-name {
    /*margin: 0 5px;*/
    /* Space around name */
    font-family: 'Noto Kufi Arabic';
}

/* Team Logo Styling */
.fmp-team-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px; /* Slightly smaller */
    height: 50px; /* Slightly smaller */
    flex-shrink: 0; /* Prevent shrinking */
}

.fmp-home-logo-container {
    order: 2;
}

.fmp-away-logo-container {
    order: 4;
}

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

/* Match Result (Score Box) Styling */
.fmp-match-result {
    order: 3;
    text-align: center;
    flex-grow: 1; /* Allow score box to take up space if needed */
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.fmp-score {
    background-color: #004085; /* Dark blue background */
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.4em;
    font-weight: bold;
    min-width: 70px; /* Adjust min-width */
    display: inline-block;
}

/* Info Bar Styling */
.fmp-match-info-bar {
    display: flex;
    justify-content: space-around; /* Distribute items evenly */
    align-items: center;
    background-color: #e9ecef; /* Slightly darker gray */
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    color: #495057; /* Darker text color */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.fmp-info-item {
    display: flex;
    align-items: center;
   /*  margin: 3px 10px; Spacing between items */
    font-family: 'Noto Kufi Arabic';
}

/* Info Bar Icons - Styling for FontAwesome */
.fmp-info-icon {
    display: inline-block;
    width: auto; /* Let FA handle width */
    height: auto; /* Let FA handle height */
    margin-right: 6px;
    vertical-align: middle; /* Align icon with text */
    opacity: 0.7;
    font-size: 1em; /* Adjust size if needed */
    line-height: 1; /* Ensure proper vertical alignment */
}

/* Status Specific Styling */

/* Live */
.fmp-match[data-status="LIVE"] .fmp-score,
.fmp-match[data-status="HT"] .fmp-score {
    background-color: #dc3545; /* Red background */
}

.fmp-match[data-status="LIVE"] .fmp-info-status,
.fmp-match[data-status="HT"] .fmp-info-status {
    color: #dc3545; /* Red text */
    font-weight: bold;
}

.fmp-match[data-status="LIVE"] .fmp-info-status .fmp-live-icon,
.fmp-match[data-status="HT"] .fmp-info-status .fmp-live-icon {
    opacity: 1;
    animation: fmp-pulse 1.5s infinite ease-in-out;
    font-size: 0.8em; /* Make live circle slightly smaller */
}

/* Finished */
.fmp-match[data-status="FT"] .fmp-score {
    background-color: #6c757d; /* Gray background */
}

.fmp-match[data-status="FT"] .fmp-info-status {
    color: #6c757d; /* Gray text */
}

.fmp-match[data-status="FT"] .fmp-info-status .fmp-info-icon {
    opacity: 1;
}

/* Upcoming (NS) */
.fmp-match[data-status="NS"] .fmp-score {
    background-color: #ffc107; /* Orange background */
    color: #343a40; /* Darker text for orange */
}

.fmp-match[data-status="NS"] .fmp-info-status {
    color: #ffc107; /* Orange text */
    font-weight: bold;
}

.fmp-match[data-status="NS"] .fmp-info-status .fmp-info-icon {
    opacity: 1;
}

/* Pulse Animation */
@keyframes fmp-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .fmp-match-top-row {
        gap: 5px; /* Reduce gap */
    }
    .fmp-team-name-box {
        /*min-width: 100%!important;*/
         padding: 6px 10px; 
        font-size: 0.8em;
    }
    .fmp-team-logo-container {
        width: 40px;
        height: 40px;
    }
    .fmp-score {
        font-size: 1.2em;
        padding: 8px 15px;
        /*min-width: 60px;*/
    }
    .fmp-info-item {
        /*margin: 3px 8px;*/
        font-size: 0.80em;
    }
    .fmp-info-icon {
        font-size: 0.9em; /* Adjust FA icon size */
    }
    .fmp-team-side-icon {
        width: 18px;
        height: 18px;
        top: -8px;
        font-size: 10px; /* Adjust FA icon size */
        line-height: 14px; /* Adjust line height */
    }
}

@media (max-width: 480px) {
     .fmp-match-top-row {
        flex-direction: row; /* Stack elements vertically */
        gap: 6px;
        justify-content: center;
    }
    .fmp-team-name-box {
      /*   width: 80%; Adjust width */
        order: initial !important; /* Reset order */
        margin: 5px auto;
        padding: 5px 8px;
        width: 70px;
    }
     .fmp-team-logo-container {
        width: 30px;
        height: 30px;
        order: initial !important; /* Reset order */
        margin: 5px auto !important;
    }
    .fmp-match-result {
         order: initial !important; /* Reset order */
         margin: 10px 0;
         padding: 0 4px !important;
    }
    /* Re-order for mobile: Home Name, Home Logo, Score, Away Logo, Away Name */
     .fmp-home-team-box { order: 3; }
     .fmp-home-logo-container { order: 2; }
     .fmp-match-result { order: 3; }
     .fmp-away-logo-container { order: 4; }
     .fmp-away-team-box { order: 3; }

     .fmp-score {
        font-size: 1.1em;
        padding: 0px 12px;
    }

     .fmp-info-bar {
         flex-direction: column; /* Stack info items */
         align-items: flex-start; /* Align items left */
         gap: 5px;
     }
     .fmp-info-item {
         width: 100%;
         justify-content: flex-start;
         margin: 2px 0;
         font-size: 0.8em;
     }
     .fmp-info-icon {
        font-size: 0.85em; /* Adjust FA icon size */
    }
    .fmp-team-side-icon {
        width: 16px;
        height: 16px;
        top: -6px;
        font-size: 9px; /* Adjust FA icon size */
        line-height: 12px; /* Adjust line height */
    }
}

/* Frontend Tabs Styling (Optional - Keep or adjust) */
.fmp-frontend-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.fmp-frontend-tab-link {
    padding: 10px 15px;
    cursor: pointer;
    text-decoration: none;
    color: #007bff;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px; /* Overlap border */
}

.fmp-frontend-tab-link.active {
    font-weight: bold;
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    border-radius: 5px 5px 0 0;
}

.fmp-frontend-tab-content {
    display: none;
}

.fmp-frontend-tab-content.active {
    display: block;
}

.fmp-no-matches {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

