/*
 * PulseViews — Frontend Styles v2
 * Views count only. No reading time. No date.
 * 4 display styles. Mobile-first. Theme-adaptive.
 * Tested at 320px, light, dark, editorial, and custom themes.
 */

/* ── Base ────────────────────────────────────────────────────────── */
.pv-views,
.pv-views * {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.pv-views {
  display: inline-block;
  line-height: 1;
  margin-bottom: 0.75em;
}

/* ── SVG icon ────────────────────────────────────────────────────── */
.pv-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  flex-shrink: 0;
}

/*
 * ══════════════════════════════════════════════════════════
 * STYLE A — PILL
 * Clean rounded pill. 3 variants controlled by modifier class:
 *   .pv-pill-outline  → border only (default, works on any bg)
 *   .pv-pill-filled   → solid bg (black or white based on theme)
 *   .pv-pill-accent   → uses --pv-accent CSS variable
 * ══════════════════════════════════════════════════════════
 */
.pv-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.1px;
  white-space: nowrap;
  /* Outline by default — inherits theme text/border colour */
  border: 1.5px solid currentColor;
  color: inherit;
  background: transparent;
}

/* Filled: dark on light themes */
.pv-pill-filled {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Filled: auto-invert on dark themes */
@media (prefers-color-scheme: dark) {
  .pv-pill-filled {
    background: #f0f0f5;
    color: #0f0f12;
    border-color: #f0f0f5;
  }
}

/* Accent: uses CSS variable set by the theme or plugin settings */
.pv-pill-accent {
  background: var(--pv-accent, #7c6fef);
  color: #fff;
  border-color: var(--pv-accent, #7c6fef);
}

@media (max-width: 400px) {
  .pv-pill {
    font-size: 12px;
    padding: 6px 13px;
    gap: 7px;
  }
}

/*
 * ══════════════════════════════════════════════════════════
 * STYLE B — BOLD BLOCK
 * Standalone single-cell block. Big number. Small label.
 * High visual weight — use above a title or in a sidebar.
 * ══════════════════════════════════════════════════════════
 */
.pv-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 18px;
  border-radius: 10px;
  background: #111;
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .pv-block {
    background: #f0f0f5;
    color: #0f0f12;
  }
}

.pv-block-accent {
  background: var(--pv-accent, #7c6fef);
  color: #fff;
}

.pv-block-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-block-num .pv-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.pv-block-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.5;
  padding-left: 1px;
}

@media (max-width: 400px) {
  .pv-block-num {
    font-size: 18px;
  }
}

/*
 * ══════════════════════════════════════════════════════════
 * STYLE C — INLINE
 * Plain text, zero decoration. Inherits all theme typography.
 * Best for editorial, magazine, and serif themes.
 * Invisible — feels built into the theme.
 * ══════════════════════════════════════════════════════════
 */
.pv-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: inherit;
}

.pv-inline .pv-inline-label {
  font-weight: 400;
  opacity: 0.5;
  font-size: 13px;
}

@media (max-width: 380px) {
  .pv-inline {
    font-size: 13px;
  }
}

/*
 * ══════════════════════════════════════════════════════════
 * STYLE D — COMPACT BADGE
 * Tiny footprint. Icon + number only.
 * For post cards, archive pages, sidebars, mobile.
 * ══════════════════════════════════════════════════════════
 */
.pv-compact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1.5px solid currentColor;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: inherit;
  white-space: nowrap;
}

.pv-compact .pv-icon {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

/* ── Accessibility ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .pv-views, .pv-views * {
    animation: none !important;
    transition: none !important;
  }
}

.pv-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
