/* Competitions  */
.competition-container span {
  font-size: 0.875em;
}
.competition-container .small {
  font-size: 0.675em;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

a:link,
a:visited,
a:hover,
a:active {
  color: inherit;
  text-decoration: none;
}
.competition-container {
  max-width: 650px;
  min-height: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  background-color: var(--bg-kikof);
  border-right: 2px solid var(--border-aside-kikof);
  border-left: 2px solid var(--border-aside-kikof);
}
.competition-section {
  border: 1px solid var(--border-aside-kikof);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}
.competition-header {
  background-color: var(--card-bg-kikof);
  padding: 12px 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--border-aside-kikof);
}
.search-bar input {
  border-radius: 12px;
  border: 1px solid #ddd;
  width: 100%;
  padding: 10px 12px;
}
.competition-header .left {
  display: flex;
  align-items: center;
  gap: 10px;
 
}
.competition-header i{
   color: var(--color-kikof);
}
.competition-body {
  display: none;
  padding: 10px 20px;
}
.competition-item {
  display: flex;
  align-items: center;
  margin: 10px 0;
  color: var(--color-kikof) !important;
}
.competition-item a {
  text-decoration: none;
}
.competition-item img {
  width: 31px;
  height: auto;
  margin-right: 10px;
}
.competition-container .search .input-group > span,
.competition-container .search .input-group > input {
  background-color: var(--bg-search-main-kikof);
  border: 1px solid var(--bg-search-main-kikof);
  height: 44px;
  color: var(--color-kikof);
}
.competition-container .search .input-group > input::placeholder {
  color: #aaa;
}
.competition-container .search .input-group > span {
  border-right: 0;
  padding: 0 7px 0 15px;
}
.competition-container .search .input-group > input {
  border-left: 0;
}

/* League Page css */
.header-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;

}
.header-logo h3{
  color: var(--color-kikof);
}

.header-logo img {
  height: 70px;
}

.progress {
  height: 8px;
  background-color: #eee;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  background-color: rgba(3, 50, 68, 1);
  height: 8px;
  border-radius: 5px;
}

/* Boutons onglets */
.tabs-container button {
  margin-right: 8px;
  transition: all 0.3s ease;
}

.tabs-container button:hover {
  transform: translateY(-1px);
}
.kikof-btn-outline-primary {
  background-color: transparent;
  color: var(--color-kikof);
  border: 1px solid var(--bg-reaction-button-kikof);
  padding-left: 15px;
  padding-right: 15px;
  border-radius: 6px;
}
.kikof-btn-outline-primary.active{
  background-color: var(--bg-reaction-button-kikof);
  color: white !important;
  border-color: var(--border-aside-kikof);
}
.active-tab,
.kikof-btn-outline-primary:hover {
  background-color: rgba(28, 75, 93, 1);
  color: #ffffff;
  border: 1px solid rgba(28, 75, 93, 1);
  transition: all 0.3s ease;
}

.match-card {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-aside-kikof) !important;
}
.text-macht-leagues{
  color: var(--color-kikof) !important;
}

.match-card:last-child {
  border-bottom: none;
}
.border-top-kikof{
  border-top: var(--border-aside-kikof) !important;
}

.team-logo {
  width: 25px;
  height: 25px;
  margin-right: 8px;
}
.table-standings{
  background-color: var(--card-bg-kikof) !important;
}



.status-btn {
  background-color: #074d63;
  color: white;
  border: none;
  font-size: 13px;
  border-radius: 3px;
  padding: 2px 11px;
  width: max-content;
}

.stadium {
  font-size: 12px;
  color: #999;
}

.score {
  font-weight: 600;
}

/* Animation fade */
.fade {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.fade.show {
  display: block;
  opacity: 1;
}

/* Loader */
.loader {
  text-align: center;
  padding: 20px;
  color: #555;
}

.spinner-border {
  width: 2rem;
  height: 2rem;
}

/* Live details */

.match-container {
  max-width: 1000px;
  margin: 40px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
  animation: fadeIn 1s ease;
}

h5.section-title {
  border-bottom: 1px solid var(--border-aside-kikof);
  padding-bottom: 8px;
  margin-top: 35px;
  margin-bottom: 15px;
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
  color: var(--color-kikof);
}

#tab-live .team-logo {
  height: 31px;
  width: auto;
}

