/* ---------------------------------------------
   1. GLOBAL RESET & VARIABLES
---------------------------------------------- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: #ebecf0;
  font-family: Lato, 'Noto Sans JP', sans-serif;
}

a {
	text-decoration: none;
	color: #333;
}

h1 {
	font-size: 14px;
}


/* ---------------------------------------------
   2. TYPOGRAPHY & GENERAL LAYOUT
---------------------------------------------- */
.orange {
  color: #ff6600;
  font-weight: bold;
}

.hidden {
  display: none;
}

.article_title {
	text-align: center;
}

.legend_note {
	font-size: 10px;
	text-align: center;
	margin-top: 5px;
	margin-bottom: 5px;
}


/*-------------------
Competition Buttons + Referee Active Buttons
-------------------*/

.compIDHolder, .activeHolder {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  justify-content: center;
  margin-bottom: 1rem;
  font-family: Arial;
}

.compIDcontainer, .activeContainer {
  text-align: center;
}

.compIDbutton, .activebutton {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 10rem;
  color: #333;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  background-color: white;
  border: 2px solid #ff6600;
  text-decoration: none;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

/* Remove unnecessary .compIDbutton a rule */

.compIDbutton::before, .activebutton::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ff6600;
  transform: scaleX(0);
  transform-origin: left;
  transition: all 0.3s ease;
  z-index: -1;
  border-radius: 10rem;
}

.compIDbutton:hover::before, .activebutton:hover::before {
  transform: scaleX(1);
}

.compIDbutton:hover, .activebutton:hover {
  color: white;
}

.compIDbutton.active, .activebutton.active {
  background-color: #ff6600;
  color: white;
  border-color: #ff6600;
}

.mode-buttons {
    padding: 10px;
    text-align: center;
    font-size: 0.85rem;
    }

.role-btn {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    margin: 0;
    border: 1px solid #333;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-right: none;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.role-btn:first-child {
    border-radius: 10px 0 0 10px;
}

.role-btn:last-child {
    border-radius: 0 10px 10px 0;
    border-right: 1px solid #333; /* close off the last one */
}

.role-btn.active {
    background: #333;
    color: white;
}





/* ---------------------------------------------
   4. PLAYER TABLE DISPLAY (.playerHold)
---------------------------------------------- */
.playerHold {
  display: grid;
  grid-template-columns: 2fr 4fr 1fr;
  grid-template-rows: auto auto;
  padding: 1rem;
  border-radius: 1rem;
  font-family: "Lato", sans-serif;
}


.club-link {
	display: flex;
	align-items: center;
	text-align: center;
	padding: .125rem .625rem;
	background: white;
	border-radius: 1rem;
	white-space: nowrap;
	text-decoration: none;
	font-weight: 500;
	margin: .125rem;
}

.clubCareer {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 0;
    
}

.club-link.a {
	text-decoration: none;
}

.club-link:hover {
	text-decoration: none;
}

.linkHolder {
  grid-column: 2 / 4; /* spans columns 2 and 3 */
  grid-row: 2 / 3;
}


/* ------------
   LEAGUE TABLE (front page)
--------------*/

/* League Table Styling */
.league-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 3px;
    font-family: Lato, sans-serif;
    font-size: 0.85rem;
    position: relative;
    font-weight: bold;
}

/* Table header */
.league-table th {
    color: white;
    padding: 0.4em 0.6em;
    font-weight: bold;
    text-align: center;
}

.league-table tr.semiTransparentRow {
	background-color: rgba(211, 211, 211, 0.5);
    color: #333333;
}


/* Table body rows */
.league-table td {
    text-align: center;
    padding: 0.3em 0.5em;
    vertical-align: middle;
}

/* Rank column (dynamic color) */
.league-table td.rank {
    color: white;
    font-weight: normal;
    width: 20px;
}

.league-table td.clubName {
	text-align: left;
}

/* Club crest */
.league-table td img.clubCrest {
    width: 1.8em;
    height: 1.8em;
    max-width: 100%;
}






.clubCrest {
  border-radius: 8px;
  vertical-align: middle;
  -webkit-border-radius: 8px;
  height: 25px;
  width: 25px;
  vertical-align: middle;
  box-sizing: border-box;
}

.clubCrest img {
    border-radius: 50%;
    height: 80%;
    width: 80%;
    display: block;
}


/* ------------
   FIXTURES (front page)
--------------*/


.match-card {
  margin: 1em 0;
  text-align: center;
  font-size: 13px;
}

.match-grid {
  display: grid;
  grid-template-columns: 40% auto 40%; /* left | center | right */
  grid-template-rows: auto auto auto;
  gap: 0.1em;
  align-items: center;
  padding-bottom: 2px;
  border-bottom: 1px solid #d3d3d3;
}

