/* =====================================================
   Visitor Counter Pro — Frontend Styles
   ===================================================== */

:root {
  --vcp-primary: #2563eb;
  --vcp-text:    #1e3a5f;
  --vcp-muted:   #64748b;
  --vcp-bg:      #f8fafc;
  --vcp-border:  #e2e8f0;
  --vcp-radius:  16px;
}

/* ── Widget wrapper ── */
.vcp-widget {
  font-family: inherit;
  box-sizing: border-box;
}
.vcp-widget * { box-sizing: border-box; }

/* ── Badge ── */
.vcp-mode-badge .vcp-badge-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--vcp-primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
}
.vcp-mode-badge .vcp-count { font-size: 1.1em; }
.vcp-mode-badge .vcp-icon { font-size: 1em; }

/* ── Minimal ── */
.vcp-mode-minimal .vcp-minimal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.vcp-mode-minimal .vcp-count {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--vcp-text);
  line-height: 1;
}
.vcp-mode-minimal .vcp-label {
  color: var(--vcp-muted);
  font-size: 0.85rem;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Card ── */
.vcp-mode-card .vcp-card-inner {
  background: #fff;
  border-radius: var(--vcp-radius);
  padding: 28px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.vcp-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.vcp-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(37,99,235,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vcp-icon { color: var(--vcp-primary); font-size: 22px; }
.vcp-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--vcp-text);
  margin: 0;
}
.vcp-single-stat { margin-bottom: 20px; }
.vcp-count.vcp-big {
  display: block;
  font-size: clamp(2.2rem,5vw,3.5rem);
  font-weight: 800;
  color: var(--vcp-text);
  line-height: 1;
}
.vcp-label {
  color: var(--vcp-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  display: block;
  margin-top: 4px;
}
.vcp-mini-row {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--vcp-border);
  padding-top: 16px;
}
.vcp-mini-stat {
  flex: 1;
  text-align: center;
}
.vcp-mini-stat strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--vcp-text);
}
.vcp-mini-stat span {
  font-size: 0.75rem;
  color: var(--vcp-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Multi-stats ── */
.vcp-multi-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.vcp-stat-item {
  background: var(--vcp-bg);
  border-radius: 10px;
  padding: 14px;
  border-left: 3px solid var(--vcp-primary);
}
.vcp-stat-item .vcp-count {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--vcp-text);
}
.vcp-stat-item .vcp-label {
  font-size: 0.75rem;
}

/* ── Dashboard ── */
.vcp-dashboard {
  background: #fff;
  border-radius: var(--vcp-radius);
  padding: 28px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.vcp-dash-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.vcp-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.vcp-kpi {
  background: var(--vcp-bg);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.vcp-kpi-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--vcp-text);
  line-height: 1;
}
.vcp-kpi-lbl {
  font-size: 0.72rem;
  color: var(--vcp-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 4px;
  display: block;
}
.vcp-chart-wrap {
  margin-bottom: 24px;
}
.vcp-chart-title, .vcp-section-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--vcp-muted);
  margin: 0 0 10px;
  font-weight: 600;
}
.vcp-top-pages {}
.vcp-page-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.vcp-page-url {
  font-size: 0.82rem;
  width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--vcp-text);
  flex-shrink: 0;
}
.vcp-bar-track {
  flex: 1;
  height: 7px;
  background: var(--vcp-border);
  border-radius: 4px;
  overflow: hidden;
}
.vcp-bar-fill {
  height: 100%;
  background: var(--vcp-primary);
  border-radius: 4px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.vcp-page-hits {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--vcp-text);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Shortcode inline ── */
.vcp-shortcode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vcp-style-badge {
  background: var(--vcp-color, var(--vcp-primary));
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.9em;
  font-weight: 600;
}
.vcp-style-card {
  background: #fff;
  border: 1px solid var(--vcp-border);
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.vcp-style-minimal .vcp-count { font-weight: 700; color: var(--vcp-color, var(--vcp-primary)); }

/* ── Counter animation ── */
@keyframes vcpCountUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vcp-count {
  animation: vcpCountUp .5s ease both;
}
