:root {
  /* Primary brand blues */
  --brand-blue:       #4e89ae;
  --brand-dark-blue:  #43658b;
  --brand-accent:     #e76f51;   /* a warm accent (rusty orange) */
  --neutral-light:    #f3f4f6;
  --neutral-gray:     #efeff3;
  --text-primary:     #212121;
  --text-secondary:   #4a4a4a;

  /* Aliases used by legacy stats components */
  --brand-1:          var(--brand-blue);
  --brand-2:          var(--brand-dark-blue);
  --accent:           var(--brand-accent);
  --white:            #ffffff;

  /* Typography */
  --font-base:       'Raleway', sans-serif;
  --font-heading:    'Montserrat', sans-serif; /* example */
}

#banner h1, .card h3, .notes-section h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 1px;
}

html, body {
  overflow-x: hidden;
}

body{
  margin: 0;
  font-family: var(--font-base);
  color: var(--text-primary);
  background-color: var(--neutral-gray);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  position: relative;                  /* contain the absolute nav */
  background: #4e89ae;
  border-top: 20px solid #43658b;
  height: 95px;                       /* fix the total header height */
  overflow: hidden;                    /* clip anything that spills */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 100;
  padding: 0.75rem 1rem;  /* controls height, remove height: 95px */
}


.site-header.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: var(--brand-blue);
  border-top: 20px solid var(--brand-dark-blue);
  /* height: 95px;  you can remove fixed height and rely on padding */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* Basic */
a:hover {
    text-decoration: none;
}

.title h1 {
  font-size:24px;
  color:#FFF;
  font-weight:500;
}

/* Logo */
#logo {
    margin-top: 5px;
	padding-top: 5px;
	display: inline-block;
}

/* Nav */
#nav {
  position: static;
  margin: 0;
  font-size: 0.9em;
}

#nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav ul li {
  margin-left: 1.5rem;
}

#nav ul li a {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: #cce3e6;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.25s;
}

#nav ul li.current a {
  background: transparent;
  color: #fff;
  border-bottom: 3px solid var(--brand-accent);
}

#nav ul li a:hover {
  background-color: var(--brand-accent); /* use accent here to stand out */
  color: #fff;
}

/* Banner */
/* Center & size the whole banner area */
#banner-wrapper {
  width: 50%;            /* half the viewport width */
  max-width: 800px;       /* caps out on large screens */
  min-width: 320px;       /* stays usable on small screens */
  margin: 0 auto 40px;    /* center + bottom spacing */
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Lighten the banner itself — white with a soft border instead of a full blue fill */
#banner {
  background: #ffffff;
  border: 2px solid #43658b;   /* pick up your header’s darker blue */
  color: #43658b;              /* match text to that same tone */
  padding: 24px 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  position: relative;
}

/* Watermark icon stays, but tint it to your darker blue */
#banner::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 150px; height: 150px;
  background: url('/static/img/football-icon.svg') no-repeat center/contain;
  filter: opacity(0.05) drop-shadow(0 0 0 #43658b);
  transform: translate(-50%, -50%) rotate(15deg);
  pointer-events: none;
}

/* Headline in your mid-blue, with a subtle weight bump.
   Note: the original selector was `#banner h1, img` which silently applied
   typography + slide-in animation to every <img> on the page (logo, platform
   logos, footer art). Scoping to `#banner h1` only. */
#banner h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: #4e89ae;      /* your header’s primary blue */
  letter-spacing: 1px;
  margin: 0;
  animation: slideIn 0.8s ease-out;
}

/* Subtext pill adjusted to blend */
#banner-subtext {
  background: #ebeff0;
  color: #212121;
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border: 1px solid #ccc;
  margin-top: 20px;
  margin-bottom: -25px;
}
#banner-subtext a {
  color: #4e89ae;
  font-weight: 600;
  text-decoration: underline;
}
#banner-subtext a:hover {
  text-decoration: underline;
}

.social-proof {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-dark-blue);
  margin: 8px 0 0;
  letter-spacing: 0.5px;
}

/* Keep your slideIn keyframes */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0px 0px 0px;
}

.card, .card-sl {
    padding: 10px 50px 20px 50px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    background-color: #fff;
    text-align: center;
    width: 15%;
    min-width: 300px;
}

.card-sl {
    min-width: 400px;
}

#league {
  display: block;
  margin: 0 auto;
  width: 50%;
  height: 32px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #212121;
  background-color: white;
  border: 2px solid black;
  border-radius: 4px;
  appearance: none;              /* Remove OS styling */
  -webkit-appearance: none;      /* Safari/Chrome */
  -moz-appearance: none;         /* Firefox */
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
}

