/* Club page (/career/clubs/{id}): hero with average ratings, stats row, squad table and a sidebar
   with the suggested XI and squad profile. Loaded only on club pages, after the shared styles. */
.club-page { max-width: 1240px; margin: 0 auto; padding: 18px 18px 48px; font-variant-numeric: tabular-nums; }
.club-page .cc-breadcrumb { display: none; }

.club-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .82rem; }
.club-back { display: inline-flex; align-items: center; gap: 6px; color: #b7c5d6; text-decoration: none; }
.club-back:hover { color: #fff; }
.club-squad-chip { display: inline-flex; align-items: center; gap: 7px; color: #c8d5e4; font-weight: 600; white-space: nowrap; }
.club-squad-chip i { width: 6px; height: 6px; border-radius: 50%; background: #3d8ff0; }

/* Hero: ratings left and right of the crest, name and meta underneath. */
.club-hero { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: clamp(12px, 6vw, 120px); row-gap: 4px; max-width: 760px; margin: 0 auto; text-align: center; }
.club-hero__rating { display: grid; gap: 2px; }
.club-hero__rating--left { justify-self: end; }
.club-hero__rating--right { justify-self: start; }
.club-hero__rating > span { color: #9fb0c4; font-size: .74rem; }
.club-hero__value { display: inline-block; white-space: nowrap; font-size: clamp(2.5rem, 7vw, 2.9rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: #8be3a4; background: none !important; padding: 0 !important; }
.club-hero__value small { font-size: .52em; letter-spacing: -.02em; }
.club-hero__value.rating--elite, .club-hero__value.rating--gold { color: #8be3a4; }
.club-hero__crest { width: clamp(84px, 22vw, 112px); aspect-ratio: 1; display: grid; place-items: center; }
.club-hero__crest img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 30px #0009); }
.club-hero h1 { grid-column: 1 / -1; margin: 6px 0 0; font-size: clamp(1.9rem, 6vw, 2.2rem); line-height: 1.05; letter-spacing: -.035em; }
.club-hero__meta { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: #9fb0c4; font-size: .78rem; }
.club-hero__meta > i { width: 1px; height: 16px; background: #ffffff24; }
.club-hero__meta .nation-flag { width: 24px !important; height: 18px !important; object-fit: contain; }
.club-hero__meta a { display: inline-flex; }
.club-hero__actions { grid-column: 3; grid-row: 3; justify-self: end; display: flex; gap: 8px; margin-top: -30px; }
.club-icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #ffffff24; border-radius: 10px; background: #111922; color: #dbe7f4; cursor: pointer; }
.club-icon-button:hover { border-color: #3d8ff0; color: #fff; }

/* Stats row. */
.club-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 680px; margin: 18px auto 0; padding: 10px 0; border-top: 1px solid #ffffff14; border-bottom: 1px solid #ffffff14; }
.club-stats > div { display: grid; gap: 3px; padding: 0 8px; text-align: center; }
.club-stats > div + div { border-left: 1px solid #ffffff14; }
.club-stats dt { color: #9fb0c4; font-size: .7rem; }
.club-stats dd { margin: 0; color: #fff; font-size: 1.02rem; font-weight: 700; white-space: nowrap; }
.club-stats dd small { color: #9fb0c4; font-size: .66rem; font-weight: 500; }
.club-stats__growth { color: #8be3a4 !important; }

/* Tabs. */
.club-tabs { margin-top: 18px; }
.club-tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 6px; background: #1d2b3b; color: #9fc6f2; font-size: .66rem; font-weight: 700; vertical-align: middle; }
.club-tab-dot { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: #3d8ff0; vertical-align: middle; }

/* Squad tab: main column + sidebar on wide screens. */
.club-squad { display: grid; gap: 22px; padding-top: 18px; }
.club-squad[hidden] { display: none; }
@media (min-width: 1100px) { .club-squad { grid-template-columns: minmax(0, 1fr) 306px; align-items: start; } }
.club-squad__heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.club-squad__heading h2 { margin: 0; font-size: 1.2rem; }
.club-squad__heading p { margin: 0; color: #7f91a6; font-size: .72rem; }
.club-squad__toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 10px; }
.club-search { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid #ffffff1c; border-radius: 12px; background: #111922; color: #9fb0c4; }
.club-search input { flex: 1; min-width: 0; border: 0; background: none; color: #fff; font: inherit; font-size: .9rem; outline: none; }
.club-sort select { min-height: 44px; min-width: 128px; padding: 0 36px 0 14px; border: 1px solid #ffffff1c; border-radius: 12px; color: #eef4fb; font: inherit; font-size: .84rem; font-weight: 600; appearance: none; -webkit-appearance: none;
  background: #111922 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239fb0c4' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center; }

.club-chips { display: flex; gap: 6px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.club-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid #ffffff1c; border-radius: 9px; color: #c9d6e5; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.club-chips a small { color: #7f91a6; font-size: .68rem; }
.club-chips a.is-active { border-color: #3d8ff0; background: #12345a; color: #fff; }

/* Squad table (same table on phone and desktop; extra columns hide on small screens). */
.club-table-wrap { border: 1px solid #ffffff14; border-radius: 14px; background: #10171f; overflow: hidden; }
.club-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.club-table th { padding: 11px 10px; border-bottom: 1px solid #ffffff14; color: #8fa0b4; font-size: .7rem; font-weight: 600; text-align: center; white-space: nowrap; background: #121b25; }
.club-table th:first-child { text-align: left; padding-left: 14px; }
.club-table th a { color: inherit; text-decoration: none; }
.club-table th[aria-sort] a, .club-table th[aria-sort] { color: #6fb2ff; }
.club-table td { padding: 8px 10px; border-bottom: 1px solid #ffffff0d; text-align: center; vertical-align: middle; color: #c9d6e5; font-size: .82rem; }
.club-table tr:last-child td { border-bottom: 0; }
.club-table tbody tr:hover { background: #151f2a; }
.club-player { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.club-player img[data-player-portrait] { width: 40px; height: 44px; flex: 0 0 40px; object-fit: cover; object-position: top; border-radius: 8px; background: #1a2532; }
.club-player a { min-width: 0; overflow: hidden; color: #fff; font-weight: 650; font-size: .88rem; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.club-player .nation-flag { width: 18px !important; height: 13px !important; flex: 0 0 auto; object-fit: contain; }
.club-table td:first-child { padding-left: 14px; text-align: left; width: 100%; }
.club-player a { max-width: 260px; }
.club-pos { display: inline-grid; place-items: center; min-width: 30px; height: 20px; margin: 1px 2px; padding: 0 5px; border-radius: 5px; font-size: .66rem; font-weight: 800; letter-spacing: .02em; }
.club-pos--gk { background: #3a3218; color: #f2d36b; }
.club-pos--def { background: #16304d; color: #8cc4ff; }
.club-pos--mid { background: #2c2246; color: #c4a9ff; }
.club-pos--att { background: #173826; color: #8be3a4; }
.club-table .cc-score { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 6px; font-size: .86rem; font-weight: 800; white-space: nowrap; }
.club-table__growth { color: #9fb0c4; }
.club-table__growth-mobile { display: none; }
.club-table__save .scout-actions, .club-table__save > * { justify-content: center; }

@media (max-width: 767px) {
  .club-page { padding: 12px 14px 40px; }
  .club-hero__actions { margin-top: 6px; grid-column: 1 / -1; grid-row: auto; justify-self: center; }
  .club-stats > div { padding: 0 4px; }
  .club-stats dd { font-size: .92rem; }
  .club-table__wide { display: none !important; }
  .club-table th, .club-table td { padding-left: 4px; padding-right: 4px; }
  .club-player a { max-width: calc(100vw - 290px); font-size: .82rem; }
  .club-player img[data-player-portrait] { width: 34px; height: 38px; flex-basis: 34px; }
  .club-player .nation-flag { display: none; }
  .club-table__pot { line-height: 1.1; }
  .club-table__growth-mobile { display: block; margin-top: 2px; color: #8fa0b4; font-size: .62rem; }
  .club-sort select { min-width: 0; width: 120px; }
  .cc-database-link { display: none; }
  .club-squad__side { display: none; }
}

/* Sidebar cards. */
.club-card { padding: 14px; border: 1px solid #ffffff14; border-radius: 14px; background: #10171f; }
.club-card + .club-card { margin-top: 14px; }
.club-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.club-card h3 { margin: 0; font-size: .92rem; }
.club-card header a { color: #6fb2ff; font-size: .74rem; text-decoration: none; }
.club-card__note { margin: 8px 0 0; color: #7f91a6; font-size: .66rem; }
.club-xi__meta { display: flex; justify-content: space-between; margin: 0 0 8px; color: #9fb0c4; font-size: .72rem; }
.club-xi__meta i { display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: #3d8ff0; vertical-align: middle; }
.club-xi__meta b { color: #8be3a4; font-size: .9rem; }
.club-xi__pitch { display: grid; gap: 6px; padding: 10px 6px; border: 1px solid #ffffff1a; border-radius: 10px; background: linear-gradient(#13261b, #0f1f16); }
.club-xi__row { display: flex; justify-content: space-around; gap: 4px; }
.club-xi__slot { display: grid; justify-items: center; gap: 1px; width: 58px; text-align: center; }
.club-xi__slot img { width: 34px; height: 38px; object-fit: cover; object-position: top; border-radius: 50%; background: #1d2b22; }
.club-xi__slot b { max-width: 58px; overflow: hidden; color: #fff; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.club-xi__slot small { color: #9fb0c4; font-size: .56rem; }
.club-xi__slot em { color: #8be3a4; font-style: normal; font-weight: 800; }
.club-profile-card dl { margin: 0; }
.club-profile-card dl > div { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid #ffffff0d; font-size: .8rem; }
.club-profile-card dt { display: flex; align-items: center; gap: 8px; color: #c9d6e5; }
.club-profile-card dd { display: flex; gap: 18px; margin: 0; color: #9fb0c4; }
.club-profile-card dd b { color: #8be3a4; }
.club-dot { width: 6px; height: 6px; border-radius: 50%; }
.club-dot--gk { background: #f2d36b; } .club-dot--def { background: #8cc4ff; } .club-dot--mid { background: #c4a9ff; } .club-dot--att { background: #8be3a4; }

/* No sideways scrolling or zoom jumps on phones: nothing may be wider than the screen. */
.club-page, .club-page * { min-width: 0; }
html:has(.club-page), body:has(.club-page) { overflow-x: hidden; }

/* Tabs as a simple underlined row (like the player page). */
.club-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #ffffff14; }
.club-tabs .cc-section-nav { display: flex !important; gap: 4px; margin: 0; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; overflow-x: auto; scrollbar-width: none; }
.club-tabs .cc-section-nav a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px !important; border: 0 !important; border-radius: 0 !important;
  border-bottom: 2px solid transparent !important; background: none !important; box-shadow: none !important; color: #9fb0c4; font-size: .86rem; font-weight: 650; white-space: nowrap; text-decoration: none; }
.club-tabs .cc-section-nav a[aria-selected="true"] { color: #fff; border-bottom-color: #3d8ff0 !important; }
.club-tabs .cc-database-link { color: #6fb2ff; font-size: .78rem; text-decoration: none; white-space: nowrap; }
@media (max-width: 767px) { .club-tabs .cc-section-nav { width: 100%; justify-content: space-between; } .club-tabs .cc-section-nav a { padding: 0 6px !important; font-size: .8rem; } }
.club-page .club-pos { min-width: 30px !important; white-space: nowrap; }
.club-table__pos { white-space: nowrap; }
.club-table__save .scout-menu-trigger, .club-table__save button { width: 32px; height: 32px; min-height: 32px; padding: 0; border-color: transparent !important; background: transparent !important; }
.club-table th a span[aria-hidden], .club-table th svg { font-size: .7em; opacity: .7; }

/* Club and manager pages share the player page layout (player-page.css): same hero, value strip,
   key facts and tabs. Only the differences live here. */
.dp-page.pp-page { max-width: 1120px; }
.dp-hero .pp-rating strong small { font-size: .5em; font-weight: 800; letter-spacing: 0; }
.dp-hero .pp-rating strong.club-hero__value { display: inline-block; }
.dp-crest { display: grid; place-items: center; aspect-ratio: 1; width: clamp(120px, 34vw, 170px); }
.dp-crest img { width: 78%; height: 78%; object-fit: contain; object-position: center; -webkit-mask-image: none; mask-image: none; filter: drop-shadow(0 10px 28px #000a); }
.dp-hero h1 strong { color: #fff; font-weight: 800; }
.dp-league { width: 28px; height: 28px; object-fit: contain; border-radius: 0; background: none; padding: 0; }
.dp-type { color: #9fb0c4; font-size: .8rem; }
.dp-credit { grid-column: 1 / -1; margin: 2px 0 0; font-size: .68rem; }
.dp-credit a { color: #8fa0b4; text-decoration: none; }
.pp-money strong a { color: inherit; text-decoration: none; }
.pp-money strong a:hover { color: #6fb2ff; }
.dp-tabbar { margin-top: 4px; }
.dp-page .pp-tabs .club-tab-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: #1d2b3b; color: #9fc6f2; font-size: .72rem; font-weight: 700; }
.dp-page .club-card, .dp-page .club-xi, .dp-page .club-profile-card { border: 1px solid #ffffff1a; border-radius: 14px; background: #0f161e; }
.dp-page .pp-facts { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
