/**
 * Dota 2 Pro Matches CSS
 * Styles for matches display
 */

/* Container */
.dm-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.dm-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px;
    border-bottom: 3px solid #e94560;
}

.dm-title {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Table Responsive Wrapper */
.dm-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Matches Table */
.dm-matches-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

.dm-matches-table thead {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #ffffff;
}

.dm-matches-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e94560;
}

.dm-matches-table td {
    padding: 5px 2px 5px 20px;
    border-bottom: 1px solid #e8e8e8;
    font-size: 14px;
    color: #2d3748;
}

.dm-matches-table tbody tr {
    transition: background-color 0.2s ease;
}

.dm-matches-table tbody tr:hover {
    background-color: #f7fafc;
}

.dm-matches-table tbody tr:last-child td {
    border-bottom: none;
}

/* Date Column */
.dm-date {
    font-weight: 500;
    color: #4a5568;
    min-width: 120px;
    white-space: nowrap;
}

/* Tournament Column */
.dm-tournament {
    font-weight: 600;
    color: #2d3748;
    min-width: 150px;
}

/* Team Columns */
.dm-team {
    font-weight: 500;
    min-width: 150px;
    position: relative;
    padding-left: 20px;
}

.dm-radiant::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #92cc41;
}

.dm-dire::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #c23c2a;
}

/* Winner/Loser Styles */
.dm-winner {
    font-weight: 700;
    color: #2d3748;
    background-color: #f0fff4;
}

.dm-loser {
    color: #718096;
    opacity: 0.7;
}

/* Result Column */
.dm-result {
    font-weight: 600;
    min-width: 120px;
}

.dm-result:contains("Radiant") {
    color: #92cc41;
}

.dm-result:contains("Dire") {
    color: #c23c2a;
}

/* Duration Column */
.dm-duration {
    font-family: "Courier New", monospace;
    font-weight: 600;
    color: #4a5568;
    min-width: 80px;
}

/* Footer */
.dm-footer {
    padding: 15px 20px;
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.dm-updated-info {
    margin: 0;
    font-size: 12px;
    color: #718096;
    font-style: italic;
    text-align: right;
}

/* Error Message */
.dm-error {
    padding: 20px;
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #c53030;
    border-left: 4px solid #fc8181;
    margin: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.dm-error strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

/* No Matches Message */
.dm-no-matches {
    padding: 40px 20px;
    text-align: center;
    color: #718096;
}

.dm-no-matches p {
    margin: 0;
    font-size: 16px;
}

/* Loading State */
.dm-loading {
    padding: 40px 20px;
    text-align: center;
    color: #718096;
}

.dm-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3182ce;
    border-radius: 50%;
    animation: dm-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes dm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .dm-title {
        font-size: 20px;
    }
    
    .dm-matches-table th,
    .dm-matches-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
}

@media screen and (max-width: 768px) {
    .dm-header {
        padding: 15px;
    }
    
    .dm-title {
        font-size: 18px;
    }
    
    .dm-matches-table {
        font-size: 12px;
    }
    
    .dm-matches-table th,
    .dm-matches-table td {
        padding: 10px 8px;
    }
    
    /* Hide less important columns on mobile */
    .dm-tournament {
        display: none;
    }
    
    .dm-duration {
        display: none;
    }
}

@media screen and (max-width: 576px) {
    .dm-container {
        margin: 10px 0;
        border-radius: 4px;
    }
    
    .dm-header {
        padding: 12px;
    }
    
    .dm-title {
        font-size: 16px;
    }
    
    .dm-matches-table th,
    .dm-matches-table td {
        padding: 8px 6px;
    }
    
    .dm-team {
        min-width: 100px;
        font-size: 12px;
    }
    
    .dm-date {
        min-width: 80px;
        font-size: 11px;
    }
    
    .dm-result {
        min-width: 80px;
        font-size: 11px;
    }
    
    .dm-footer {
        padding: 10px 12px;
    }
    
    .dm-updated-info {
        font-size: 10px;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .dm-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .dm-header {
        background: #f0f0f0 !important;
        color: #000 !important;
        border-bottom: 2px solid #000;
    }
    
    .dm-title {
        color: #000 !important;
    }
    
    .dm-matches-table thead {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .dm-matches-table th {
        border-bottom: 2px solid #000;
    }
    
    .dm-matches-table td {
        border-bottom: 1px solid #000;
    }
    
    .dm-footer {
        border-top: 1px solid #000;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .dm-container {
        border: 2px solid #000;
    }
    
    .dm-matches-table {
        border: 2px solid #000;
    }
    
    .dm-matches-table th,
    .dm-matches-table td {
        border: 1px solid #000;
    }
    
    .dm-matches-table thead {
        background: #000 !important;
        color: #fff !important;
    }
    
    .dm-winner {
        background-color: #d4edda;
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .dm-matches-table tbody tr,
    .dm-loading::after {
        transition: none;
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dm-container {
        background: #1a202c;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .dm-matches-table {
        background-color: #1a202c;
    }
    
    .dm-matches-table td {
        color: #e2e8f0;
        border-bottom: 1px solid #2d3748;
    }
    
    .dm-matches-table tbody tr:hover {
        background-color: #2d3748;
    }
    
    .dm-tournament {
        color: #e2e8f0;
    }
    
    .dm-date {
        color: #cbd5e0;
    }
    
    .dm-winner {
        color: #e2e8f0;
        background-color: #22543d;
    }
    
    .dm-loser {
        color: #a0aec0;
    }
    
    .dm-footer {
        background-color: #2d3748;
        border-top: 1px solid #4a5568;
    }
    
    .dm-updated-info {
        color: #a0aec0;
    }
}

/* Accessibility Improvements */
.dm-matches-table th {
    position: relative;
}

.dm-matches-table tbody tr:focus-within {
    outline: 2px solid #3182ce;
    outline-offset: -2px;
}

/* Team indicators for better visibility */
.dm-radiant {
    border-left: 3px solid #92cc41;
}

.dm-dire {
    border-left: 3px solid #c23c2a;
}

/* Smooth scrolling for table */
.dm-table-responsive {
    scroll-behavior: smooth;
}

/* Tournament badge style (if needed) */
.dm-tournament-badge {
    display: inline-block;
    padding: 2px 8px;
    background-color: #edf2f7;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #4a5568;
    margin-left: 5px;
}
