/* General styles to reset margin/padding */
body,
html {
  margin: 0;
  padding: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  height: 100%;
  background-color: #f5f5f5;
  box-sizing: border-box;
}

/* Container to hold both sections */
.container {
  display: grid;
  grid-template-columns: clamp(180px, 15vw, 240px) 1fr;
  gap: 5px;
  padding: 5px;
  min-height: 100vh;
  height: 100%;
  box-sizing: border-box;
}

:root {
  /* ==== Light Theme Colors ==== */
  --color-bg-main: #ffffff;   /* main page background */
  --color-bg-sidebar: #eaeaea; /* sidebar background (your pick) */
  --color-border: #d0d0d0;    /* divider between sidebar and main */
  --color-text: #111111;      /* primary text */
  --color-text-muted: #555555; /* secondary text (headers, notes) */
  --color-hover: rgba(0,0,0,0.06); /* hover highlight */
  --color-accent: #2ea043;    /* optional accent (green, matches NFL-ish theme) */
}

.left-section {
  background-color: var(--color-bg-sidebar);
  color: var(--color-text);
  border-radius: 12px;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  position: relative;
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto
}

.nav-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  margin: 12px 4px 6px;
  color: var(--color-text-muted);
  text-align: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li a {
  display: block;
  padding: 3px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.75rem;
  transition: background 0.2s ease;
}

/* Hover / focus states */
.nav-list li a:hover,
.nav-list li a:focus {
  background: var(--color-hover);
  outline: none;
}

.nav-list li a.active {
  border-left: 4px solid var(--color-accent);
  background: rgba(46, 160, 67, 0.08);
}

/* ===== Spacing between nav groups ===== */
.nav-group + .nav-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.flyout-heading {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: #666;          /* muted gray */
  margin: 8px 0 4px;    /* spacing above and below */
  cursor: default;      /* show it's not clickable */
  pointer-events: none; /* prevents accidental clicking/hover */
}



/* The list item containing the flyout */
.has-flyout { position: relative; }

/* The flyout panel that appears to the right of the sidebar */
.flyout {
  position: absolute;
  top: 0;
  left: 100%;                 /* sit immediately to the right of sidebar */
  margin-left: 10px;          /* gap between sidebar and panel */
  width: 300px;
  max-height: 70vh;
  background: #fff;
  color: #111;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  padding: 10px;
  overflow: auto;
  display: none;              
  z-index: 1000;            
}

/* Show on hover OR keyboard focus */
.has-flyout:hover .flyout,
.has-flyout:focus-within .flyout {
  display: block;
}


/* Flyout list styling */
.flyout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: 4px 12px;             
}

.flyout-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

.flyout-list a:hover,
.flyout-list a:focus {
  background: #f3f4f6;
  outline: none;
}

/* Optional: reduce motion users */
@media (prefers-reduced-motion: reduce) {
  .flyout { transition: none; }
}

/* ===== Optional: scrollbar styling (Chrome/Edge/WebKit) ===== */
.left-section nav::-webkit-scrollbar {
  width: 6px;
}
.left-section nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
}
.left-section nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}

.right-section {
  background: #fff;
  padding: 0px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Accessibility helper */
.visually-hidden {position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%);}

.page-header {display: flex; justify-content: space-between; align-items: center; }