.live-detail .score {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--color-kikof);
}
.card-event-match{
  background-color: var(--bg-kikof) !important;
  color: var(--color-kikof) !important;
}
.goal,
.card,
.substitution {
  /* display: flex; */
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  transition: all 0.3s ease;
}

#tab-stats .card {
  align-items: normal;
}
#tab-stats .card:hover {
  background: none;
}

.goal:hover,
.card:hover,
.substitution:hover {
  border-radius: 6px;
}

.live-detail .card {
  display: block;
  border: 0;
}
.live-detail .card span {
  padding: 5px;
  vertical-align: middle;
}

.yellow-card {
  background: #bfa900;
  width: 14px;
  height: 20px;
  border-radius: 2px;
  margin-right: 6px;
  display: inline-block;
}

.red-card {
  background: red;
  width: 14px;
  height: 20px;
  border-radius: 2px;
  margin-right: 6px;
  display: inline-block;
}

.player-list .col,
.player-replace-list .col {
  padding: 6px 10px;
}
.player-list .col-auto,
.player-replace-list .col-auto {
  padding-right: 15px;
  padding-left: 0;
}

.player-list .right .col,
.player-replace-list .right .col {
  padding: 6px 10px;
}
.player-list .right .col-auto,
.player-replace-list .right .col-auto {
  padding-right: 0;
  padding-left: 15px;
}
.player-replace-list .row.left {
  justify-self: end;
  padding: 6px 10px;
}

.player-list .col:hover {
  border-radius: 6px;
}
.club-color {
  background-color: #d9d9d9;
  border-radius: 50%;
  width: 24px;
  height: 25px;
}

.suspendu {
  background-color: #d9d9d9;
  border-radius: 19px;
  padding: 8px 17px;
  width: auto;
  position: absolute;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Classement */
#tab-ranking {

  padding: 12px;

  width: fit-content;
}
#tab-ranking table {
  margin-bottom: 0;
}
table.table thead tr th{
  background-color: var(--bg-search-main-kikof) !important;
  color: var(--color-kikof) !important;
  border-bottom: none !important;
}
#tab-ranking table thead tr th,
#tab-ranking table tbody tr td {
  font-size: 14px;
}
#tab-ranking table tbody tr td {
  background-color: var(--bg-kikof) !important;
  border-top: 1px solid var(--border-aside-kikof) !important;
  border-bottom: 1px solid var(--border-aside-kikof) !important;
  padding: 10px;
  color: var(--color-kikof) !important;
}

#tab-ranking table tbody tr td .team-logo {
  height: 17px;
  width: auto;
}
div#tab-content{
  color: var(--color-kikof) !important;
}
/* Statistiques */
.card-stat {

  border-radius: 5px;
  padding: 1rem 1.5rem;
  text-align: center;
  border: 1px solid #ececec;
  display: flex;
}

.card-stat i {
  font-size: 2rem;
  color: #ffc107;
}

.tab-content {
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  overflow-x: auto;  /* enables horizontal scrolling */
}

/* Animation personnalisée */
.tab-pane {
  transition: all 0.5s ease-in-out;
  opacity: 0;
  transform: translateX(30px);
  position: absolute;
  width: 100%;
  top: 0;
}

.tab-pane.active.show {
  opacity: 1;
  transform: translateX(0);
  position: relative;
}

.team-list img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

.rank-circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  border: 1px solid #ececec;
}

.list-group-item {
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
}

.list-group-item:hover {
  background-color: #f8f9fa;
}

.nav-tabs {
  border: transparent;
}
.nav-tabs .nav-link.active {
  background-color: #0d6efd;
  color: white;
  border-radius: 0.5rem;
}

.nav-tabs .nav-link {
  color: #0d6efd;
  border: none;
}

.card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #ececec;
  border-radius: 5px;
}

#tab-stats {
  border: 1px solid #ececec;
  padding: 21px;
  border-radius: 12px;
  margin-top: 28px;
}
/* stats Tabs */
#statsTabs {
  justify-content: space-between;
  background-color: #f5f6f8; /* onglet actif */
  border-radius: 5px;
  padding: 5px;
}

#statsTabs .nav-link {
  flex: 1;
  border: none;
  background: transparent;
  font-weight: 600;
  color: #6c757d;
  border-radius: 5px;
  transition: all 0.25s ease;
  width: 100%;
}