.match-date {
	background-color: #333;
	color: white;
	text-align: center;	
	width: 100%;
	font-size: 12px;
}

.match-grid .comp-icon img {
  width: 20px;
  height: 20px;
  border-radius: 50%; /* make circular */
}

.match-grid .comp-icon {
  text-align: center;
}

.match-grid .home-team {
  text-align: right;
  font-size: 0.7em;
  color: #333333;
}

.match-grid .away-team {
  text-align: left;
  font-size: 0.7em;
  color: #333333;
}

.match-grid .center-cell {
  font-size: 0.8em;
  text-align: center;
}

.match-grid .venue {
  grid-column: 1/span 3;
  text-align: center;
  font-size: 0.7em;
  color: #555;
}

.no-matches{
	padding: 14px;
	color: #333;
	font-size: 12px;
	text-align: center;
}


@media (max-width: 640px) {
  .match-grid {
    font-size: 11px;
  }
}



/* ---------------------------------------------
   5. BAR GRAPH DISPLAY (.playerBarHold)
---------------------------------------------- */
.playerBarHold {
  padding: 0.8em;
}

.nameHold a {
  align-items: center;
  color: inherit;
  display: flex;
  text-decoration: none;
}

.headHold {
  align-items: flex-start;
  display: flex;
}

.nameHold {
  align-items: stretch;
  flex-direction: row;
  flex-shrink: 0;
  justify-content: center;
  max-width: 300px;
}

.playerHead {
  border-radius: 8px;
  vertical-align: middle;
  -webkit-border-radius: 8px;
  border: 1px solid #D3D3D3;
  height: 45px;
  width: 45px;
  vertical-align: middle;
  background: radial-gradient(circle,
                rgba(255, 255, 255, 1) 0%, 
                rgba(220, 220, 220, 1) 70%, 
                rgba(180, 180, 180, 1) 100%);
  box-sizing: border-box;
}

.playerHead img {
    border-radius: 50%;
    height: 100%;
    width: 100%;
    display: block;
}



.playerInfo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 17vw;
  padding-left: 0.4em;
}

.playerName {
  font-size: 0.8em;
  font-weight: bold;
}

.pcc {
  height: 25px;
  margin-left: -15px;
  position: relative;
  width: 25px;
}

.gameDetails {
    color: #666;
    display: flex;
    flex-direction: column;
    font-size: clamp(0.4em, 1.5vw, 0.5em);
}

.gameDetails .teamRow {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2px;
}


.gameDetails .nl {
    flex-basis: 100%;
}

.homeScore, .awayScore{
	padding-left: 0.2em;
	padding-right: 0.2em;
}

.gameDetails .date {
	flex-basis: 100%;
	color: orange;
	font-size: 0.8em;	
}

.employerDetails {
    display: flex;
    gap: 1px;
    align-items: center;
}

.employerDetails .ed {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.bar-graph-horizontal {
  width: 100%;
  height: auto;
  margin: 1em 0;
  overflow: hidden;
  margin-bottom: 18px;
}

.bar {
  position: relative;
  background-color: #003366;
  height: 100%;
  width: 0; /* start at 0, animate to ${percent}% via JS */
  transition: width 1s ease;
  color: white;
  font-weight: bold;
  font-size: 0.8em;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* label aligned right inside the bar */
  padding-right: 0.5em;      /* space between bar edge and label */
  border-radius: 5px;
}



.bar-1, .bar-2, .bar-3, .bar-4, .bar-5, .bar-6, .bar-7, .bar-8, .bar-9, .bar-10, .bar-11, .bar-12, .bar-13, .bar-14, .bar-15, .bar-16, .bar-17, .bar-18, .bar-19, .bar-20, .bar-21, .bar-22, .bar-23, .bar-24, .bar-25, .bar-26, .bar-27, .bar-28, .bar-29, .bar-30, .bar-31, .bar-32, .bar-33, .bar-34, .bar-35, .bar-36, .bar-37, .bar-38, .bar-39, .bar-40, .bar-41, .bar-42, .bar-43, .bar-44, .bar-45, .bar-46, .bar-47, .bar-48, .bar-49, .bar-50, .bar-51, .bar-52, .bar-53, .bar-54, .bar-55, .bar-56, .bar-57, .bar-58, .bar-59, .bar-60, .bar-61, .bar-62, .bar-63, .bar-64, .bar-65, .bar-66, .bar-67, .bar-68, .bar-69, .bar-70, .bar-71, .bar-72, .bar-73, .bar-74, .bar-75, .bar-76, .bar-77, .bar-78, .bar-79, .bar-80, .bar-81, .bar-82, .bar-83, .bar-84, .bar-85, .bar-86, .bar-87, .bar-88, .bar-89, .bar-90, .bar-91, .bar-92, .bar-93, .bar-94, .bar-95, .bar-96, .bar-97, .bar-98, .bar-99, .bar-100 {
  display: flex;
  align-items: center;
  gap: 1em;
  height: 30px;
}

.bar-label {
  position: relative;
  z-index: 2;
  white-space: nowrap;
  padding: 0.5em;
}

.noteHold {
  font-size: 0.95em;
  margin-top: 8px;
  margin-bottom: 10px;
  color: #555;
  font-style: italic;
  display: none;
}

.bar-cards {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;   /* never wrap */
  overflow: hidden;    /* don’t let them spill out */
}

.yellow-card {
  width: 20px;     /* base size */
  height: auto;
  flex-shrink: 1;  /* allow shrinking */
}

.yellow-card.show {
  opacity: 1;
  transform: scale(1);
}

/* dynamically shrink */
.bar-cards img.yellow-card {
  flex: 1 1 auto;  /* cards shrink if needed */
  max-width: calc(100% / var(--total-cards)); /* custom variable from JS */
}

.card-label {
  margin-left: 6px;
  font-size: 0.85em;
  white-space: nowrap;
}

@keyframes fadeIn {
  to { opacity: 1; }
}



.career {
	color: #ff6600; /*correct orange*/
	font-size: 0.45em;
	margin-top: 0.2em;
}


    svg {
      font-family: sans-serif;
      color: #333;
    }
    path.line {
      fill: none;
      stroke: steelblue;
      stroke-width: 2px;
    }
    
.y.axis path.domain {
  display: none;
}

.tooltip {
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.8em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1000;
}


.chart-container-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;

}
.chart-container {
  border: 1px solid #d3d3d3;
  border-radius: 10px;
  max-width: 600px;
  margin-bottom: 20px;
}