/* Just spacing and font improvements */
#league option {
  background-color: white;
  color: #212121;
  font-size: 14px;
  padding: 6px 10px;
  font-family: 'Raleway', sans-serif;
}

.league-input h1 {
    margin-bottom: 20px;
}

.league-input h2 {
    font-size: 32px;
}

.league-input h4 {
    margin: 5px 0px 10px 0px;
}

.league-input form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Match spacing and layout */
.league-input label,
.league-input textarea,
.league-input input[type="text"],
.league-input input[type="password"],
.league-input button {
  margin-bottom: 10px;
}

.league-input textarea,
.league-input input[type="text"] {
    resize: none;
    box-sizing: border-box;
    width: 52%;
    max-width: 420px;
    padding: 8px 10px 8px 25px;
    border: 1px solid #000;
    font-family: var(--font-base);
    font-size: 14px;
    background: url('/static/images/sleeper_logo.jpg') no-repeat scroll 5px center;
    background-size: 15px;
}

/* Password field styling (similar to textarea) */
.league-input input[type="password"] {
    width: 52%;                  /* match the width you used inline */
    resize: none;
    padding-left: 25px; /* Adjust based on the size of the image */
    background: url('/static/images/mfl_logo.png')
                no-repeat scroll 5px center;
    background-size: 15px;       /* same size as the textarea icon */
    border: 1px solid black;
    font-family: monospace;
    font-size: 14px;
}

.league-input button {
    padding: 5px 10px;
}

.platform-select {
    display: flex;
    justify-content: center;
    margin-bottom: 20px; /* << increase margin instead of padding */
    gap: 20px;
}

