/* Basic page structure */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #f5f7fa;
    height: 100%;
    width: 100%;
    overflow-x: auto; /* Allow horizontal scrolling when needed */
}

/* Page layout */
.page-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Side menu styling */
.side-menu {
    width: 60px;
    background-color: #2d3748;
    position: fixed;
    height: 100%;
    z-index: 100;
    overflow: hidden;
    transition: width 0.3s ease;
}

.side-menu:hover {
    width: 200px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.menu-item.active {
    background-color: #4a5568;
    border-left: 3px solid #2b6cb0;
}

.menu-item:hover {
    background-color: #4a5568;
}

.menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-text {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.side-menu:hover .menu-text {
    opacity: 1;
}

/* Main content area */
.main-content {
    flex-grow: 1;
    margin-left: 60px; /* Match side menu width */
    padding: 20px;
    box-sizing: border-box;
    max-width: calc(100% - 60px);
    overflow-x: auto;
}

/* Page header */
.page-header {
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    padding: 0;
}

/* Grid container - without card/container styles */
.grid-container {
    width: max-content; /* Allow grid to determine its own width */
    overflow-x: visible;
    margin-bottom: 20px;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f7fafc;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Fixed width grid styles - 80x80 */
.adp-grid {
    border-collapse: collapse;
    table-layout: fixed; /* Critical for fixed column widths */
}

.adp-grid td {
    border: 1px solid #e2e8f0;
    padding: 0;
    height: 80px !important;
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content from expanding cells */
    vertical-align: top;
}

.adp-grid .round-label {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    background-color: #f7fafc;
    text-align: center;
    font-weight: bold;
    color: #2d3748;
    position: relative;
}

/* Player slot styling with text overflow handling */
.adp-grid .player-slot {
    padding: 0.25rem;
    background-color: #f8f9fa;
    border-radius: 3px;
    overflow: hidden;
    height: 100%;
    position: relative;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.adp-grid .player-slot:hover {
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.adp-grid .slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.2rem;
}

.adp-grid .slot-number {
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    background-color: #2d3748;
    padding: 0.1rem 0.25rem;
    border-radius: 2px;
    z-index: 2;
    margin-left: 2px;
}

.adp-grid .position-rank {
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    padding: 0.1rem 0.25rem;
    border-radius: 2px;
    z-index: 2;
    margin-right: 2px;
}

/* Consistent text handling for all player info - WITH ROBOTO CONDENSED */
.adp-grid .player-first-name,
.adp-grid .player-last-name,
.adp-grid .player-team {
    width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0.1rem 0;
}

.adp-grid .player-first-name,
.adp-grid .player-last-name {
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif; /* Narrower font */
    font-weight: 600;
    font-size: 0.75rem;
}

.adp-grid .player-team {
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif; /* Narrower font */
    font-size: 0.7rem;
    color: #000000 !important; /* Black for better readability */
}

/* POSITION COLORS - SUNSET SAND QB */
.adp-grid .qb-bg {
    background-color: #CD5C5C; /* Sunset Sand (more red-tinted) */
}

.adp-grid .qb-bg .position-rank {
    background-color: #CD5C5C; /* Sunset Sand (more red-tinted) */
}

.adp-grid .rb-bg {
    background-color: #66c9a8; /* Softer pastel green */
}

.adp-grid .rb-bg .position-rank {
    background-color: #66c9a8; /* Softer pastel green */
}

.adp-grid .wr-bg {
    background-color: #6ba3d6; /* Already soft blue */
}

.adp-grid .wr-bg .position-rank {
    background-color: #6ba3d6; /* Already soft blue */
}

.adp-grid .te-bg {
    background-color: #F4A460; /* Sandy Brown - more orange */
}

.adp-grid .te-bg .position-rank {
    background-color: #F4A460; /* Sandy Brown - more orange */
}

/* Arrow styling */
.round-arrow-right,
.round-arrow-left {
    position: absolute;
    font-size: 1.5rem;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
    color: #4a5568;
    font-weight: bold;
}

.round-arrow-right {
    right: 8px;
}

.round-arrow-left {
    left: 8px;
}

.round-number {
    font-weight: bold;
    font-size: 1.2rem;
    color: #2d3748;
}

/* 3RR indicator - UPDATED: Back on round label, Round 2, bottom position */
.three-rr-marker {
    position: absolute;
    bottom: 2px; /* At bottom of round label cell */
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    color: white;
    background-color: #4a5568;
    font-size: 0.75rem;
    padding: 1px 5px;
    border-radius: 3px;
    z-index: 5;
}

/* Global Footer Styling */
.global-footer {
    background-color: #2d3748;
    color: #cbd5e0;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    margin-bottom: 1rem;
}

.footer-text p {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: white;
}

.footer-emojis {
    margin-top: 1rem;
    text-align: center;
}

.footer-emojis span {
    font-size: 1.2rem;
    letter-spacing: 0.25rem;
}

/* Pool Toggle (with rookies / no rookies) - segmented control above the controls area */
.pool-toggle {
    display: flex;
    margin-bottom: 16px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px;
    width: fit-content;
    gap: 4px;
}

.pool-toggle-btn {
    padding: 0.5rem 1.25rem;
    background: transparent;
    color: #4a5568;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pool-toggle-btn:hover {
    background: #edf2f7;
}

.pool-toggle-btn.active {
    background: #2d3748;
    color: white;
}

/* Search and filters area */
.controls-area {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-container {
    width: 100%;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.filter-btn:hover {
    background-color: #edf2f7;
}

.filter-btn.active {
    opacity: 1;
    box-shadow: 0 0 0 0.15rem rgba(0,0,0,0.15);
    border-color: transparent;
}

/* POSITION BADGE COLORS FOR FILTER BUTTONS - SUNSET SAND QB */
.filter-btn[data-position="QB"],
.position-badge.qb {
    background-color: #CD5C5C; /* Sunset Sand (more red-tinted) */
    color: white;
}

.filter-btn[data-position="RB"],
.position-badge.rb {
    background-color: #66c9a8; /* Softer pastel green */
    color: white;
}

.filter-btn[data-position="WR"],
.position-badge.wr {
    background-color: #6ba3d6; /* Already soft blue */
    color: white;
}

.filter-btn[data-position="TE"],
.position-badge.te {
    background-color: #F4A460; /* Sandy Brown - more orange */
    color: white;
}

/* ALL button and rookie filter */
.filter-btn[data-position="all"],
.filter-btn[data-position="rookie"] {
    background-color: #6c757d; /* Bootstrap gray */
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .side-menu {
        width: 50px;
    }

    .side-menu:hover {
        width: 180px;
    }

    .main-content {
        margin-left: 50px;
        max-width: calc(100% - 50px);
        padding: 10px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .pool-toggle-btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
    }
}
