/* ============================================================
   Fisch CPT ACF Viewer 2 — Stylesheet (Final)
   Author: Ismail Fahmi
   Description: Styling untuk tampilan tabel, file items, tooltip,
                dan dukungan responsive + visual improvements.
   ============================================================ */

/* --- File Item Styling --- */
.fisch-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fisch-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fisch-file-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  text-decoration: none;
  position: relative;
}

.fisch-icon {
  display: block;
  max-width: 32px;
  height: auto;
  border-radius: 4px;
}

.fisch-generic-icon {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
}

/* --- File Meta (Category + Size) --- */
.fisch-file-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 4px;
}

.fisch-file-cat {
  font-size: 11px;
  color: #777777;
  line-height: 1;
}

.fisch-file-size {
  font-size: 9px;
  color: #a1a1a1;
  line-height: 9px;
}

.fisch-file-size-right {
  margin-left: 6px;
  font-size: 11px;
  color: #a1a1a1;
}

/* --- Tooltip (CSS-only) --- */
.fisch-file-icon-link[data-tooltip] {
  cursor: pointer;
}

.fisch-file-icon-link[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  bottom: 100%;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
  z-index: 9999;
}

.fisch-file-icon-link[data-tooltip]:hover::after,
.fisch-file-icon-link[data-tooltip]:focus::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-12px);
}

/* --- Table Styling --- */
.fisch-table,
.fisch-table th,
.fisch-table td {
  font-size: 15px;
}

.fisch-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

/* Header background */
.fisch-table thead th {
  background-color: #e7e7e7;
  font-weight: 600;
  padding: 10px 8px;
  text-align: left;
}

/* Even row background */
.fisch-table tbody tr:nth-child(even) {
  background-color: #f3f3f3;
}

/* Bold Title column */
.fisch-table tbody td:first-child {
  font-weight: 600;
}

/* Table cell padding */
.fisch-table td {
  padding: 8px;
  vertical-align: top;
}

/* DataTables elements */
.dataTables_wrapper .dataTables_length select {
  width: auto !important;
}

.dataTables_wrapper .dataTables_info {
  font-size: 12px;
  color: #555;
}

.dataTables_wrapper .dataTables_paginate {
  font-size: 12px;
}

.dataTables_wrapper .dataTables_paginate a,
.dataTables_wrapper .dataTables_paginate span {
  padding: 4px 8px;
}

.fisch-group-link {
  display: block;
  text-align: left;
}
.fisch-group-link a {
  font-size: 14px;
  color: #005fa3;
  font-weight: 500;
  text-decoration: none;
}
.fisch-group-link a:hover {
  text-decoration: underline;
}
.fisch-group-link span {
  font-weight: 500;
  color: #333;
}



/* --- Responsive Table (for mobile / tablet) --- */
@media screen and (max-width: 768px) {
  .fisch-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fisch-table {
    min-width: 600px; /* tetap bisa discroll horizontal */
    border-collapse: collapse;
  }

  .fisch-table th,
  .fisch-table td {
    white-space: nowrap;
    font-size: 13px;
  }

  .dataTables_wrapper {
    overflow-x: auto;
    padding-bottom: 8px;
  }
}