#statsTabs .nav-link.active {
  background: #fff; /* onglet actif */
  color: #000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.tab-pane .card .team-logo.rounded-circle {
  width: 35px !important;
  height: 35px !important;
}
.tab-pane .card .color-4 {
  color: var(--color-kikof) !important;
}
.tab-pane .card h6 img {
  width: auto;
  height: 20px;
}


.group-card {

  border-radius: 6px;

  background: var(--bg-search-main-kikof);

  padding: 2.5rem 1.5rem;

  text-align: center;

  justify-content: center;

  font-weight: 400;

  font-size: 14px;

  display: flex;

  border: 0.2px solid var(--border-aside-kikof);
  color: var(--color-kikof);

}



/* --- Retour Button (aligned to match-container left) --- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.625rem 1rem;
  background-color: var(--bg-kikof);
  border: 1px solid var(--border-aside-kikof);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-kikof);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  
  /* Ensure it sticks to container's left side */
  margin-bottom: 1.25rem;
  margin-left: 0;  /* aligns to container’s inner left edge */
  display: block;  /* takes full control of its positioning */
}

.back-btn:hover {
  background-color: var(--bg-search-main-kikof);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.back-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Version Mobile */
@media (max-width: 575.98px) {
    .back-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    margin-left: 0;
  }

  .competition-container {
    max-width: none;
    min-height: 100%;
    margin: 0 auto;
    padding: 0;
    border-right: 0;
    border-left: 0;
    margin-top: 81px;
    display: flexbox;
  }
  /* Classement */
  .tabs-container {
    overflow: scroll;
    width: max-content;
  }
}


/* ===== League tabs (Live play / Matchs finis / À venir / Classement) ===== */
.tabs-container {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;                 /* swipe left / right when it doesn't fit */
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;            /* no visible scrollbar (Firefox) */
    scroll-snap-type: x proximity;
    padding-bottom: 2px;
}
.tabs-container::-webkit-scrollbar { display: none; }   /* no visible scrollbar (Chrome / phones) */

.tabs-container button {
    flex: 0 0 auto;                   /* each tab keeps its size, never squashed */
    white-space: nowrap;              /* "Matchs finis" stays on one line */
    scroll-snap-align: start;
}

/* Phone: slightly smaller tabs so more of them fit */
@media (max-width: 576px) {
    .tabs-container {
        gap: 6px;
    }
    .tabs-container button {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }
}

/* ===== Swipe hint for the league tabs ===== */
.tabs-swipe-wrap {
    position: relative;
    max-width: 100%;
}

/* Fade + arrow on each side (only shown when there's more to see) */
.tabs-swipe-hint {
    position: absolute;
    top: 0;
    bottom: 2px;
    width: 44px;
    display: none;
    align-items: center;
    z-index: 2;
    border: none;
    padding: 0;
    cursor: pointer;
}
.tabs-swipe-hint.right {
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(to right, rgba(18, 18, 18, 0), rgba(18, 18, 18, 0.95) 60%);
}
.tabs-swipe-hint.left {
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(to left, rgba(18, 18, 18, 0), rgba(18, 18, 18, 0.95) 60%);
}
.tabs-swipe-hint i {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-kikof, #fff);
    font-size: 14px;
}
.tabs-swipe-wrap.can-right .tabs-swipe-hint.right,
.tabs-swipe-wrap.can-left  .tabs-swipe-hint.left { display: flex; }

/* Small "nudge" animation on the right arrow so users notice they can swipe */
.tabs-swipe-wrap.can-right.hint-anim .tabs-swipe-hint.right i {
    animation: tabsNudge 1.2s ease-in-out 3;
}
@keyframes tabsNudge {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(4px); }
}

/* Light mode: fade to the light background instead of dark */
body.light .tabs-swipe-hint.right,
body.light-mode .tabs-swipe-hint.right {
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 60%);
}
body.light .tabs-swipe-hint.left,
body.light-mode .tabs-swipe-hint.left {
    background: linear-gradient(to left, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 60%);
}

body.light-kikof .tabs-swipe-hint.right {
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 60%);
}
body.light-kikof .tabs-swipe-hint.left {
    background: linear-gradient(to left, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 60%);
}

.competition-item .other-comp-icon {
  width: 31px;
  margin-right: 10px;
  text-align: center;
  font-size: 1.2rem;
  color: var(--color-kikof);
}

