/* ==========================================================================
   Live Visitor Counter — shared styles (admin settings screen + storefront)
   ========================================================================== */

/* ---------- Frontend badge (structural only — colors/spacing are inline,
   computed per-instance so every product + every custom design works) ---------- */
.wca-lvc-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	line-height: 1.3;
	max-width: 100%;
}
.wca-lvc-badge .wca-lvc-count { font-weight: 800; }
.wca-lvc-badge .wca-lvc-icon { display: inline-flex; }

/* ---------- Animations ---------- */
.wca-lvc-anim-fade { animation: wcaLvcFade 0.6s ease both; }
.wca-lvc-anim-slide { animation: wcaLvcSlide 0.5s ease both; }
.wca-lvc-anim-pulse { animation: wcaLvcPulse 1.8s ease-in-out infinite; }
.wca-lvc-anim-glow { animation: wcaLvcGlow 2.2s ease-in-out infinite; }
.wca-lvc-anim-bounce { animation: wcaLvcBounce 1.4s ease-in-out infinite; }

@keyframes wcaLvcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wcaLvcSlide { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes wcaLvcPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes wcaLvcGlow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(249,115,22,0)); } 50% { filter: drop-shadow(0 0 8px rgba(249,115,22,0.55)); } }
@keyframes wcaLvcBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------- Admin: local segmented control + field hint (self-contained,
   doesn't depend on another addon's stylesheet) ---------- */
.wca-segmented { display: inline-flex; background: var(--wca-gray-100); border-radius: 10px; padding: 3px; }
body.wca-dark .wca-segmented { background: rgba(255,255,255,0.06); }
.wca-segmented-btn {
	display: inline-flex; align-items: center; gap: 6px;
	border: none; background: none; padding: 7px 16px; border-radius: 8px;
	font-size: 12.5px; font-weight: 600; color: var(--wca-text-muted); cursor: pointer;
}
.wca-segmented-btn.is-active { background: var(--wca-surface-solid); color: var(--wca-blue-600); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.wca-field-hint { display: block; font-size: 11.5px; color: var(--wca-text-muted); margin-top: 8px; }
.wca-field-inline { max-width: 320px; }

/* ---------- Admin: sub-tabs ---------- */
.wca-lvc-tabs { display: flex; gap: 4px; padding: 6px; border-radius: 14px; margin-bottom: 20px; overflow-x: auto; }
.wca-lvc-tab {
	display: flex; align-items: center; gap: 7px;
	padding: 10px 16px; border-radius: 10px; border: none; background: none;
	font-size: 13px; font-weight: 600; color: var(--wca-text-muted); cursor: pointer; white-space: nowrap;
}
.wca-lvc-tab i { width: 15px; height: 15px; }
.wca-lvc-tab:hover { background: rgba(61,125,253,0.08); color: var(--wca-blue-600); }
.wca-lvc-tab.is-active { background: linear-gradient(135deg, var(--wca-blue-500), var(--wca-blue-700)); color: #fff; box-shadow: 0 6px 16px rgba(37,99,235,0.3); }

.wca-lvc-panel { display: none; }
.wca-lvc-panel.is-active { display: block; animation: wcaFadeUp 0.25s ease both; }

.wca-lvc-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .wca-lvc-grid { grid-template-columns: 1fr; } }
.wca-lvc-form h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--wca-border); }
.wca-lvc-form h3 i { width: 16px; height: 16px; color: var(--wca-blue-600); }
.wca-lvc-dual-input { display: flex; gap: 8px; }
.lvc-static-field, .lvc-dynamic-field { display: none; }
.lvc-custom-html-field { display: none; }
.wca-lvc-code-textarea {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px; line-height: 1.5; padding: 10px 12px;
	border-radius: 10px; border: 1px solid var(--wca-border);
	background: var(--wca-surface-solid); color: var(--wca-text);
	width: 100%; resize: vertical;
}

/* ---------- Admin: preset swatches ---------- */
.wca-lvc-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.wca-lvc-preset-swatch {
	padding: 10px 8px; border-radius: 10px; border: 1px solid var(--wca-border);
	background: var(--wca-surface-solid); color: var(--wca-text); font-size: 12px; font-weight: 600; cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wca-lvc-preset-swatch:hover { transform: translateY(-1px); box-shadow: var(--wca-shadow-hover); }
.wca-lvc-preset-swatch.is-active { border-color: var(--wca-blue-500); background: var(--wca-blue-50); color: var(--wca-blue-700); }
body.wca-dark .wca-lvc-preset-swatch.is-active { background: rgba(61,125,253,0.15); }

/* ---------- Admin: responsive breakpoint sub-panels ---------- */
.wca-lvc-bp-panel { display: none; }
.wca-lvc-bp-panel.is-active { display: block; }

/* ---------- Admin: products table ---------- */
.wca-lvc-products-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.wca-lvc-products-header h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0; padding: 0; border: none; }
.wca-lvc-products-header h3 i { width: 17px; height: 17px; color: var(--wca-blue-600); }
.wca-lvc-search { max-width: 280px; }

.wca-lvc-current-setting { font-size: 12.5px; }
.wca-lvc-current-setting.is-custom { color: var(--wca-blue-600); font-weight: 600; }
.wca-lvc-current-setting.is-hidden { color: var(--wca-text-muted); font-style: italic; }

.wca-lvc-edit-row td { background: var(--wca-blue-50); }
body.wca-dark .wca-lvc-edit-row td { background: rgba(61,125,253,0.08); }
.wca-lvc-edit-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 6px 2px; }
.wca-lvc-edit-form .wca-field { min-width: 130px; margin-bottom: 0; }
.wca-lvc-edit-range-field, .wca-lvc-edit-static-field { display: none; }
.wca-lvc-edit-actions { display: flex; gap: 8px; margin-left: auto; }

.wca-lvc-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.wca-lvc-pagination button { min-width: 36px; }
.wca-lvc-pagination span { font-size: 12.5px; color: var(--wca-text-muted); }

/* ---------- Admin: Live Preview panel ---------- */
.wca-lvc-preview-card { position: sticky; top: 32px; display: flex; flex-direction: column; gap: 12px; }
.wca-lvc-preview-stage { background: var(--wca-gray-50); border-radius: 12px; padding: 18px; display: flex; justify-content: center; }
body.wca-dark .wca-lvc-preview-stage { background: rgba(255,255,255,0.03); }
.wca-lvc-preview-device { width: 100%; max-width: 340px; transition: max-width 0.2s ease; }
.wca-lvc-preview-device[data-device="tablet"] { max-width: 260px; }
.wca-lvc-preview-device[data-device="mobile"] { max-width: 180px; }
.wca-lvc-preview-page { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.wca-lvc-preview-line { background: var(--wca-gray-200); border-radius: 4px; height: 10px; width: 100%; }
body.wca-dark .wca-lvc-preview-line { background: rgba(255,255,255,0.08); }
.wca-lvc-preview-title { height: 16px; width: 70%; }
.wca-lvc-preview-price { height: 14px; width: 40%; }
.wca-lvc-preview-text { height: 8px; width: 90%; }
.wca-lvc-preview-btn { height: 32px; width: 55%; border-radius: 8px; background: var(--wca-blue-200, #c7d9ff); }
.wca-lvc-preview-devices { align-self: center; }
