/**
 * Dota 2 Team Leaderboard CSS
 */

.dtl-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.dtl-controls-container {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.dtl-search-container {
    margin-bottom: 15px;
    flex: 1;
    min-width: 250px;
    margin-right: 20px;
}

.dtl-search-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    width: 100%;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.dtl-search-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.dtl-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dtl-region-filter {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
    min-width: 140px;
    background-color: white;
    transition: border-color 0.2s ease;
}

.dtl-region-filter:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.dtl-table-responsive {
    overflow-x: auto;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dtl-teams-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    background-color: white;
}

.dtl-teams-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dtl-teams-table th,
.dtl-teams-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.dtl-teams-table th {
    font-weight: 600;
    border-bottom: 2px solid #cbd5e0;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

.dtl-teams-table th:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dtl-teams-table tr:nth-child(even) {
    background-color: #f8fafc;
}



.dtl-teams-table tr:hover td {
    color: #2d3748;
}

/* Rank cell styling */
.dtl-rank-cell {
    font-weight: bold;
    text-align: center;
    width: 60px;
    background-color: #f7fafc;
}

/* Top ranked teams styling */
.dtl-teams-table tr:nth-child(-n+3) .dtl-rank-cell {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #2d3436;
}

.dtl-teams-table tr:first-child .dtl-rank-cell {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
    font-size: 16px;
}

/* Team cell styling */
/*td.dtl-team-cell {
    display: flex;
    align-items: center;
    font-weight: 500;
    min-width: 200px;
	border: none;
}*/

.dtl-team-cell {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

.dtl-team-content {
    display: flex;
    align-items: center;
    font-weight: 500;
    min-width: 200px;
}

.dtl-team-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
	background-color: black;
}

.dtl-team-logo:hover {
    transform: scale(1.1);
}

.dtl-team-tag {
    font-weight: bold;
    color: #4a5568;
    background-color: #edf2f7;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    font-size: 12px;
    text-transform: uppercase;
}

.dtl-team-name {
    color: #2d3748;
}

/* Country flag styling */
.dtl-country-flag {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Rating styling */
.dtl-rating-tier1 {
    color: #38a169;
    font-weight: bold;
    background: linear-gradient(135deg, #68d391, #38a169);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dtl-rating-tier2 {
    color: #3182ce;
    font-weight: bold;
}

.dtl-rating-tier3 {
    color: #d69e2e;
    font-weight: bold;
}

.dtl-rating-low {
    color: #e53e3e;
}

/* Prize money styling */
.dtl-prize-money {
    font-weight: bold;
    color: #38a169;
}

/* Form styling */
.dtl-form {
    display: flex;
    gap: 2px;
    align-items: center;
}

.dtl-form-win {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.dtl-form-loss {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.dtl-no-form {
    color: #a0aec0;
    font-style: italic;
}

/* Sort icons styles */
.dtl-sort-icon {
    display: inline-block;
    width: 10px;
    height: 20px;
    margin-left: 8px;
    position: relative;
}

/* Default neutral state - both arrows visible */
.dtl-sort-icon::before {
    content: "▲";
    font-size: 12px;
    position: absolute;
    color: rgba(255, 255, 255, 0.5);
    top: -2px;
}

.dtl-sort-icon::after {
    content: "▼";
    font-size: 12px;
    position: absolute;
    color: rgba(255, 255, 255, 0.5);
    top: 8px;
}

/* Ascending sort state */
.dtl-sort-asc .dtl-sort-icon::before {
    color: #ffffff;
    font-size: 14px;
}

.dtl-sort-asc .dtl-sort-icon::after {
    content: "";
}

/* Descending sort state */
.dtl-sort-desc .dtl-sort-icon::before {
    content: "";
}

.dtl-sort-desc .dtl-sort-icon::after {
    color: #ffffff;
    font-size: 14px;
}

.dtl-updated-info {
    margin-top: 15px;
    font-size: 12px;
    color: #718096;
    text-align: right;
    font-style: italic;
}

.dtl-error {
    padding: 15px;
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #c53030;
    border-left: 4px solid #fc8181;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

/* Loading states */
.dtl-loading {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.dtl-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3182ce;
    border-radius: 50%;
    animation: dtl-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes dtl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip styling */
.dtl-tooltip {
    position: absolute;
    background: #2d3748;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 100;
    max-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    line-height: 1.4;
}

.dtl-tooltip::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}

/* Responsive design */
@media screen and (max-width: 992px) {
    .dtl-controls-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dtl-search-container {
        width: 100%;
        margin-right: 0;
    }
    
    .dtl-filter-container {
        width: 100%;
        justify-content: flex-start;
    }
    
    .dtl-region-filter {
        flex: 1;
        min-width: 120px;
    }
}

@media screen and (max-width: 768px) {
    .dtl-teams-table {
        font-size: 14px;
    }
    
    .dtl-teams-table th,
    .dtl-teams-table td {
        padding: 8px 10px;
    }
    
    .dtl-team-cell {
        min-width: 160px;
    }
    
    .dtl-team-logo {
        width: 24px;
        height: 24px;
    }
    
    .dtl-team-tag {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .dtl-country-flag {
        width: 16px;
        height: 12px;
    }
    
    .dtl-form-win,
    .dtl-form-loss {
        padding: 2px 4px;
        font-size: 10px;
    }
}

@media screen and (max-width: 576px) {
    .dtl-teams-table {
        font-size: 12px;
    }
    
    .dtl-filter-container {
        flex-direction: column;
    }
    
    .dtl-region-filter {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .dtl-team-cell {
        flex-direction: column;
        align-items: flex-start;
        min-width: 120px;
    }
    
    .dtl-team-logo {
        margin-bottom: 4px;
        margin-right: 0;
    }
    
    /* Hide less important columns on very small screens */
    .dtl-teams-table th:nth-child(6),
    .dtl-teams-table td:nth-child(6) {
        display: none;
    }
    
    .dtl-teams-table th:nth-child(7),
    .dtl-teams-table td:nth-child(7) {
        display: none;
    }
}

/* Print styles */
@media print {
    .dtl-controls-container {
        display: none;
    }
    
    .dtl-teams-table {
        border: 1px solid #000;
    }
    
    .dtl-teams-table th,
    .dtl-teams-table td {
        border: 1px solid #000;
    }
    
    .dtl-teams-table thead {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .dtl-updated-info {
        color: #000;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dtl-teams-table {
        border: 2px solid #000;
    }
    
    .dtl-teams-table th,
    .dtl-teams-table td {
        border: 1px solid #000;
    }
    
    .dtl-teams-table thead {
        background: #000 !important;
        color: #fff !important;
    }
    
    .dtl-form-win {
        background: #0f5132 !important;
    }
    
    .dtl-form-loss {
        background: #842029 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dtl-team-logo {
        transition: none;
    }
    
    .dtl-search-input,
    .dtl-region-filter,
    .dtl-teams-table th {
        transition: none;
    }
    
    .dtl-loading::after {
        animation: none;
    }
}