/* ================================================================
   ck_skeleton.css — Skeleton loaders & empty states
================================================================ */

/* ── Shimmer animation ──────────────────────────────────────── */
@keyframes ck-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.ck-skel {
  background: linear-gradient(
    90deg,
    #1e1e1e 25%,
    #2a2a2a 37%,
    #1e1e1e 63%
  );
  background-size: 1200px 100%;
  animation: ck-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
  display: block;
}

/* ── Skeleton shapes ─────────────────────────────────────────── */
.ck-skel-text   { height: 14px; border-radius: 3px; }
.ck-skel-h2     { height: 20px; border-radius: 3px; }
.ck-skel-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.ck-skel-badge  { height: 20px; width: 56px; border-radius: 10px; }
.ck-skel-btn    { height: 34px; border-radius: 7px; }
.ck-skel-chart  { height: 280px; border-radius: 8px; }
.ck-skel-mini-chart { height: 80px; border-radius: 6px; }

/* ── Skeleton row (table / list row) ────────────────────────── */
.ck-skel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
}

.ck-skel-row:last-child { border-bottom: none; }

/* ── Skeleton card ───────────────────────────────────────────── */
.ck-skel-card {
  background: #141414;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Skeleton table ──────────────────────────────────────────── */
.ck-skel-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ck-skel-table-row {
  display: grid;
  grid-template-columns: 90px 80px 70px 1fr 70px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
  align-items: center;
}

/* ── Watchlist skeleton ─────────────────────────────────────── */
.ck-skel-wl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
}

/* ── Skeleton wrapper: shown while loading, hidden after ──────── */
.ck-loading-wrap { position: relative; }
.ck-loading-wrap.loaded .ck-skel-wrap  { display: none; }
.ck-loading-wrap:not(.loaded) .ck-data-wrap { display: none; }

/* ── Helpers ─────────────────────────────────────────────────── */
.ck-skel-w25  { width: 25%; }
.ck-skel-w40  { width: 40%; }
.ck-skel-w60  { width: 60%; }
.ck-skel-w75  { width: 75%; }
.ck-skel-w100 { width: 100%; }

/* ════════════════════════════════════════════════════════════════
   Empty States
════════════════════════════════════════════════════════════════ */

.ck-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 14px;
}

.ck-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.ck-empty-icon svg { opacity: 0.4; }

.ck-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #e8e8e8;
  margin: 0;
}

.ck-empty-sub {
  font-size: 13px;
  color: #888;
  max-width: 320px;
  line-height: 1.55;
  margin: 0;
}

.ck-empty-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #00C896;
  color: #000;
  font-weight: 700;
  font-size: 13px;
  border-radius: 7px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.ck-empty-cta:hover { background: #00b386; color: #000; }

/* ── Spin overlay (e.g. "Running scan…") ────────────────────── */
.ck-spin-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 13, 0.7);
  z-index: 10;
  border-radius: inherit;
  flex-direction: column;
  gap: 12px;
}

.ck-spin {
  width: 32px;
  height: 32px;
  border: 3px solid #2a2a2a;
  border-top-color: #00C896;
  border-radius: 50%;
  animation: ck-spin-anim 0.7s linear infinite;
}

@keyframes ck-spin-anim {
  to { transform: rotate(360deg); }
}

.ck-spin-label {
  font-size: 13px;
  color: #888;
}

/* ── Button loading state ─────────────────────────────────────── */
.ck-btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.ck-btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ck-spin-anim 0.65s linear infinite;
}
