/* WP Lịch Thi Đấu - CSS Styles */

/* Container chính */
.wp-lichthidau-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Card trận đấu */
.wp-lichthidau-match-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wp-lichthidau-match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Header với ngày giờ */
.wp-lichthidau-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

.wp-lichthidau-match-date {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.wp-lichthidau-match-time {
    font-size: 14px;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Thông tin giải đấu */
.wp-lichthidau-match-competition {
    text-align: center;
    margin-bottom: 20px;
}

.wp-lichthidau-competition-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 2px;
}

.wp-lichthidau-competition-area {
    display: block;
    font-size: 12px;
    color: #95a5a6;
}

/* Thông tin đội bóng */
.wp-lichthidau-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.wp-lichthidau-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.wp-lichthidau-team-crest {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-lichthidau-team-crest img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wp-lichthidau-team-crest-placeholder {
    width: 50px;
    height: 50px;
    background: #ecf0f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #95a5a6;
    font-size: 20px;
}

.wp-lichthidau-team-name {
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.3;
    word-break: break-word;
}

/* VS và tỷ số */
.wp-lichthidau-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 15px;
    min-width: 60px;
}

.wp-lichthidau-vs-text {
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 6px 12px;
    border-radius: 20px;
}

.wp-lichthidau-score {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.wp-lichthidau-home-score,
.wp-lichthidau-away-score {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 30px;
    text-align: center;
}

.wp-lichthidau-separator {
    color: #7f8c8d;
    font-weight: 600;
}

/* Thông tin bổ sung */
.wp-lichthidau-match-venue,
.wp-lichthidau-match-referee {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #7f8c8d;
}

.wp-lichthidau-venue-icon,
.wp-lichthidau-referee-icon {
    margin-right: 6px;
    font-size: 14px;
}

.wp-lichthidau-venue-name,
.wp-lichthidau-referee-name {
    font-weight: 500;
}

/* Trạng thái trận đấu */
.wp-lichthidau-match-status {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ecf0f1;
}

.wp-lichthidau-status-text {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
}

.wp-lichthidau-status-SCHEDULED .wp-lichthidau-status-text {
    background: #e8f5e8;
    color: #27ae60;
}

.wp-lichthidau-status-LIVE .wp-lichthidau-status-text,
.wp-lichthidau-status-IN_PLAY .wp-lichthidau-status-text {
    background: #ffe8e8;
    color: #e74c3c;
    animation: pulse 2s infinite;
}

.wp-lichthidau-status-FINISHED .wp-lichthidau-status-text {
    background: #f0f0f0;
    color: #7f8c8d;
}

.wp-lichthidau-status-POSTPONED .wp-lichthidau-status-text,
.wp-lichthidau-status-SUSPENDED .wp-lichthidau-status-text {
    background: #fff3cd;
    color: #856404;
}

.wp-lichthidau-status-CANCELLED .wp-lichthidau-status-text {
    background: #f8d7da;
    color: #721c24;
}

/* Animation cho trận đấu đang diễn ra */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Thông báo lỗi và không có dữ liệu */
.wp-lichthidau-error,
.wp-lichthidau-no-matches {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
    margin: 20px 0;
}

.wp-lichthidau-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-lichthidau-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 10px;
    }
    
    .wp-lichthidau-match-card {
        padding: 12px;
    }
    
    .wp-lichthidau-team-crest {
        width: 30px;
        height: 30px;
    }
    
    .wp-lichthidau-team-crest-placeholder {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .wp-lichthidau-team-name {
        font-size: 11px;
    }
    
    .wp-lichthidau-vs {
        margin: 0 8px;
        min-width: 40px;
    }
    
    .wp-lichthidau-vs-text {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Mobile specific layout - Force horizontal teams */
@media (max-width: 600px) {
    .wp-lichthidau-teams {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }
    
    .wp-lichthidau-team {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        flex: 1 !important;
        text-align: center !important;
    }
    
    .wp-lichthidau-vs {
        margin: 0 8px !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    .wp-lichthidau-container {
        padding: 10px 5px;
    }
    
    .wp-lichthidau-match-card {
        padding: 12px;
    }
    
    .wp-lichthidau-match-header {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        margin-bottom: 12px;
    }
    
    /* Force mobile layout for teams */
    .wp-lichthidau-teams {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    
    .wp-lichthidau-vs {
        margin: 0 8px !important;
        order: 0 !important;
        flex-shrink: 0 !important;
        min-width: 40px !important;
    }
    
    .wp-lichthidau-team {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        flex: 1 !important;
        text-align: center !important;
        min-width: 0 !important;
    }
    
    .wp-lichthidau-team-crest {
        margin-bottom: 0 !important;
        width: 28px !important;
        height: 28px !important;
        flex-shrink: 0 !important;
    }
    
    .wp-lichthidau-team-crest-placeholder {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
    
    .wp-lichthidau-team-name {
        font-size: 11px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .wp-lichthidau-vs-text {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }
    
    .wp-lichthidau-match-competition {
        margin-bottom: 12px;
    }
    
    .wp-lichthidau-match-venue,
    .wp-lichthidau-match-referee {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .wp-lichthidau-match-status {
        margin-top: 8px;
        padding-top: 8px;
    }
}

/* Force mobile layout override */
@media screen and (max-width: 600px) {
    .wp-lichthidau-match-card .wp-lichthidau-teams {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    
    .wp-lichthidau-match-card .wp-lichthidau-team {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 !important;
        text-align: center !important;
        min-width: 0 !important;
    }
    
    .wp-lichthidau-match-card .wp-lichthidau-vs {
        margin: 0 8px !important;
        flex-shrink: 0 !important;
        order: 0 !important;
    }
    
    .wp-lichthidau-match-card .wp-lichthidau-team-crest {
        margin-bottom: 0 !important;
        width: 28px !important;
        height: 28px !important;
    }
    
    .wp-lichthidau-match-card .wp-lichthidau-team-name {
        font-size: 11px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        word-break: break-word !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wp-lichthidau-match-card {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .wp-lichthidau-match-header {
        border-bottom-color: #34495e;
    }
    
    .wp-lichthidau-match-date {
        color: #ecf0f1;
    }
    
    .wp-lichthidau-match-time {
        background: #34495e;
        color: #bdc3c7;
    }
    
    .wp-lichthidau-competition-name {
        color: #ecf0f1;
    }
    
    .wp-lichthidau-team-name {
        color: #ecf0f1;
    }
    
    .wp-lichthidau-vs-text {
        background: #34495e;
        color: #bdc3c7;
    }
    
    .wp-lichthidau-match-status {
        border-top-color: #34495e;
    }
}
