/**
 * Match Result Plugin - Frontend Styles
 * Complete styling for match result cards, grid layout, and slider
 */

/* ============================================
   Wrapper & Container
   ============================================ */

.match-results-wrapper {
    margin: 30px 0;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.match-results-wrapper * {
    box-sizing: border-box;
}

/* ============================================
   Grid Layout
   ============================================ */

.match-results-grid .match-results-container {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
}

@media (max-width: 1200px) {
    .match-results-grid .match-results-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .match-results-grid .match-results-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   Slider Layout
   ============================================ */

.match-results-slider {
    padding: 0 20px;
}

.match-results-slider .match-results-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    gap: 20px;
}

.match-results-slider .match-result-card {
    min-width: 45%;
    flex-shrink: 0;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ============================================
   Match Result Card
   ============================================ */

.match-result-card {
    
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.match-results-grid .match-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.match-card-inner {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
}

/* ============================================
   Teams Layout
   ============================================ */

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
	margin-top: 30px;
}

span.tournament-badge {
    font-weight: bold;
}

.team {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

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

.team-2 {
    justify-content: flex-end;
}

/* ============================================
   Team Logo
   ============================================ */

.team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.match-results-grid .match-result-card:hover .team-logo {
    transform: scale(1.05);
}

/* ============================================
   Team Info
   ============================================ */

.team-info {
    text-align: left;
    min-width: 0; /* Allow text truncation if needed */
}

.team-2 .team-info {
    text-align: right;
}

.team-name {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
}

.team-score {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.2;
}

.score-runs {
    font-size: 32px;
    color: #667eea;
    font-weight: 900;
}

.score-wickets {
    font-size: 20px;
    color: #718096;
    margin-left: 5px;
    font-weight: 600;
}

.team-overs {
    margin: 0;
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* ============================================
   Cricket Ball (VS)
   ============================================ */

.match-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    flex-shrink: 0;
}

.cricket-ball {
    width: 50px;
    height: 50px;
    animation: spin 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Pause animation on hover for grid cards */
.match-results-grid .match-result-card:hover .cricket-ball {
    animation-play-state: paused;
}

/* ============================================
   Match Statement
   ============================================ */

.match-statement {
    background: linear-gradient(135deg, #fdb80b 0%, #ff9800 100%);
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.match-statement p {
    margin: 0;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.5;
}

/* ============================================
   Slider Navigation Dots
   ============================================ */

.slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 0;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
    outline: none;
}

.slider-dots .dot:hover {
    background: #a0aec0;
    transform: scale(1.1);
}

.slider-dots .dot.active {
    background: #667eea;
    width: 30px;
    border-radius: 6px;
}

.slider-dots .dot:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ============================================
   Responsive Design - Tablet
   ============================================ */

@media (max-width: 1024px) {
    .match-result-card {
        padding: 25px;
    }
    
    .match-card-inner {
        padding: 20px;
    }
    
    .team-logo {
        width: 70px;
        height: 70px;
    }
    
    .team-name {
        font-size: 17px;
    }
    
    .score-runs {
        font-size: 28px;
    }
    
    .score-wickets {
        font-size: 18px;
    }
}

/* ============================================
   Responsive Design - Mobile
   ============================================ */

@media (max-width: 768px) {
    .match-results-wrapper {
        margin: 20px 0;
    }
    
    .match-results-slider {
        padding: 0 10px;
    }
    
    .match-result-card {
        padding: 20px;
    }
    
    .match-card-inner {
        padding: 15px;
    }
    
    .match-teams {
        gap: 10px;
    }
    
    .team {
        gap: 10px;
    }
    
    .team-logo {
        width: 60px;
        height: 60px;
        padding: 8px;
    }
    
    .team-name {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .team-score {
        font-size: 18px;
        margin-bottom: 3px;
    }
    
    .score-runs {
        font-size: 24px;
    }
    
    .score-wickets {
        font-size: 16px;
        margin-left: 3px;
    }
    
    .team-overs {
        font-size: 12px;
    }
    
    .cricket-ball {
        width: 40px;
        height: 40px;
    }
    
    .match-vs {
        min-width: 50px;
    }
    
    .match-statement {
        padding: 12px 15px;
    }
    
    .match-statement p {
        font-size: 13px;
    }
    
    .slider-dots {
        gap: 8px;
        margin-top: 15px;
    }
    
    .slider-dots .dot {
        width: 10px;
        height: 10px;
    }
    
    .slider-dots .dot.active {
        width: 25px;
    }
}

/* ============================================
   Responsive Design - Extra Small Mobile
   ============================================ */

@media (max-width: 480px) {
    .match-result-card {
        padding: 15px;
    }
    
    .match-card-inner {
        padding: 12px;
    }
    
    .team-logo {
        width: 50px;
        height: 50px;
        padding: 6px;
    }
    
    .team-name {
        font-size: 13px;
    }
    
    .score-runs {
        font-size: 20px;
    }
    
    .score-wickets {
        font-size: 14px;
    }
    
    .cricket-ball {
        width: 35px;
        height: 35px;
    }
    
    .match-vs {
        min-width: 40px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .match-results-slider .match-results-container {
        display: block !important;
        transform: none !important;
    }
    
    .match-results-slider .match-result-card {
        min-width: 45%;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .slider-dots {
        display: none !important;
    }
    
    .cricket-ball {
        animation: none !important;
    }
}

/* ============================================
   Accessibility
   ============================================ */

/* Focus styles for keyboard navigation */
.match-results-wrapper:focus {
    outline: 2px solid #667eea;
    outline-offset: 4px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .match-results-slider .match-results-container,
    .match-result-card,
    .team-logo,
    .slider-dots .dot {
        transition: none !important;
    }
    
    .cricket-ball {
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .match-result-card {
        border: 2px solid #000;
    }
    
    .team-logo {
        border: 3px solid #000;
    }
    
    .slider-dots .dot {
        border: 2px solid #000;
    }
}


/* Slider Arrow Navigation */
.match-results-slider {
    position: relative;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-arrow-prev {
    left: 20px;
}

.slider-arrow-next {
    right: 20px;
}

.slider-arrow svg {
    color: #333;
}

/* Hide arrows on mobile */
@media (max-width: 768px) {
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
    
    .slider-arrow-prev {
        left: 10px;
    }
    
    .slider-arrow-next {
        right: 10px;
    }
}