/* Import Montserrat font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Football Matches Plugin Styles - Full Width */

.football-matches-container {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Apply Montserrat font to all text elements */
.football-matches-container,
.football-matches-container *,
.match-details-container,
.match-details-container * {
    font-family: 'Montserrat', sans-serif;
}

/* Mobile responsive margins */
@media (max-width: 768px) {
    .football-matches-container {
        margin: 0;
        padding: 0;
    }
    
    body {
        margin: 0 !important;
    }
    
    .header {
        margin: 0 !important;
        padding: 15px 10px !important;
    }
}

.matches-section {
    margin-bottom: 40px;
    width: 100%;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
    padding: 20px;
    background: transparent;
    border: none;
    width: 100%;
}

.live-matches .section-title {
    color: #101010;
}

.upcoming-matches .section-title {
    color: #101010;
}

.completed-matches .section-title {
    color: #101010;
}

/* Match Card Styles - Full Width */
.match-card {
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-top: 6px;
    margin-bottom: 6px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    min-height: 60px;
    width: 100%;
    border-bottom: 1px solid #e9ecef;
}

.match-card:hover {
    background: #c7c7c7;
    border-bottom: 1px solid #cfd0d2;
}

.match-card.live {
    background: #fbfafa;
    border: 1px solid #dee2e6;
}

.match-card.upcoming {
    background: #fbfafa;
    border: 1px solid #dee2e6;
}

.match-card.completed {
    background: #fbfafa;
    border: 1px solid #dee2e6;
}

.match-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 25px;
}

