/*
 * Insights Shell — Story CTB-INS-1.7
 * Tokens extracted from frontend/static/css/business-admin.css (v19) by @ux-design-expert (Sati).
 * Dark-mode only (admin has no light mode).
 */

/* Subnav — follows the existing Blog-tab pattern (underline 2px brand-500 on active). */
.insights-subnav {
  padding: 0 32px;
  margin-bottom: 24px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.insights-subnav > button {
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 16px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.insights-subnav > button:hover {
  color: #e2e8f0;
}

.insights-subnav > button[aria-selected="true"] {
  border-bottom-color: #6366f1;
  color: #818cf8;
}

.insights-subnav > button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Beta badge next to the Insights section H1. */
.insights-beta-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}

/* Empty-state card — same surface + border tokens as the rest of the admin. */
.insights-empty {
  background: #1e2030;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 48px 32px;
  margin: 0 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.insights-empty-icon {
  color: #475569;
  margin-bottom: 16px;
  line-height: 0;
}

.insights-empty h3 {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 8px;
}

.insights-empty p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  max-width: 420px;
  margin: 0 0 24px;
}

.insights-cta {
  padding: 10px 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.insights-cta:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.insights-cta[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Mobile — 375/768px viewport.
 * Subnav switches to horizontal scroll (no dropdown).
 * Empty-state card gets tighter padding + full-width CTA. */
@media (max-width: 768px) {
  .insights-subnav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px;
  }

  .insights-subnav > button {
    flex-shrink: 0;
  }

  .insights-subnav::-webkit-scrollbar {
    display: none;
  }

  .insights-empty {
    padding: 32px 20px;
    margin: 0 16px;
  }

  .insights-empty-icon svg {
    width: 32px;
    height: 32px;
  }

  .insights-cta {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}
