/* ============================================================ */
/* TOF Akordiyon v4 - Performans ve Premium Kullanıcı Arayüzü Yükseltmesi */
/* TEMİZ SÜRÜM - ESKİ KOD KALDIRILDI */
/* ============================================================ */

/* Temel Sıfırlamalar ve Yazı Tipleri */
.tof-competition-widget {
  font-family: 'Barlow Condensed', sans-serif;
}

/* Akordiyon Konteyneri - KESİNTİSİZ LİSTE */
.tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 12px;
  overflow: visible;
}

.tab.v4-accordion {
  background: transparent;
  width: 100%;
  border: 1px solid #eef0f2;
  margin-top: -1px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AÇIK DURUM GÖRÜNTÜSÜ */
.tab.v4-accordion.is-open {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 10;
  border-color: #ff7c0a;
  margin: 10px 0;
  border-radius: 12px;
}

/* Akordion Başlığı */
.tab-button {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: #2c3e50;
  color: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 1.5em;
  font-weight: 500;
  letter-spacing: 0.8px;
  position: relative;
  transition: all 0.3s ease;
  outline: none;
}

.tab-button[aria-expanded="true"] {
  background: #1a252f;
}

.tab-label-text {
  flex-grow: 1;
}

.tab-button:hover {
  background: #1a252f;
}

/* TOPLAM SAYI PİLS - SAĞA HİZALANMIŞ */
.tab-count-pill {
  font-size: 0.95em;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 16px;
  border-radius: 8px;
  margin-right: 15px;
  font-weight: 700;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

/* OK İkonu */
.tab-button::after {
  content: "\276F";
  font-size: 0.8em;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-button[aria-expanded="true"]::after {
  transform: rotate(90deg);
}

/* ============================================================ */
/* HİBRİT KONTROL ÇUBUĞU & OKUNABİLİRLİK DÜZELTMELERİ                        */
/* ============================================================ */

.tof-control-wrapper {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  /* Masaüstünde anında sarmalamayı önler */
  gap: 20px;
}

@media (max-width: 768px) {
  .tof-control-wrapper {
    flex-wrap: wrap;
  }
}

.tof-status-filter {
  display: inline-flex;
  background: #f1f3f5;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tof-status-filter::-webkit-scrollbar {
  display: none;
}

.tof-view-actions {
  display: flex;
  gap: 10px;
}

.tof-action-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tof-action-btn .icon {
  font-size: 18px;
  color: #ff7c0a;
}

.tof-action-btn:hover {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.tof-action-toggle[aria-pressed="true"] {
  background: #fff7ed;
  border-color: rgba(255, 124, 10, .45);
  color: #334155;
}

/* ARAMA GİRİŞİ OKUNABİLİRLİK DÜZELTMELERİ */
.tof-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 12px;
  align-items: center;
}

@media (max-width: 768px) {
  .tof-filter-row {
    grid-template-columns: 1fr;
  }
}

.tof-club-filter {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  position: relative;
}

.tof-club-filter.has-value {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.tof-club-filter::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid #111;
  pointer-events: none;
  transform: translateY(-45%);
}

.tof-club-filter.has-value::after {
  right: 62px;
}

.tof-global-search,
.tof-club-search,
.tof-club-select,
.tabSearch {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  box-sizing: border-box !important;
  padding: 0 20px !important;
  margin: 0 !important;
  font-size: 18px !important;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 500;
  background: #fdfdfd;
  line-height: 44px;
}

.tof-club-search {
  min-width: 0;
  padding-right: 44px !important;
}

.tof-club-select {
  display: none !important;
  min-width: 0;
  padding-right: 44px !important;
}

.tof-club-options {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 52px;
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d8dee6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.tof-club-filter.is-open .tof-club-options {
  display: block;
}

.tof-club-option {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
}

.tof-club-option:hover,
.tof-club-option:focus {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.tof-club-option[hidden] {
  display: none !important;
}

.tof-club-search::-webkit-search-cancel-button {
  display: none;
}

.tof-club-search::-webkit-calendar-picker-indicator {
  opacity: 0;
}

.tof-club-clear {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: #e2e8f0;
  color: #475569;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.tof-club-filter.has-value .tof-club-clear {
  display: flex;
}

.tof-club-clear:hover,
.tof-club-clear:focus {
  background: #ff7c0a;
  color: #fff;
  outline: none;
}

@media (max-width: 520px) {
  .tof-search-container {
    padding: 16px;
  }

  .tof-control-wrapper {
    gap: 12px;
  }

  .tof-status-filter,
  .tof-view-actions {
    width: 100%;
  }

  .tof-view-actions {
    justify-content: stretch;
  }

  .tof-action-btn {
    flex: 1 1 0;
    justify-content: center;
    padding: 10px 12px;
  }

  .tof-club-search {
    display: none !important;
  }

  .tof-club-select {
    display: block !important;
  }

  .tof-club-options {
    display: none !important;
  }

  .tab-content-overflow {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}

/* Placeholder görünürlüğü */
.tof-global-search::placeholder,
.tof-club-search::placeholder,
.tof-club-select,
.tabSearch::placeholder {
  font-size: 18px !important;
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.tof-filter-pill {
  border: none;
  background: transparent;
  color: #555;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.25s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0;
  line-height: 1;
}

.tof-filter-label {
  white-space: nowrap;
}

.tof-filter-count {
  min-width: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.80);
  color: #f0f0f0;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.tof-filter-pill.active {
  background: #ff7c0a;
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 124, 10, 0.25);
}

.tof-filter-pill.active .tof-filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* PERFORMANS GECİKME GİDERME: CSS TABANLI DURUM FİLTRESİ */
.tof-competition-widget[data-active-status="kesin-kayit"] tr[data-status]:not([data-status~="kesin-kayit"]) {
  display: none !important;
}

.tof-competition-widget[data-active-status="on-kayit"] tr[data-status]:not([data-status~="on-kayit"]) {
  display: none !important;
}

.tof-competition-widget[data-active-status="olimpik-havuz"] tr[data-status]:not([data-status~="olimpik-havuz"]) {
  display: none !important;
}

.tof-competition-widget[data-active-status="tohm"] tr[data-status]:not([data-status~="tohm"]) {
  display: none !important;
}

.tof-competition-widget[data-active-status="sem"] tr[data-status]:not([data-status~="sem"]) {
  display: none !important;
}

/* GRID ANIMASYONU */
.tab-content-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
}

.tab-button[aria-expanded="true"]+.tab-content-wrapper {
  grid-template-rows: 1fr;
}

.tab-content-inner {
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

.tab-content-overflow {
  padding: 25px;
  font-size: 1em;
  color: #1e293b;
}

/* Kontrol Merkezi Konteyneri */
.tof-search-container {
  background: #ffffff;
  padding: 2em;
  border-radius: 12px;
  box-shadow: none;
  margin-bottom: 12px;
  border: 1px solid #eef0f2;
}

/* Tablo Stil */
table.responsive.yarismaci {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

table.responsive.yarismaci thead th {
  background: #f8fafc;
  color: #475569;
  padding: 16px;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
  font-weight: 700;
}

table.responsive.yarismaci tbody td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
}

h2 {
  font-family: "Barlow Condensed", sans-serif;
}