.graph-wrapper {
    max-width: 800px;
    margin: 0 auto 30px;
}

@media (max-width: 600px) {
  .chart-container {
    max-width: 100%;   /* override max-width on small screens */
  }
}




/* ---------------------------------------------
   6. UTILITY CLASSES & COMPONENTS
---------------------------------------------- */

.seasonLink {
    display: block;
    width: max-content;
    margin: 0 auto;
    color: #a3a3a3;
    text-align: center;
}

.seasonLink a {
    text-decoration: none !important;
    color: #a3a3a3;
    font-size: 0.6em;
    padding: 0.4em;
    transition: color 0.2s ease;
}

.seasonLink a:hover {
    color: orange;
    text-decoration: underline;
}

.analTable {
  border: 2px solid blue;
  background-color: #eee;
  min-height: 100px;
  overflow: visible;
} 

.analBarTable {
	padding-bottom: 60px;
}

.numFoot {
  color: #666;
  font-size: 0.75em;
}

.sumH {
  border-bottom: 1px solid #ccc;
  border-right: 1px solid #ccc;
  box-sizing: border-box;
  flex: 1 1 50%;
  padding: 10px 20px;
  text-align: center;
}

.sumH:last-child(2n) {
  border-right: none;
}

.sumH:nth-last-child(-n+2) {
  border-bottom: none;
}

.sumMeasure {
  color: #ccc;
  font-size: 0.75em;
  margin-bottom: 6px;
}

.numM {
  color: #333;
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 6px;
}


.summaryHeader {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  margin: 30px auto;
  max-width: 800px;
  padding: 10px 0;
  width: 100%;
}
 
.site-footer {
  background: #003366;
  bottom: 0;
  color: white; 
  font-size: 0.4em;
  left: 0;
  padding: 10px 20px;
  position: fixed;
  text-align: center;
  text-decoration: none;
  width: 100%;
  z-index: 1000;
}

.searchPlayers, .searchClubs {
    width: 100%;
    padding: 8px 8px 8px 34px; /* space for icon */
    background-color: #ebecf0; /* very light bluish grey */
    border: none;
    outline: none;
    color: #4c505c; /* darker bluish grey text */
    font-size: 14px;
    border-radius: 4px;
}

.searchPlayers::placeholder, .searchClubs::placeholder {
    color: #4c505c; /* lighter bluish grey placeholder */
}



#suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px; /* slightly curved corners */
  z-index: 1000;
  width: 100%;
  font-size: 13px; /* smaller font size */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* optional subtle shadow */
}

#suggestions li {
  padding: 6px 10px;
  cursor: pointer;
}

#suggestions li:hover {
  background-color: #e0e0e0;
}

.search-wrapper {
    position: relative;
    width: 195px; /* adjust as needed */
    font-family: sans-serif;
}

.search-wrapper svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none; /* clicks go to input */
}