.match-time-competition {
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.match-time {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}

.match-competition {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.2;
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    justify-content: center;
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.team.home {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.team.away {
    justify-content: flex-start;
}

.team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
}

.team-name {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
}

.match-versus {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 10px;
}

.match-score {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 10px;
}

.watch-btn {
    background: #ffffff;
    border: 1px solid #81868d;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    white-space: nowrap;
}

.watch-btn:hover {
    background: #000000;
    color: #fff5f5;
}

.live-indicator {
    background: #ff0019;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 8px;
}

/* Match Details Styles - Full Width */
.match-details-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.match-header {
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: 30px 20px;
    margin-bottom: 0;
    text-align: center;
    width: 100%;
}

.match-header-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.match-header-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.match-header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.match-header-name {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.match-header-vs {
    font-size: 20px;
    font-weight: 600;
    color: #666;
}

.match-header-score {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.match-header-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 14px;
    color: #666;
}

.match-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 0;
    width: 100%;
}

.match-detail-card {
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: 20px;
    width: 100%;
}

.match-detail-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.match-detail-content {
    color: #666;
    line-height: 1.6;
}

/* Streaming Sections - Full Width */
.streaming-container {
    background: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 0;
    width: 100%;
}

.streaming-section {
    margin-bottom: 30px;
    width: 100%;
}

.streaming-section:last-child {
    margin-bottom: 0;
}

.streaming-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.streaming-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.stream-btn {
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    min-width: 80px;
}

/* Different colors for different stream types */
.iframe-btn {
    background: #0077f6;
}

.iframe-btn:hover,
.iframe-btn.active {
    background: #0077f6;
}

.hls-btn {
    background: #18e949;
}

.hls-btn:hover,
.hls-btn.active {
    background: #18e949;
}

.mobile-btn {
    background: #ff6a00;
}

.mobile-btn:hover,
.mobile-btn.active {
    background: #ff6a00;
}

/* Fallback for any stream-btn without specific class */
.stream-btn:not(.iframe-btn):not(.hls-btn):not(.mobile-btn) {
    background: #6c757d;
}

.stream-btn:not(.iframe-btn):not(.hls-btn):not(.mobile-btn):hover,
.stream-btn:not(.iframe-btn):not(.hls-btn):not(.mobile-btn).active {
    background: #5a6268;
}

.stream-player {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    min-height: 400px;
    width: 100%;
}

.stream-iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.stream-video {
    width: 100%;
    height: 400px;
    background: #000;
}

/* Mobile Styles - Full Width */
@media (max-width: 768px) {
    .football-matches-container {
        padding: 0;
    }
    
    .match-card {
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        min-height: auto;
        border-radius: 8;
        border: 1px solid #e9ecef;
        margin-top: 6px;
        margin-bottom: 6px;
    }
    
    .match-info {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        align-items: stretch;
    }
    
    /* Top section: Time and Competition side by side */
    .match-time-competition {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        min-width: auto;
        flex-direction: row;
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .match-time {
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .match-competition {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
    }
    
    /* Teams section: Centered layout */
    .match-teams {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        width: 100%;
        padding: 8px 0;
    }
    
    .team {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    /* Remove the complex home/away positioning - keep both teams the same */
    .team.home,
    .team.away {
        justify-content: center;
        flex-direction: row;
    }
    
    .team-logo {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        border-radius: 50%;
        object-fit: contain;
    }
    
    .team-name {
        font-size: 16px;
        font-weight: 500;
        color: #1f2937;
        white-space: nowrap;
        text-align: center;
    }
    
    /* VS or Score in the center */
    .match-versus {
        font-size: 16px;
        font-weight: 600;
        color: #6b7280;
        margin: 0;
        flex-shrink: 0;
        padding: 0 15px;
    }
    
    .match-score {
        font-size: 18px;
        font-weight: 700;
        color: #1f2937;
        margin: 0;
        flex-shrink: 0;
        background: #f3f4f6;
        padding: 6px 14px;
        border-radius: 8px;
        min-width: 60px;
        text-align: center;
    }
    
    /* Hide watch button on mobile */
    .watch-btn {
        display: none;
    }
    
    /* Live indicator adjustments */
    .live-indicator {
        margin-left: 0;
        margin-right: 0;
        font-size: 10px;
        padding: 3px 6px;
        border-radius: 4px;
        background: #ff061f;
        color: white;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    /* Match card background colors for different states */
    .match-card.live {
        background: #fbfafa;
        border: 1px solid #dee2e6;
    }
    
    .match-card.upcoming {
        background: #fbfafa;
        border: 1px solid #dee2e6;
    }
    
    .match-card.completed {
        background: #fbfafa;
        border: 1px solid #dee2e6;
    }
    
    /* Other mobile optimizations */
    .match-header {
        padding: 20px 15px;
    }
    
    .match-header-teams {
        gap: 15px;
    }
    
    .match-header-logo {
        width: 50px;
        height: 50px;
    }
    
    .match-header-name {
        font-size: 18px;
        text-align: center;
    }
    
    .match-header-score {
        font-size: 24px;
    }
    
    .match-header-info {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }
    
    .match-details-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .streaming-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .stream-btn {
        flex: 1;
        min-width: 70px;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .stream-player {
        min-height: 300px;
    }
    
    .stream-iframe,
    .stream-video {
        height: 300px;
    }
    
    .streaming-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .match-card {
        padding: 10px;
        gap: 14px;
        margin-top: 6px;
        margin-bottom: 6px;

        background: #f5f5f5;
        border: 1px solid #e8e8e8;
        border-radius: 8px;
    
        
    }
    
    .team-logo {
        width: 28px;
        height: 28px;
    }
    
    .team-name {
        font-size: 15px;
    }
    
    .match-time {
        font-size: 13px;
    }
    
    .match-competition {
        font-size: 13px;
    }
    
    .match-versus {
        font-size: 15px;
        padding: 0 12px;
    }
    
    .match-score {
        font-size: 16px;
        padding: 5px 12px;
    }
    
    .match-teams {
        gap: 15px;
    }
    
    .streaming-container {
        padding: 12px;
    }
}

/* Loading and Error States */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 0;
    margin: 20px 0;
    text-align: center;
    border: none;
}

.no-matches {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Status Message Styles */
.status-message {
    text-align: center;
    padding: 40px 20px;
    border-radius: 0;
    margin: 0;
    border: none;
    width: 100%;
}

.status-message h3 {
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.status-message p {
    font-size: 16px;
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
}

.coming-soon {
    background: #f0f9ff;
    border: none;
    color: #1e40af;
}

.coming-soon h3 {
    color: #1e40af;
}

.match-ended {
    background: #f0fdf4;
    border: none;
    color: #166534;
}

.match-ended h3 {
    color: #166534;
}

.match-time-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 6px;
    display: inline-block;
    font-size: 14px;
    color: #374151;
}

.stream-alert {
    background: #f0f9ff;
    border: none;
    border-radius: 0;
    padding: 12px 16px;
    margin-top: 15px;
    text-align: center;
    width: 100%;
}

.stream-alert p {
    margin: 0;
    font-size: 14px;
    color: #1e40af;
    font-weight: 500;
}

@media (max-width: 768px) {
    .stream-alert p {
        font-size: 13px;
    }
}