/* -------------------------------------------------------
   TOF Directory - Athlete Profile Styles (v1.0.8 - Clean Layout)
   Bootstrap'a bağımlılık yok — CSS Grid/Flex ile kendi layout'umuz.
-------------------------------------------------------- */

/* === WRAPPER === */
.tof-profile {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 6px solid var(--tof-accent);
  padding: 40px;
  margin-top: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: #334155;
  clear: both;
  position: relative;
  z-index: 1 !important; /* Sticky menünün (genelde 9999+) altında kalmasını sağlar */
}

/* === ÜST YARDIMCI ARAÇLAR (Utility Bar) === */
.tof-upper-utility-bar {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid #f8fafc;
  padding-bottom: 8px;
}

.tof-back-utility-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  text-decoration: none !important;
  padding: 4px 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 5px !important;
  background: #fdfdfd !important;
  transition: all 0.2s !important;
  line-height: normal !important;
}

.tof-back-utility-btn:hover {
  color: var(--tof-accent) !important;
  border-color: var(--tof-accent) !important;
  background: #fff !important;
}

.tof-print-utility-btn {
  color: #cbd5e1 !important;
  font-size: 20px !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
  display: flex !important;
  align-items: center !important;
  height: 28px; /* Dizin butonu yüksekliğiyle eşitlemek için */
}

.tof-print-utility-btn:hover {
  color: #4e5964 !important;
}

/* === ÜSTÜN BAŞLIĞI === */
.tof-profile__top-header {
  text-align: center;
  margin-bottom: 40px;
}

.tof-profile__name {
  font-family: 'Barlow Condensed', sans-serif !important;
  font-size: 5.5em !important; /* Boyut artırıldı */
  line-height: 1.1 !important;
  margin: 0 0 20px 0 !important;
  color: #4e5964 !important;
  text-align: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 0 0.25em !important;
  letter-spacing: -1px !important;
}

.tof-profile__name .fname {
  font-weight: 400 !important; /* Ad Normal */
}

.tof-profile__name .lname {
  font-weight: 500 !important; /* Soyad 500 */
}

.tof-profile__divider-main {
  width: 60px;
  height: 5px;
  background: var(--tof-accent);
  margin: 0 auto;
  border-radius: 3px;
}

/* === DASHBOARD LAYOUT (CSS Grid — Bootstrap yoktur) === */
.tof-profile__dashboard {
  display: grid !important;
  grid-template-columns: 260px 1fr !important;
  gap: 30px !important;
  align-items: start !important;
}

/* === SİDEBAR === */
.tof-profile__sidebar-card {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  text-align: center;
}

.tof-profile__avatar-container {
  position: relative;
  width: 100%;
  margin-bottom: 35px; /* Olimpiyat rozeti taşması için artırıldı */
}

.tof-profile__avatar {
  width: 100% !important;
  max-width: 220px !important;
  height: auto !important;
  border-radius: 6px !important;
  border: 3px solid #fff !important;
  outline: 1px solid #e2e8f0 !important;
  display: block !important;
  margin: 0 auto !important;
  position: relative;
  z-index: 1;
}

/* Olimpiyat rozeti — Fotoğrafın alt ortasına tam overlap (yarısı içeride yarısı dışarıda) */
/* .tof-tooltip içindeki position:relative !important kuralını ezmek için ID + Class spesifikliği kullanıyoruz */
#tof-report-modal-trigger .tof-profile__olympic-badge-wrap,
.tof-profile__avatar-container .tof-profile__olympic-badge-wrap {
  position: absolute !important;
  bottom: -26px !important; /* 52px ikonun tam yarısı fotoğrafın üzerinde/altında */
  left: 50% !important;
  transform: translateX(-50%) !important; /* Yatayda kusursuz ortalama */
  width: 52px !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
}