.search-wrapper input {
  padding-top: 8px;
  padding-bottom: 8px;
  border: 0px;
  padding-left: 35px; /* Space for icon */
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 8px;
  top: 48%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  color: #555;
}

.clear-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #888;
}






/*by game, by season, by career buttons*/

.butHold {
	text-align: center;
	margin: 0 auto;
	padding: 5px;
}

.butHold .button {
  text-decoration: none;
  line-height: 1;
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
  box-shadow: 10px 10px 20px rgba(0,0,0,.05);
  background-color: #fff;
  border: none;
  cursor: pointer;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  margin: 8px;
  padding: 0px;
}

.butHold .button-decor {
  position: absolute;
  inset: 0;
  background-color: #ff6600;
  transform: translateX(-100%);
  transition: transform .3s;
  z-index: 0;
}

.butHold .button-content {
  display: flex;
  align-items: center;
  font-weight: 400;
  position: relative;
  overflow: hidden;
}

.butHold .button__icon {
  width: 48px;
  height: 40px;
  background-color: #ff6600;
  display: grid;
  place-items: center;
}

.butHold .button__text {
  display: inline-block;
  transition: color .2s;
  padding: 2px 1.5rem 2px;
  padding-left: .75rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 150px;
}

.butHold .button:hover .button__text {
  color: #fff;
}

.butHold .button:hover .button-decor {
  transform: translate(0);
}

.butHold .button.active .button-decor {
  transform: translateX(0);
}

.butHold .button.active .button__text {
  color: white;
}


.comp-strip-wrapper, .country-strip-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}


.scroll-arrow {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background 0.2s ease;
}

.scroll-arrow:hover {
    background: rgba(240, 240, 240, 0.9);
}

.scroll-arrow.left {
    left: 0;
}

.scroll-arrow.right {
    right: 0;
}

.comp-buttons, .country-buttons {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
    padding: 10px 40px;
    scrollbar-width: thin;
}

.comp-buttons::-webkit-scrollbar, .country-buttons::-webkit-scrollbar {
    height: 6px;
}

.comp-buttons::-webkit-scrollbar-thumb, .country-buttons::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.comp-button, .country-button {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: #fff;
    border: 1px solid #d3d3d3;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.comp-button img, .country-button img,
.comp-logo, .country-logo {
    width: 6vw;
    height: 6vw;
    max-width: 50px;
    max-height: 50px;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.comp-button:hover, .country-button:hover {
    background: #f8f8f8;
    transform: scale(1.05);
}


.comp-button.active img, .country-button.active img,
.comp-button.active .comp-logo,  .country-button.active .country-logo{
    transform: scale(1.1);
    animation: logoPulseGlow 1.5s ease-in-out infinite;
}

.comp-button.active, .country-button.active {
    transform: scale(1.05);
    border: 1px solid rgba(var(--pulse-rgb, 255,204,0), 1);
    background: rgba(var(--pulse-rgb, 255,204,0), 0.1);
    animation: pulseGlow 1.5s ease-in-out infinite;
}



.comp-button.all-comps:hover, .country-button.all-countries:hover {
    background-color: #e0e0e0;
}

.comp-button.all-comps .comp-text, .country-button.all-countriess .country-text  {
    position: absolute;
    text-align: center;
    font-size: 3rem;
    letter-spacing: 1px;
    width: 100%;
}


@keyframes pulseGlow {
    0%   { box-shadow: 0 0 0 rgba(var(--pulse-rgb, 255,204,0), 0); }
    50%  { box-shadow: 0 0 10px rgba(var(--pulse-rgb, 255,204,0), 0.8); }
    100% { box-shadow: 0 0 0 rgba(var(--pulse-rgb, 255,204,0), 0); }
}






@media (max-width: 600px) {
  .butHold {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .butHold .button {
    width: 50%;
    max-width: 300px;    /* Optional cap */
    font-size: 1.1rem;
  }

  .butHold .button__text {
    max-width: unset;    /* Allow full text */
    white-space: normal; /* Allow wrapping */
  }
}











/* ---------------------------------------------
   9. MEDIA QUERIES (RESPONSIVE STYLES)
---------------------------------------------- */
@media (min-width: 801px) {
  .sumH {
    border-bottom: none;
    flex: 1 1 25%;
  }

  .sumH:nth-child(4n) {
    border-right: none;
  }
}






/* Mobile adjustments */
@media (max-width: 768px) {
    .league-table {
        font-size: 0.75rem;
    }
    .league-table td img.clubCrest {
        width: 2em;
    }
    .league-table th, .league-table td {
        padding: 0.2em 0.3em;
    }
    
    .cardFrame {
    	margin: 0 auto;
    	width: 95vw;    	
    }
    
    .h1 {
    	font-size: 1.2em;
    }
    
    
}



