/* ========================================
   HORIZONTAL MATCH CARD (LIST VIEW)
   Replaces the grid card style
======================================== */

.matches-grid {
    /* Switch to single column for list view */
    grid-template-columns: 1fr !important;
    gap: var(--spacing-md);
}

.match-card {
    display: flex !important;
    flex-direction: column;
    padding: 0 !important;
    /* Reset padding to handle internal layout */
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

/* Link covering the whole card */
.match-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

/* Main Row: Teams and Score */
.match-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
}

/* Team Styling */
.team {
    flex-direction: row !important;
    /* Horizontal team layout */
    gap: var(--spacing-md);
    width: 35%;
    /* Fixed width for stability */
}

/* In RTL, team-right is naturally first, but let's be explicit if needed */
.team-home {
    justify-content: flex-start;
    /* Align home team to start */
}

.team-away {
    justify-content: flex-start;
    /* Align away team to start (left) */
    flex-direction: row !important;
    /* Logo first, name second (HTML order) */
}

.team-logo {
    width: 45px !important;
    height: 45px !important;
}

.team-name {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Center Score & Status */
.match-center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    min-width: 120px;
}

.match-score {
    font-size: 1.8rem !important;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0 !important;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: white;
    font-weight: bold;
}

.status-live {
    background-color: #e53e3e;
}

.status-upcoming {
    background-color: #3182ce;
}

.status-finished {
    background-color: #718096;
}

/* Bottom Info Bar */
.match-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f7fafc;
    /* Slightly darker than card */
    padding: var(--spacing-sm) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

[data-theme="dark"] .match-info-bar {
    background-color: rgba(255, 255, 255, 0.05);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .team-name {
        display: none;
        /* Hide names on very small screens if needed, or reduce size */
    }

    .team {
        width: auto;
    }

    .match-center-info {
        min-width: 80px;
    }

    .info-item span {
        display: none;
        /* Hide text keep icons on mobile? or just font-size reduce */
    }

    .info-item span {
        font-size: 0.75rem;
        display: inline;
    }

    .match-info-bar {
        padding: var(--spacing-sm);
    }
}