/* Tooltip içindeki ikonu da dikeyde ortala */
.tof-profile__olympic-badge {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

.tof-profile__olympic-badge {
  width: 100% !important;
  height: 100% !important;
  background: #fff !important;
  border-radius: 50% !important;
  padding: 5px !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important;
  display: block !important;
  object-fit: contain !important;
}

/* Olimpiyat Tooltip Pozisyonu Fix */
.tof-profile__olympic-badge-wrap .tof-tooltiptext {
  bottom: calc(100% + 2px) !important; /* İkonun üstüne tam yapışsın */
  left: 50% !important;
  transform: translateX(-50%) translateY(5px) !important;
}

.tof-profile__olympic-badge-wrap:hover .tof-tooltiptext {
  transform: translateX(-50%) translateY(0) !important;
}

/* === DURUM İKONLARI ===
   Tüm ikonların görünümü, arka planı, dikey ortalaması vb.
   tof-directory.css'teki ortak bileşen (.tof-dir__badges--icons) içerisinden alınmaktadır.
*/
.tof-profile__sidebar-icons {
  margin: 16px 0 !important;
  line-height: 1 !important; /* Theme line-height reset */
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
}

.tof-profile__sidebar-icons .tof-dir__badge {
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.tof-profile__sidebar-icons i,
.tof-profile__sidebar-icons svg {
  line-height: 1 !important;
}

/* === META BİLGİLER === */
.tof-profile__sidebar-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0 0 16px 0;
}

.tof-profile__sidebar-meta {
  text-align: left;
}

.tof-profile__sidebar-meta .meta-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.tof-profile__sidebar-meta .meta-icon {
  color: #334155;
  font-size: 16px;
  width: 20px;
  margin-top: 4px;
  flex-shrink: 0;
}

.tof-profile__sidebar-meta .meta-label {
  display: block;
  font-size: 18px; /* Daha okunaklı bir font boyutu (Bölge/Kulüp) */
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
  line-height: 1.2;
}

.tof-profile__sidebar-meta .meta-value {
  display: block;
  font-size: 16px; /* İçerik fontu arttırıldı (Antalya Bölgesi) */
  font-weight: 400;
  color: #64748b;
  line-height: 1.4;
}

/* === ANA İÇERİK === */
.tof-profile__content {
  min-width: 0; /* grid overflow fix */
}

/* Utility Bar yukarı taşındığından eski seçiciler kaldırıldı */

/* === METRİK KARTLAR (FLEX — col-* yoktur) === */
.tof-profile__metrics {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  margin-bottom: 32px !important;
}

.tof-metric-col {
  flex: 1 1 calc(25% - 16px) !important;
  min-width: 130px !important;
}

.tof-metric-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.tof-metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.metric-card-header {
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-card-header i {
  font-size: 26px;
  color: #fff;
}

.metric-card-body {
  padding: 16px 10px 18px;
  background: #fff;
}

.metric-card-value {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
  font-family: 'Barlow Condensed', sans-serif;
}

.metric-card-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: #334155;
  line-height: 1.3;
}

.metric-card-subtext {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Renk Teması */
.card-red .metric-card-header    { background: #ff6b6b; }
.card-red .metric-card-value     { color: #e74c3c; }

.card-green .metric-card-header  { background: #51cf66; }
.card-green .metric-card-value   { color: #2ecc71; }

.card-yellow .metric-card-header { background: #fcc419; }
.card-yellow .metric-card-value  { color: #f39c12; }

.card-purple .metric-card-header { background: #9775fa; }
.card-purple .metric-card-value  { color: #7950f2; }

.card-orange .metric-card-header { background: #ff7c0a; }
.card-orange .metric-card-value  { color: #e8690a; }

.card-gold .metric-card-header   { background: #e8a908; }
.card-gold .metric-card-value    { color: #c78a00; }

/* === SEKMELER (TABS) === */
.tof-profile__tabs {
  margin-top: 10px;
}

.tof-profile__tabs-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 20px !important;
}

.tof-profile__tabs .nav-tabs {
  border-bottom: none !important;
  display: flex !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

.tof-profile__tabs .nav-tabs .nav-item {
  margin: 0 !important;
}

/* Sekme Linki (Varsayılan: Pasif ama Okunabilir) */
.tof-profile__tabs .nav-tabs .nav-link {
  display: block !important;
  font-family: 'Barlow Condensed', sans-serif !important;
  font-size: 30px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  color: #94a3b8 !important; /* Standart pasif gri */
  padding: 12px 24px !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  text-decoration: none !important;
  border-bottom: 3px solid transparent !important;
  margin-bottom: -1px !important;
  opacity: 0.5 !important; /* Okunabilirlik için 0.2'den 0.5'e çıkarıldı */
  transition: all 0.2s ease !important;
}

/* Aktif Durum (Sadece parent LI aktifse uygula - En güvenilir yöntem) */
.tof-profile__tabs .nav-tabs .nav-item.active .nav-link {
  color: #4e5964 !important;
  opacity: 1 !important;
  border-bottom-color: var(--tof-accent) !important;
}

/* Hover Durumu */
.tof-profile__tabs .nav-link:hover {
  color: #4e5964 !important;
  opacity: 1 !important;
}

/* Sağ Panel: Kayıt Sayıları */
.tof-profile__tabs-counts {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  font-family: var(--tof-font-family, inherit) !important;
  font-size: 15px !important;
  color: #64748b !important; /* Biraz daha belirgin bir gri */
  text-transform: none !important;
  font-weight: 400 !important;
  padding-right: 15px;
}

.tof-profile__tabs-counts b {
  color: #4e5964 !important;
  font-weight: 600 !important;
  margin-left: 4px;
}

.count-divider {
  margin: 0 12px !important;
  color: #e2e8f0 !important;
}

/* === TABLOLAR === */
.tof-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-family: system-ui, -apple-system, sans-serif !important;
}

.tof-table thead th {
  background: #4e5964 !important;
  color: #fff !important;
  font-family: 'Barlow Condensed', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 12px 14px !important;
  border: none !important;
}

.tof-table tbody td {
  padding: 13px 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #334155 !important;
  font-size: 15px !important;
  vertical-align: middle !important;
}

.tof-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.tof-table tbody tr:hover td {
  background: #f0f9ff;
}

/* === MOBİL === */
@media (max-width: 900px) {
  .tof-profile__dashboard {
    grid-template-columns: 1fr !important;
  }
  .tof-profile__name {
    font-size: 36px !important;
  }
  .tof-metric-col {
    flex: 1 1 calc(50% - 16px) !important;
  }
}

@media (max-width: 500px) {
  .tof-profile { padding: 16px; }
  .tof-metric-col {
    flex: 1 1 100% !important;
  }
}
/* === MADALYA VE KUPA İKONLARI === */
.tof-medal-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
}

.medal-gold, .medal-silver, .medal-bronze,
.kupa-gold, .kupa-silver, .kupa-bronze {
  display: inline-block !important;
  width: 28px !important;
  height: 28px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  vertical-align: middle !important;
}

/* Madalya Görselleri */
.medal-gold   { background-image: url('../../../images/mypage/gold.png') !important; }
.medal-silver { background-image: url('../../../images/mypage/silver.png') !important; }
.medal-bronze { background-image: url('../../../images/mypage/bronz.png') !important; }

/* Kupa Görselleri */
.kupa-gold   { background-image: url('../../../images/mypage/kaltin.png') !important; }
.kupa-silver { background-image: url('../../../images/mypage/kgumus.png') !important; }
.kupa-bronze { background-image: url('../../../images/mypage/kbronz.png') !important; }

/* Print yönetimi: Ekranda gizle, yazıcıda göster (PHP tarafındaki spanlar için) */
.tof-print-only-text {
  display: none !important;
}

@media print {
  .tof-ui-only { display: none !important; }
  .tof-print-only-text { display: inline !important; }
}

/* === MODERN TOOLTIP (Dizin Sayfası Uyumu) === */
.tof-tooltip {
  position: relative !important;
  cursor: pointer !important;
  display: inline-flex !important;
}

.tof-tooltiptext {
  visibility: hidden !important;
  position: absolute !important;
  width: max-content !important;
  max-width: 250px !important;
  background-color: #1e293b !important;
  color: #f8fafc !important;
  text-align: center !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  z-index: 1000 !important;
  bottom: calc(100% + 12px) !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(5px) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2) !important;
  pointer-events: none !important;
  white-space: normal !important;
}

.tof-tooltiptext strong {
  display: block !important;
  font-size: 13px !important;
  color: var(--tof-accent) !important;
  margin-bottom: 4px !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  padding-bottom: 4px !important;
}

.tof-tooltiptext span {
  display: block !important;
  opacity: 0.9 !important;
}

.tof-tooltiptext::after {
  content: "" !important;
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  margin-left: -6px !important;
  border-width: 6px !important;
  border-style: solid !important;
  border-color: #1e293b transparent transparent transparent !important;
}

.tof-tooltip:hover .tof-tooltiptext {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* Tablo hücrelerinde tooltip'in görünmesi için overflow ayarı */
.table-responsive {
  overflow: visible !important;
}

.tof-table tbody td {
  position: relative !important;
}

/* EOF */