.platform-logo {
    width: 50px;
    height: 50px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.platform-logo.selected {
    border: 2px solid #007bff; /* blue highlight */
    box-shadow: 0 0 10px #007bff;
}

/* Tooltip */
.tooltip-icon {
  display: inline-block;
  position: relative;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: help;
  margin-top: -40px;
  margin-bottom: -40px;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 260px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  top: 110%; /* 100% is directly below, 110% adds some breathing room */
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  transition: opacity 0.3s;
}

.tooltip-icon:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Shown when the league dropdown was truncated to fit the session cookie. */
.truncate-warning {
  margin: 12px auto 6px;
  padding: 8px 12px;
  max-width: 360px;
  font-size: 13px;
  color: #8a4b00;
  background: #fff4e0;
  border: 1px solid #f0c98a;
  border-radius: 6px;
  text-align: center;
}

/* Submit Button */
.submit-button {
    background-color: #4e89ae; /* Button background color */
    color: #fff; /* Button text color */
    font-size: 16px; /* Font size */
    font-weight: bold; /* Font weight */
    padding: 10px 20px; /* Padding for the button */
    border: none; /* Remove default border */
    border-radius: 5px; /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add a shadow for depth */
    cursor: pointer; /* Change cursor to pointer on hover */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
}

.submit-button:hover {
    background-color: #3a6f91; /* Darker shade for hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Larger shadow on hover */
}

.submit-button:active {
    background-color: #2d506b; /* Even darker shade for active state */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Reduce shadow on active */
}

.submit-button:focus {
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 0 2px rgba(78, 137, 174, 0.5); /* Custom focus outline */
}

/* Other Tools on the Welcome Page */
.other-tools {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0px 20px 20px 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.other-tools h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.other-tools ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.other-tools li {
    margin-bottom: 10px;
}

.other-tools li a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #555;
    background-color: #f0f0f0;
    border-radius: 5px;
    font-size: 16px;
    font-weight: normal;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.other-tools li a:hover {
    background-color: #3a6f91; /* same hover color as your submit button */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Insights Tables */
.insights-container {
  width: 23%;
  margin: 0 auto;
  margin-bottom: 150px;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  gap: 1px;
  flex-wrap: wrap; /* allows stacking on smaller screens */
  background-color: #ffffff;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  overflow: visible; /* critical */
}

.insights-container h2 {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin: 20px 200px -20px 200px;
}


.weekly-insights-section, .weekly-correl-section {
    width: auto;
    max-width: 1000px;
    margin: 20px 0px 20px 0px;
    padding: 10px 20px 10px 20px;
    background-color: #ffffff;
    text-align: center;
}

.weekly-insights-section h2,
.weekly-correl-section h2 {
  font-size: 16px;
  font-family: monospace;
  color: #333;
  margin-bottom: 10px;
  font-weight: bold;
  text-shadow: none;
}

.weekly-insights-section table,
.weekly-correl-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
}

.weekly-insights-section th, .weekly-correl-section th,
.weekly-insights-section td, .weekly-correl-section td {
    border: 1px solid #ccc;
    padding: 6px 8px;
    text-align: center;
}

.weekly-insights-section th,
.weekly-correl-section th {
  background-color: #e0e0e0;
  font-weight: bold;
  color: #000;
}

.weekly-insights-section tr:nth-child(even),
.weekly-correl-section tr:nth-child(even) {
  background-color: #f9f9f9;
}

.weekly-insights-section tr:hover,
.weekly-correl-section tr:hover {
  background-color: #e2e2e2;
  transition: none;
  cursor: default;
}

.highlight-green {
  background-color: #d4edda; /* soft green */
  color: #155724; /* dark green text */
  font-weight: bold;
}
/* Tooltips */
.tooltip-container {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  cursor: help;
}

.info-icon {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #000;                  /* Black text */
  border: 1px solid #000;       /* Black border */
  border-radius: 50%;
  width: 14px;
  height: 14px;
  text-align: center;
  line-height: 14px;
  font-family: sans-serif;
  background-color: #fff;       /* White background */
}
.tooltip-index-text {
  visibility: hidden;
  position: absolute;
  z-index: 9999;
  top: auto;
  bottom: 100%;             /* positions tooltip above the icon */
  left: 100%;               /* positions it to the right of the icon */
  transform: translate(2%, -2%); /* slight nudge away from icon */

  background-color: #333;
  color: #fff;
  width: 350px;             /* or however wide your expanded table is */
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
  white-space: normal;
}
.tooltip-container:hover .tooltip-index-text {
  visibility: visible;
  opacity: 1;
}


/* Data Extract */
/* Data Export Section */
.data-export {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 0 10px 0;
    margin: 30px 0 20px 0;
}

.data-export-container {
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* keep your original shadow */
    border-radius: 5px; /* keep original radius */
    background-color: #fff;
    text-align: center;
}

.data-export-container p {
    font-size: 16px;
    color: #333; /* match rest of the site's primary text color */
    margin-bottom: 20px;
}

/* Download button */
.data-export-container a button {
    background-color: #4e89ae; /* Match submit button */
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 5px; /* Match submit button rounding */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.data-export-container a.data-export-link {
  display: inline-block;
  background-color: #4e89ae;
  color: #fff !important;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none !important;
  transition: background-color 0.3s ease;
}

/* Download Button Styling */
.download-data {
  display: flex;                /* already flex */
  justify-content: center;      /* center children horizontally */
  align-items: center;          /* center vertically if you ever add height */
  flex-wrap: wrap;              /* wrap on small screens */
  gap: var(--space-md);         /* keeps a bit of space between <select> and <button> */
  margin: var(--space-lg) auto; /* vertical spacing + auto left/right */
  text-align: center;           /* fallback for inline children */
}

/* optional if you want to stack them */
.download-data {
  flex-direction: column;
}

.controls {
  display: flex;      /* or inline-flex */
  justify-content: center;
  gap: var(--space-sm);
}

.download-button-container {
    margin-top: 50px;
}

.download-button-container select {
    font-size: 12px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.downloadButton {
    margin: 5px;
    background-color: #4e89ae; /* Button background color */
    color: #fff; /* Button text color */
    font-size: 12px; /* Font size */
    font-weight: bold; /* Font weight */
    padding: 5px 10px; /* Padding for the button */
    border: none; /* Remove default border */
    border-radius: 5px; /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add a shadow for depth */
    cursor: pointer; /* Change cursor to pointer on hover */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
}
.downloadButton:hover {
    background-color: #3e7ba9; /* Darken background color on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Increase shadow on hover */
}

.data-export-container a button:hover,
.data-export-container a.data-export-link:hover {
    background-color: #3a6f91; /* Match submit-button hover color */
}


@media (max-width: 768px) {
 /* 0. Make header padding tighter */
  .site-header,
  .site-header.container {
    margin: 0px;
    padding: 0rem 0.5rem;    /* cut vertical padding in half */
    height: auto;            /* ensure it grows only to its content */
  }

  /* 1. Shrink the logo */
  #logo img,
  #logo svg {
    width:83px;
    height:60px;
    display: block;
    margin:0px;
  }
  #logo {
    margin: 0px;
    padding: 0px;
  }

  /* 2. Compact the nav links */
  #nav {
    margin: 0;
    margin-left: auto;  /* this auto-margin in a flex container pushes it all the way right */
  }
  #nav ul {
    width: 90%;
    margin: 0 auto;
    margin-right: 0px;
  }
  #nav ul li {
    margin-left: 0rem;
    margin-right: 20px;
  }
  #nav ul li a {
    padding: 0.35rem 0.25rem;
    font-size: clamp(0.68rem, 2.6vw, 0.82rem);
    white-space: nowrap;
  }

  /* 6. Banner tweaks — keep the title visible but tighten the notes
     block; on stats pages this can otherwise eat ~1/3 of the viewport. */
  #banner-wrapper {
    width: auto;
    max-width: none;
    margin: 14px 8px 1.25rem;
    padding: 0;
  }
  #banner {
    padding: 0.4rem 0.6rem;
    margin-bottom: 0;
  }
  #banner h1 {
    font-size: 1.25rem;
  }
  #banner-subtext {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 0.72rem;
    line-height: 1.3;
    padding: 6px 10px;
    margin: 8px 0 0;
  }
  #banner-subtext p {
    margin: 0;
  }
  #banner-subtext p + p {
    margin-top: 4px;
  }
  #banner-subtext .banner-note {
    font-size: 0.66rem;
    line-height: 1.3;
    color: var(--text-secondary, #4a4a4a);
  }
  /* 6. Card/Content — tighten so welcome cards (e.g. trade value chart
     welcome) don't dominate the mobile viewport. */
    .card, .card-sl {
      margin: 0 14px 1rem;
      padding: 0.85rem 1rem 1.1rem;
      width: auto;
      max-width: calc(100% - 28px);
      min-width: 0;
      box-sizing: border-box;
    }
    .card-sl {
      min-width: 0;
    }

    .card .league-input h1,
    .card-sl .league-input h1 {
      font-size: 1.15rem;
      margin-bottom: 0.5rem;
    }

    .card .league-input h2,
    .card-sl .league-input h2 {
      font-size: 1.05rem;
      margin: 0 0 0.4rem;
    }

    .card .league-input p,
    .card-sl .league-input p {
      font-size: 0.82rem;
      line-height: 1.4;
      margin-bottom: 0.75rem;
    }
    /* Submit Button */
    .submit-button {
        font-size: 12px; /* Font size */
    }

    /* League Input */
    .league-input p {
         font-size: 12px; /* Font size */
         margin-bottom: 30px;
    }
    #league {
        width: 50%;
        padding: 1px 2px;
        box-sizing: border-box;
        height: 24px; /* force enough vertical room to see all edges */
    }

    .other-tools {
        margin: 0px;
        padding: 20px;
        width: 80%;
        margin: 0 auto;
        }
    .other-tools h3 {
        font-size: 16px;
        color: #333;
        margin-bottom: 10px;
    }
    .other-tools li a {
        padding: 10px;
        font-size: 14px;
    }
    .data-export {
        margin: 0px 0px 50px 0px;
        padding: 0px 0px 10px 0px;
    }

    .data-export-container {
        width: 70%;
        margin: 0 auto;
    }

    .data-export-container p {
        font-size: 12px;
    }
    /* Download button */
    .data-export-container a button {
        font-size: 12px;
    }

	.collapsible {
        margin-left: 50px;  /* Optional: Adds space between buttons */
	}

    .drop-down h1 {
        font-size: 24px;
    }

    /* Insights Tables */
    .insights-container {
      width: 80%;
      max-width: 1200px;
      margin: 0 auto 150px auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      background-color: #ffffff;
      border-radius: 5px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      text-align: center;
      overflow: visible;
      padding: 0 10px;
    }
    .insights-container h2 {
      font-size: 24px;
      font-weight: bold;
      text-align: center;
      margin: 0 auto;
      margin-top: 20px;
      margin-bottom: -20px;
    }

    .weekly-insights-section, .weekly-correl-section {
        width: auto;
        max-width: 1000px;
        margin: 20px 0px 20px 0px;
        padding: 0px;
        background-color: #ffffff;
        text-align: center;
    }

    .weekly-correl-section table {
      font-size: 11px;
      padding: 0px;
    }

    .weekly-insights-section table {
      font-size: 11px;
    }

    .tooltip-index-text {
      visibility: hidden;
      z-index: 9999;
      bottom: 0%;
      left: 0%;
      transform: translate(-100px, -20px);
      background-color: #333;
      color: #fff;
      max-width: 185px;
      padding: 0px;
      border-radius: 4px;
      font-size: 8px;
      opacity: 0;
      transition: opacity 0.2s ease-in-out;
      white-space: normal;
      word-break: break-word;
    }

	.site-footer p {
	    font-size: 11px;
	    line-height: 1.35;
	}
}

/* Logo image styling. (Previously this block also reset typography props that
   were leaking from a too-broad `#banner h1, img` selector — that selector has
   since been scoped to `#banner h1` only, so the resets are no longer needed.) */
#logo img {
  margin: 0;
}


/* Flex-grow so the main content area fills space and pushes the footer down */
#main-content {
  flex: 1;
}

.site-footer,
footer {
  width: 100%;
  margin-top: 2rem;
  padding: 12px 8px;
  background-color: #43658b;
  color: white;
  text-align: center;
  box-sizing: border-box;
}