/* OnlyFanOuts - Grid Systems, Spacing & Responsive Utilities
 *
 * @author Sander Tamaela
 * @created 2026-02-14
 * @modified 2026-10-04
 */

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* KPI Grid */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; text-align: left; }
@media (max-width: 960px) { .stats-row { grid-template-columns: 1fr; } }

/* Date range */
.date-range { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 560px) { .date-range { grid-template-columns: 1fr; } }

/* Config grid */
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.config-item { background: white; padding: 10px; border-radius: var(--radius-sm); }
.config-item strong { display: block; margin-bottom: 5px; color: #555; }

/* Weight items (visibility-weights.php) */
.weight-item { background: white; padding: 15px; border-radius: var(--radius-sm); }
.weight-item label { display: flex; justify-content: space-between; margin-bottom: 8px; }
.weight-value { color: var(--blue-700); font-weight: bold; }
input[type="range"] { width: 100%; }

/* Navigation row */
.nav { display: flex; justify-content: space-between; margin: 12px 0; }

/* Filter banner */
.filter-banner { margin: 12px 0; font-size: 15px; color: var(--gray-900); }

/* Row actions */
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.row-actions a { margin-right: 8px; }

@media (max-width: 640px) {
  .row-actions { flex-direction: column; align-items: flex-start; gap: 8px; }
  .row-actions .btn { width: auto; }
}

/* Spacing utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }

/* Back to top button */
.ofo-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--blue-500);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
  opacity: 0;
  transform: translateY(8px);
}
.ofo-back-to-top.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.ofo-back-to-top:hover {
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}
.ofo-back-to-top:active {
  transform: translateY(0);
}
.ofo-back-to-top svg {
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .ofo-back-to-top {
    bottom: 72px;
    right: 16px;
    padding: 8px 14px;
    font-size: 12px;
  }
}
