/* === Shared DataTables Styles === */

/* Hide default sort arrows */
table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:after {
  display: none !important;
}

/* Header look */
table.dataTable thead th {
  background-color: rgba(30,41,59,.85);
  font-size: 1rem;
  font-weight: 700;
  color: #38bdf8;
  text-shadow: 0 0 6px rgba(56,189,248,.7);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(250,204,21,.25);
  padding: .75rem;
  text-align: center;
}
table.dataTable thead th.has-active {
  color: #facc15 !important;
  text-shadow: 0 0 8px rgba(250,204,21,.9);
}

/* Sort buttons */
.sort-toggle button {
  background: transparent;
  border: 1px solid rgba(148,163,184,.3);
  color: #cbd5e1;
  font-size: .7rem;
  border-radius: 4px;
  padding: .15rem .4rem;
  transition: all .2s ease;
}
.sort-toggle button:hover {
  background: rgba(250,204,21,.15);
  color: #facc15;
  border-color: #facc15;
}
.sort-toggle button.active {
  background: #facc15;
  color: #1e293b;
  font-weight: 700;
}

/* Global controls (entries + search) */
.dt-global-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: .75rem 0;
  flex-wrap: wrap;
}
.dataTables_length select,
.dataTables_filter input {
  background: #1f2937;
  color: #facc15;
  border: 1px solid #334155;
  border-radius: .375rem;
  padding: .25rem .5rem;
}

/* Footer divider + footer */
.footer-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, #facc15, transparent);
  animation: pulse-soft 4s ease-in-out infinite;
  margin: .5rem 0;
}
@keyframes pulse-soft {
  0%,100% { opacity: .3 }
  50%     { opacity: 1 }
}
.dt-global-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .95rem;
  color: #fefce8;
}
.dataTables_paginate {
  display: flex;
  gap: .4rem;
}
.dataTables_paginate .paginate_button {
  background: transparent;
  border: 1px solid rgba(250,204,21,.4);
  color: #facc15 !important;
  padding: .3rem .75rem;
  border-radius: .4rem;
  transition: all .2s;
}
.dataTables_paginate .paginate_button:hover {
  background: rgba(250,204,21,.15);
  color: #fff !important;
  border-color: #facc15;
}
.dataTables_paginate .paginate_button.current {
  background: #facc15;
  color: #1e293b !important;
  font-weight: 700;
}

/* Zebra striping */
table.dataTable tbody tr:nth-child(odd):not(.gold-row):not(.silver-row):not(.bronze-row) {
  background: rgba(255,255,255,.03);
  color: #e2e8f0;
}
table.dataTable tbody tr:nth-child(even):not(.gold-row):not(.silver-row):not(.bronze-row) {
  background: rgba(255,255,255,.05);
  color: #f1f5f9;
}

/* Top 3 highlighting */
.gold-row td   { font-weight: 700; color: #facc15 }
.silver-row td { font-weight: 700; color: #e2e8f0 }
.bronze-row td { font-weight: 700; color: #f97316 }

.gold-row   { animation: pg 3s infinite alternate }
.silver-row { animation: ps 3s infinite alternate }
.bronze-row { animation: pb 3s infinite alternate }

@keyframes pg { from { box-shadow: inset 0 0 0 gold }   to { box-shadow: inset 0 0 15px gold } }
@keyframes ps { from { box-shadow: inset 0 0 0 silver } to { box-shadow: inset 0 0 15px silver } }
@keyframes pb { from { box-shadow: inset 0 0 0 #cd7f32 } to { box-shadow: inset 0 0 15px #cd7f32 } }

/* Remove table borders */
table.dataTable,
table.dataTable td,
table.dataTable th {
  border: none !important;
}

/* Scrollable tables (optional) */
.table-scroll {
  max-height: 650px;
  overflow-y: auto;
}
.table-scroll::-webkit-scrollbar { width: 0; background: transparent; }