.page-title h1 { margin: 0; font-size: 22px; }
.page-title p  { margin: 4px 0 0; color: #666; }

.wrap { border-bottom: 3px solid #e5e7eb; background: #f3f3f3; border-radius: 18px; box-shadow: 0 2px 6px rgba(0,0,0,0.08); padding: 0px 5px; ;}

.team-image,.team-name,.team-record{text-align: center; margin: 0; padding: 0;}
.team-name{font-size: 1.15rem;font-weight: 700;color: #111827;margin-top: 8px;}
.team-record{font-size: 0.9rem;color: #6b7280;margin-top: 1px;}
.team-logo-large{height: 150px; max-width: 100%; object-fit: contain;}

.team-cell {display: flex; align-items: center; gap: 8px; justify-content: center;}
.team-logo {width: 20px; height: auto; border-radius: 4px; object-fit: cover;}
.team-link { display: flex;}
.team-link, .loglink {color: #2563eb;text-decoration: none; }
.player-link, .loglink {color: #2563eb;text-decoration: none; }
.player-link:hover, .team-link:hover, .loglink:hover {text-decoration: underline;}

.q2-panel{padding: 14px 16px;}
.q2-list{display: flex;flex-direction: column; gap: 8px;}
.q2-row{display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: 1px;}
.q2-label{font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; font-weight: 600; white-space: nowrap;}
.q2-value{font-size: 14px; font-weight: 600; color: #111827; line-height: 1.0;}
.q2-sub{display: block;margin-top: 2px; font-size: 12px; font-weight: 500; color: #6b7280;}

.rankings-panel {padding: 3px 18px;}
.rankings-list {list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;}
.rankings-list .section-title {margin-top: 10px; margin-bottom: 2px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #6b7280}
.rankings-list li{display: grid; grid-template-columns: 1fr auto auto; gap: 5px; align-items: center;font-size: 0.8rem;color: #111827;}
.rankings-list .label{font-weight: 500;}
.rankings-list .value{font-weight: 600;color: var(--primary-color);}
.rankings-list .rank{font-size: 0.75rem;color: #6b7280;white-space: nowrap;}

.team_table {width: 100%;  margin:auto; border-collapse: separate ;border-spacing: 0; border: 1px solid #747768; font-size: .70em; font-family: Verdana,sans-serif; text-align: center; justify-content: center; }
.team_table thead th {background-color: #eee; color: #900; padding: 4px 3px; border-bottom: 1px solid #747678; border-right: 2px solid #ddd}
.team_table tbody td {border-bottom: 1px dotted #ddd; border-right: 1px solid #ddd; padding: 4px 3px; vertical-align: middle;}
.team_table tbody td:last-child {border-right: none;}
.team_table .highlight-row {background-color: var(--primary-color); color: white; font-weight: bold;}
.team_table .highlight-row a {color: white; }

.navigation-bar {position: sticky; top: 0; z-index: 50; background:var(--primary-color); color: white; margin: 0; padding: 0px 12px; border-bottom: 1px solid rgba(225,225,225,0.08); border-radius: 16px;}
.navigation-bar ul {list-style: none; margin: 0; padding: 1px 0px; display: flex; gap: 8px; align-items: center; overflow-x: auto; justify-content: space-evenly;}
.navigation-bar .tab {flex: 0 0 auto; padding: 3px 12px; border-radius: 999px; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.2px; cursor: pointer; user-select: none; white-space: nowrap; 
transition: transform 120ms ease, background 120ms ease; border-color: 120ms ease, color 120ms ease; }
.navigation-bar .tab:hover{background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.18); color: var(--secondary-color);}
.navigation-bar .tab:active{transform: translateY(1px);}
.navigation-bar .tab.active {background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.26); color: var(--secondary-color)}

.panel {display: none;}
.panel.active {display: block;}

#panel-overview.active {display: grid; grid-template-columns: 1.5fr 2fr 1fr 1fr; gap: 10px; padding: 5px;}
#panel-roster.active {display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 10px;}
#panel-contract.active {display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 10px;}

.draft-grid {display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 5px;}
.team_table.schedule-table tbody td {border-bottom: 1px dotted #ddd; padding: 1px 3px; vertical-align: middle;}
.week-divider {background: #f3f3f3; font-weight: 600; text-align: center; padding: 4px 8px; text-transform: uppercase;}

.team-vs-team-table tbody td {padding: 0px;}
.team-vs-team-table tbody tr:hover {background: #dbf398;}

/* Responsive: tighten leader grid on narrow columns */
@media (max-width: 1100px){
  .leader-row{ grid-template-columns: 80px 1fr auto; }
}
@media (max-width: 900px){
  .leader-row{ grid-template-columns: 1fr auto; }
  .leader-label{ display:none; }
}

.team-rankings-container {
    width: 80%;
    margin: 0px auto;
}

.power-rankings-table {
    width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); ; overflow: hidden; }

.power-rankings-table th {background-color: var(--primary-color); color: #fff;
    text-align: center;
    padding: 12px 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #eee;
}

.power-rankings-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    text-align: center;
}

.unit-name {font-weight: 600; color: #2c3e50;}

.unit-rating {color: #7f8c8d; font-family: monospace; font-size: 1.1rem;
}

.unit-rank {text-align: center;}

.rank-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Zebra striping for even better readability */  
.power-rankings-table tr:nth-child(even) {
    background-color: #fafafa;
}

.highlight-red { background-color: #d5ffcc }

.highlight-red-legend{
    background-color: #d5ffcc;
    color: black;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    width: fit-content;
}

.player-statistics-table {margin-bottom: 30px;}

.record-table-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  gap: 30px;
  font-size: 10px;
}

.player-link {color: #2563eb;text-decoration: none;}
.active-player {font-weight: 600; color: green; }

.record-section {box-sizing: border-box; background-color: #f3f3f3; border-radius: 10px; padding:10px 20px; border-radius: 12px;}

.records-table {width: 100%;  border-collapse: collapse; text-align: center; font-size: 1.4em; overflow: hidden; padding: 10px 10px;}
.records-table tr:not(:last-child) {border-bottom: 2px solid #ddd;}
.records-table td:nth-child(1), .records-table th:nth-child(1) {text-align: left; width: 30%;}


.records-headers {text-align: left; font-size: 1.5em; font-weight: bold; border-bottom: 3px solid #ddd; padding: 10px 0px;}



.records-table tbody tr:hover {background-color: #e0e0e0; border-radius: 10px;} 

.sub-headers th {

    padding-top: 10px;
    padding-bottom: 15px;
    vertical-align: bottom; 
    border-bottom: 3px solid #ddd;
    background-color: #f3f3f3;
    background-clip: padding-box;
    
}