/* Spinner on the clicked competition */
.competition-item.is-loading { opacity: 0.6; pointer-events: none; }
.competition-item.is-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  margin-left: auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: compSpin 0.7s linear infinite;
}
@keyframes compSpin { to { transform: rotate(360deg); } }

/* ===== "Autres ligues" page ===== */
.other-league-trophy {
    font-size: 52px;
    width: 70px;
    text-align: center;
    color: var(--color-kikof);
}
.other-league-when {
    min-width: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.status-btn.status-live { background-color: #dc2626; }


/* ===== Form (last 5): W / D / L ===== */
.st-form { text-align: start; white-space: nowrap; }
.st-f {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  margin-inline-end: 3px;
}
.st-f--W { background: #22c55e; }
.st-f--D { background: #9ca3af; }
.st-f--L { background: #ef4444; }


/* ===== Back button on links: always readable (dark + light mode) ===== */
a.back-btn,
a.back-btn:link,
a.back-btn:visited,
a.back-btn:hover,
a.back-btn:active {
  color: var(--color-kikof) !important;
  border-color: var(--bg-reaction-button-kikof);
  background-color: transparent;
  font-weight: 600;
}
a.back-btn i { color: inherit; }
a.back-btn:hover {
  background-color: var(--bg-reaction-button-kikof);
  color: #fff !important;
}

/* ===== Substitutions: player IN (green) / player OUT (red) ===== */
.sub-row { display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.text-end .sub-row { justify-content: flex-end; }
.sub-names { display: inline-flex; flex-direction: column; line-height: 1.25; }
.text-end .sub-names { align-items: flex-end; }
.text-start .sub-names { align-items: flex-start; }
.sub-in { font-weight: 600; }
.sub-in i { color: #22c55e; font-size: 1.1em; }
.sub-out { font-size: .82em; opacity: .7; }
.sub-out i { color: #ef4444; font-size: 1.1em; }


/* Substitutions: override the old rules (space-between + smaller nested spans) */
.competition-container .substitution.sub-row { justify-content: flex-start; }
.competition-container .text-end .substitution.sub-row { justify-content: flex-end; }
.competition-container .sub-names span { font-size: 1rem; }
.competition-container .sub-names .sub-in { font-weight: 600; }
.competition-container .sub-names .sub-out { font-size: .82rem; font-weight: 400; opacity: .7; }

/* ===== Manual match page ===== */
.mi-link { display: block; color: inherit; text-decoration: none; }
.mi-link:hover .match-card { background: rgba(127, 127, 127, .06); }
.mi-stage { display: inline-block; margin-top: 4px; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(245, 158, 11, .18); color: #f59e0b; }
.mi-meta { margin-top: 14px; font-size: .85rem; opacity: .75; line-height: 1.7; }
.mi-status--live { color: #dc2626; }
.mi-empty { text-align: center; opacity: .7; margin: 20px 0; }
.mi-assist { font-size: .78rem; opacity: .65; }
.mi-missed { opacity: .7; }
.mi-captain {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin: 0 4px;
  border-radius: 50%; background: #f59e0b; color: #111; font-size: .65rem; font-weight: 800; vertical-align: middle;
}
.mi-coach { font-weight: 600; }
.mi-coach i { color: #2a7f9e; }

.goal-assist { font-size: .78rem; opacity: .65; font-weight: 400; }

/* ===== Search in the match lists ===== */
.match-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  margin: 4px 0 14px; padding: 0 12px; height: 44px; border-radius: 12px;
  background: var(--bg-search-main-kikof); border: 1px solid var(--bg-search-main-kikof);
}
.match-search[hidden] { display: none; }
.match-search__icon { opacity: .6; }
.match-search__input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--color-kikof); font-size: .92rem;
}
.match-search__input::placeholder { color: #999; }
.match-search:focus-within { border-color: #2a7f9e; }
.match-search__count { font-size: .78rem; font-weight: 700; opacity: .7; white-space: nowrap; }
.match-search__none { text-align: center; opacity: .75; margin: 18px 0; }
[dir="rtl"] .match-search__input { text-align: right; }


/* Search bar: icon and "X / 30" counter clearly visible in dark mode */
body.dark-kikof .match-search__icon,
body.dark-kikof .match-search__count {
  color: #ffffff;
  opacity: .9;
}
body.dark-kikof .match-search__input::placeholder { color: #b0b0b0; }
body.dark-kikof .match-search__input::-webkit-search-cancel-button { filter: invert(1); }

