/**
 * Match Reports & Previews Widget Styles - Updated Design
 * BTFC Admin Plugin
 * 
 * Modern match card layout matching the news widget design
 * Features: Large header image, tag overlay, bold headlines, clean typography
 */

/* ============================================
   Container and Layout
   ============================================ */

.btfc-match-reports-widget {
    margin: 10px 0;
}

.btfc-match-reports-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2D398C;
    text-align: center;
}

/* Grid Layout */
.btfc-matches-container {
    display: grid;
    gap: 20px;
}

.btfc-matches-container.btfc-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.btfc-matches-container.btfc-layout-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.btfc-matches-container.btfc-layout-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.btfc-matches-container.btfc-layout-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.btfc-matches-container.btfc-layout-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* List Layout */
.btfc-matches-container.btfc-layout-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Carousel Layout */
.btfc-matches-container.btfc-layout-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #FFC10C #f0f0f0;
}

.btfc-matches-container.btfc-layout-carousel::-webkit-scrollbar {
    height: 8px;
}

.btfc-matches-container.btfc-layout-carousel::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.btfc-matches-container.btfc-layout-carousel::-webkit-scrollbar-thumb {
    background: #FFC10C;
    border-radius: 4px;
}

.btfc-matches-container.btfc-layout-carousel::-webkit-scrollbar-thumb:hover {
    background: #e6a800;
}

/* ============================================
   Match Card - New Design
   ============================================ */

.btfc-match-card {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.btfc-match-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Result-based styling */
.btfc-match-card.win {
    border-left: 4px solid #28a745;
}

.btfc-match-card.loss {
    border-left: 4px solid #dc3545;
}

.btfc-match-card.draw {
    border-left: 4px solid #ffc107;
}

/* ============================================
   Image Container with Tag Overlay
   ============================================ */

.btfc-match-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.btfc-match-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.btfc-match-card:hover .btfc-match-image {
    transform: scale(1.05);
}

.btfc-match-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d398c, #1e2a5a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btfc-placeholder-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Match Type Tag Overlay */
.btfc-match-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #2d398c;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* ============================================
   Content Section
   ============================================ */

.btfc-match-content {
    padding: 25px;
    background: #f8f9fa;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Match Headline */
.btfc-match-headline {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #2d398c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btfc-match-headline a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btfc-match-headline a:hover {
    color: #1e2a5a;
}

/* Match Summary/Details */
.btfc-match-summary {
    margin: 0 0 20px 0;
}

.btfc-match-detail {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
    font-weight: 400;
}

.btfc-match-detail strong {
    color: #2d398c;
    font-weight: 600;
}

/* Read More Link */
.btfc-match-read-more {
    margin: 0 0 20px 0;
}

.btfc-read-more-link {
    color: #2d398c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.btfc-read-more-link:hover {
    color: #1e2a5a;
    text-decoration: underline;
}

/* Date Separator */
.btfc-match-date-separator {
    height: 1px;
    background: #e5e5e5;
    margin: 0 0 15px 0;
}

/* Date */
.btfc-match-date {
    font-size: 14px;
    color: #999999;
    font-weight: 400;
    text-transform: capitalize;
}

/* ============================================
   List Layout Specific Styles
   ============================================ */

.btfc-layout-list .btfc-match-card {
    flex-direction: row;
    align-items: stretch;
}

.btfc-layout-list .btfc-match-image-container {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.btfc-layout-list .btfc-match-content {
    flex: 1;
}

/* ============================================
   Carousel Layout Specific Styles
   ============================================ */

.btfc-layout-carousel .btfc-match-card {
    min-width: 350px;
    flex-shrink: 0;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .btfc-match-reports-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .btfc-matches-container.btfc-layout-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btfc-match-image-container {
        height: 250px;
    }
    
    .btfc-match-headline {
        font-size: 20px;
    }
    
    .btfc-match-content {
        padding: 20px;
    }
    
    .btfc-match-tag {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .btfc-layout-list .btfc-match-card {
        flex-direction: column;
    }
    
    .btfc-layout-list .btfc-match-image-container {
        width: 100%;
        height: 200px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .btfc-match-image-container {
        height: 200px;
    }
    
    .btfc-match-headline {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .btfc-match-content {
        padding: 15px;
    }
    
    .btfc-match-detail {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .btfc-match-tag {
        top: 8px;
        right: 8px;
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .btfc-read-more-link {
        font-size: 13px;
    }
    
    .btfc-match-date {
        font-size: 13px;
    }
    
    .btfc-layout-carousel .btfc-match-card {
        min-width: 280px;
    }
}

/* ============================================
   No Matches Message
   ============================================ */

.btfc-no-matches {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

/* ============================================
   Loading State
   ============================================ */

.btfc-match-reports-widget.loading .btfc-matches-container {
    opacity: 0.6;
    pointer-events: none;
}

.btfc-match-reports-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FFC10C;
    border-radius: 50%;
    animation: btfc-spin 1s linear infinite;
}

@keyframes btfc-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   Accessibility
   ============================================ */

.btfc-read-more-link:focus {
    outline: 3px solid #FFC10C;
    outline-offset: 2px;
}

.btfc-match-card:focus-within {
    outline: 2px solid #FFC10C;
    outline-offset: 2px;
}

/* ============================================
   Dark Mode Support
   ============================================ */

@media (prefers-color-scheme: dark) {
    .btfc-match-card {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .btfc-match-content {
        background: #2a2a2a;
    }
    
    .btfc-match-headline {
        color: #ffffff;
    }
    
    .btfc-match-headline a:hover {
        color: #cccccc;
    }
    
    .btfc-match-detail {
        color: #cccccc;
    }
    
    .btfc-match-detail strong {
        color: #ffffff;
    }
    
    .btfc-read-more-link {
        color: #4a9eff;
    }
    
    .btfc-read-more-link:hover {
        color: #6bb6ff;
    }
    
    .btfc-match-date {
        color: #999999;
    }
    
    .btfc-match-date-separator {
        background: #333333;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .btfc-match-reports-widget {
        break-inside: avoid;
    }
    
    .btfc-match-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btfc-read-more-link {
        display: none;
    }
}