/* Blue Ridge Roster Widget Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

.brss-roster-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    z-index: 1;
    isolation: isolate;
}

/* Table Container */
.brss-roster-table-container {
    position: relative;
    background-color: #ffffff;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    z-index: 1;
}

/* Custom Scrollbar */
.brss-roster-table-container::-webkit-scrollbar {
    width: 8px;
}

.brss-roster-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.brss-roster-table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.brss-roster-table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Table Styles */
.brss-roster-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    margin: 0;
    table-layout: fixed;
}

/* Fixed Header */
.brss-table-header {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Disable sticky positioning on mobile */
@media (max-width: 768px) {
    .brss-table-header {
        position: static;
        z-index: auto;
    }
}

/* Header Styles */
.brss-roster-table thead th {
    background-color: #1e3a8a;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    padding: 16px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #ffffff;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.brss-roster-table thead th:last-child {
    border-right: none;
}

/* Body Styles */
.brss-roster-table tbody td {
    padding: 16px 20px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Column Widths */
.brss-roster-table th:nth-child(1),
.brss-roster-table td:nth-child(1) {
    width: 15%;
}

.brss-roster-table th:nth-child(2),
.brss-roster-table td:nth-child(2) {
    width: 10%;
}

.brss-roster-table th:nth-child(3),
.brss-roster-table td:nth-child(3) {
    width: 25%;
}

.brss-roster-table th:nth-child(4),
.brss-roster-table td:nth-child(4) {
    width: 25%;
}

.brss-roster-table th:nth-child(5),
.brss-roster-table td:nth-child(5) {
    width: 10%;
}

.brss-roster-table th:nth-child(6),
.brss-roster-table td:nth-child(6) {
    width: 15%;
}

/* Headshot Column */
.brss-headshot-cell {
    text-align: center;
}

.brss-player-headshot {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    margin: 0 auto;
    display: block;
}

.brss-player-placeholder {
    width: 40px;
    height: 40px;
    background-color: #2563eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    margin: 0 auto;
}

.brss-spartan-icon {
    font-size: 20px;
}

/* Number Column */
.brss-number-cell {
    text-align: center;
}

.brss-player-number {
    font-weight: bold;
    color: #2563eb;
    font-size: 14px;
}

/* Alternating Row Colors */
.brss-roster-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.brss-roster-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Hover Effect */
.brss-roster-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* No Roster Message */
.brss-no-roster {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-style: italic;
}

.brss-no-roster p {
    margin: 0;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .brss-roster-widget {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        position: relative;
        z-index: 1;
    }
    
    .brss-roster-table-container {
        font-size: 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: 100%;
        position: relative;
        z-index: 1;
    }
    
    .brss-table-header {
        position: relative;
        z-index: 1;
    }
    
    .brss-roster-table {
        min-width: 600px; /* Ensure table doesn't get too compressed */
    }
    
    .brss-roster-table thead th,
    .brss-roster-table tbody td {
        padding: 12px 6px;
        white-space: nowrap;
    }
    
    .brss-player-headshot,
    .brss-player-placeholder {
        width: 32px;
        height: 32px;
        object-fit: cover;
    }
    
    .brss-spartan-icon {
        font-size: 16px;
    }
    
    .brss-player-number {
        font-size: 12px;
    }
    
    /* Adjust column widths for mobile */
    .brss-roster-table th:nth-child(1),
    .brss-roster-table td:nth-child(1) {
        width: 12%;
    }
    
    .brss-roster-table th:nth-child(2),
    .brss-roster-table td:nth-child(2) {
        width: 8%;
    }
    
    .brss-roster-table th:nth-child(3),
    .brss-roster-table td:nth-child(3) {
        width: 30%;
    }
    
    .brss-roster-table th:nth-child(4),
    .brss-roster-table td:nth-child(4) {
        width: 30%;
    }
    
    .brss-roster-table th:nth-child(5),
    .brss-roster-table td:nth-child(5) {
        width: 10%;
    }
    
    .brss-roster-table th:nth-child(6),
    .brss-roster-table td:nth-child(6) {
        width: 10%;
    }
}


/* Card Layout for Small Mobile Screens */
@media (max-width: 480px) {
    .brss-roster-widget {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow: visible;
        position: relative;
        z-index: 1;
    }
    
    .brss-roster-table-container {
        overflow-x: visible;
        padding: 0 10px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        position: relative;
        z-index: 1;
    }
    
    .brss-table-header {
        position: relative;
        z-index: 1;
    }
    
    .brss-roster-table,
    .brss-roster-table thead,
    .brss-roster-table tbody,
    .brss-roster-table th,
    .brss-roster-table td,
    .brss-roster-table tr {
        display: block;
    }
    
    .brss-roster-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .brss-roster-table tr {
        border: 1px solid #e5e7eb;
        margin-bottom: 15px;
        padding: 15px;
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .brss-roster-table td {
        border: none;
        position: relative;
        padding: 8px 0;
        text-align: left;
        white-space: normal;
        display: flex;
        align-items: center;
        margin-bottom: 8px;
        width: 100%;
    }
    
    .brss-roster-table td:last-child {
        margin-bottom: 0;
    }
    
    .brss-roster-table td:before {
        content: attr(data-label);
        font-weight: bold;
        color: #1e3a8a;
        font-size: 12px;
        text-transform: uppercase;
        min-width: 80px;
        margin-right: 10px;
        flex-shrink: 0;
    }
    
    .brss-headshot-cell {
        padding: 0;
        text-align: center;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .brss-headshot-cell:before {
        content: "";
        display: none;
    }
    
    .brss-headshot-cell .brss-player-headshot,
    .brss-headshot-cell .brss-player-placeholder {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        margin: 0 auto;
    }
    
    .brss-number-cell:before {
        content: "Number:";
    }
    
    .brss-name-cell:before {
        content: "Name:";
    }
    
    .brss-hometown-cell:before {
        content: "Hometown:";
    }
    
    .brss-year-cell:before {
        content: "Year:";
    }
    
    .brss-position-cell:before {
        content: "Position:";
    }
    
    .brss-player-number {
        font-size: 14px;
        font-weight: bold;
    }
}
