/* AI Live People Counter — live on-device occupancy kiosk.
   Loaded only by counters/ai-people-counter-live.blade.php. Brand sky accent
   (#2ba8ff), sits on the v2-editorial hero card. No inline styles in the Blade. */

.aiplc-card { --counter-color: #2ba8ff; }

/* ---- Stage: the live video with the box overlay on top ---- */
.aiplc-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0a0a0f;
    border-radius: 14px;
    overflow: hidden;
}
.aiplc-stage video,
.aiplc-stage canvas[data-aiplc-overlay] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.aiplc-stage canvas[data-aiplc-overlay] {
    pointer-events: none;
}

/* Live count badge, top-left over the video */
.aiplc-count {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: baseline;
    gap: .45rem;
    padding: .5rem .85rem;
    background: rgba(10, 10, 15, .62);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    color: #fff;
    line-height: 1;
}
.aiplc-count-num {
    font-size: 3rem;
    font-weight: 800;
    color: #4ade80;
    font-variant-numeric: tabular-nums;
}
.aiplc-count-label {
    font-size: .9rem;
    font-weight: 600;
    opacity: .9;
}
.aiplc-card.is-crowded .aiplc-count-num { color: #facc15; }

/* Idle placeholder before the camera starts */
.aiplc-idle {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    text-align: center;
    padding: 1.5rem;
    color: #cbd5e1;
}
.aiplc-idle i { font-size: 2.4rem; color: #2ba8ff; }
.aiplc-idle p { margin: 0; font-size: .95rem; }

/* Transient status line (permission blocked, loading model, …) */
.aiplc-status {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: .5rem .75rem;
    background: rgba(10, 10, 15, .72);
    color: #fde68a;
    font-size: .85rem;
    border-radius: 10px;
    text-align: center;
}

/* Peak + last-updated meta row */
.aiplc-meta {
    display: flex;
    gap: 1.25rem;
    margin: .75rem 0 0;
    font-size: .9rem;
    color: #475569;
}
.aiplc-meta strong { color: #0f172a; font-variant-numeric: tabular-nums; }

/* Controls */
.aiplc-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-top: .9rem;
}
.aiplc-controls label {
    font-size: .85rem;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.aiplc-controls select {
    padding: .35rem .5rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}
.aiplc-btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: .6rem 1.1rem;
    font: 600 .95rem/1 'Inter', system-ui, sans-serif;
    color: #fff;
    background: #2ba8ff;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}
.aiplc-btn:hover { background: #1f93e6; }
.aiplc-btn:active { transform: translateY(1px); }
.aiplc-btn:disabled { opacity: .6; cursor: default; }
.aiplc-btn.is-live { background: #dc2626; }
.aiplc-btn.is-live:hover { background: #b91c1c; }
.aiplc-btn-ghost {
    background: transparent;
    color: #2ba8ff;
    box-shadow: inset 0 0 0 1px #2ba8ff;
}
.aiplc-btn-ghost:hover { background: rgba(43, 168, 255, .08); }

.aiplc-note {
    margin: .75rem 0 0;
    font-size: .8rem;
    color: #64748b;
}

/* Header fullscreen button reuses the card header styling; nothing extra. */

/* Fullscreen: let the stage fill the screen with the count still legible */
.aiplc-stage:fullscreen {
    aspect-ratio: auto;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}
.aiplc-stage:fullscreen .aiplc-count { top: 24px; left: 24px; }
.aiplc-stage:fullscreen .aiplc-count-num { font-size: 5rem; }

@media (max-width: 480px) {
    .aiplc-count-num { font-size: 2.3rem; }
    .aiplc-controls { gap: .5rem; }
}

/* ---- Lean full-screen standalone app (/counters/ai-people-counter/live/app) ----
   No marketing copy: the camera fills the viewport with the count overlaid. */
.aiplc-fullapp {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 16px 24px;
}
.aiplc-fullapp-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.aiplc-fullapp-back {
    font: 600 .95rem/1 'Inter', system-ui, sans-serif;
    color: #2ba8ff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.aiplc-fullapp-back:hover { text-decoration: underline; }

/* The app card drops the hero framing and lets the stage fill the height. */
.aiplc-card-app { box-shadow: none; border: 0; padding: 0; background: transparent; }
.aiplc-card-app .aiplc-stage {
    aspect-ratio: auto;
    height: min(72vh, 128vw);
}
.aiplc-card-app .aiplc-count-num { font-size: 3.5rem; }

.aiplc-steps {
    margin: .5rem 0 0;
    padding-left: 1.1rem;
    text-align: left;
    font-size: .9rem;
    line-height: 1.6;
    color: #cbd5e1;
    max-width: 30rem;
}
.aiplc-steps a { color: #7cc7ff; }

@media (max-width: 480px) {
    .aiplc-card-app .aiplc-stage { height: min(64vh, 150vw); }
    .aiplc-card-app .aiplc-count-num { font-size: 2.6rem; }
}

/* ---- Marketing landing hero note ---- */
.v2-hero-note { margin-top: .75rem; font-size: .82rem; color: #64748b; }
.v2-hero-note a { color: #2ba8ff; font-weight: 600; }

/* ---- 10-minute live demo (real on-device camera) ----
   The hero card runs the same on-device engine as the Pro tool, capped at a
   10-minute try per day, then a wall funnels to Pro. Driven by
   js/counters/ai-live-demo-gate.js. */

/* Countdown bar at the top of the demo card */
.aiplc-demo-bar {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    margin: 0 0 .7rem; padding: .45rem .8rem;
    background: #0f172a; color: #e2e8f0;
    border-radius: 10px; font-size: .86rem; font-weight: 600; line-height: 1.2;
}
.aiplc-demo-bar[hidden] { display: none; }
.aiplc-demo-bar i { color: #2ba8ff; }
.aiplc-demo-time { color: #fff; font-variant-numeric: tabular-nums; }
.aiplc-demo-bar.is-urgent { background: #7f1d1d; }
.aiplc-demo-bar.is-urgent i,
.aiplc-demo-bar.is-urgent .aiplc-demo-time { color: #fecaca; }

/* Wall overlay — covers only the camera stage, so the page stays usable */
.aiplc-demo-wall {
    position: absolute; inset: 0; z-index: 6;
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem; text-align: center;
    background: rgba(2, 6, 23, .9);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    border-radius: 14px;
}
.aiplc-demo-wall[hidden] { display: none; }
.aiplc-demo-wall-inner { max-width: 22rem; color: #e2e8f0; }
.aiplc-demo-wall-emoji { font-size: 2rem; line-height: 1; margin-bottom: .4rem; }
.aiplc-demo-wall h3 { margin: 0 0 .4rem; font-size: 1.25rem; font-weight: 800; color: #fff; }
.aiplc-demo-wall p { margin: 0 0 1rem; font-size: .92rem; line-height: 1.5; color: #cbd5e1; }
.aiplc-demo-wall-btn {
    display: block; width: 100%; border: 0; cursor: pointer;
    font: 800 1rem/1 'Inter', system-ui, sans-serif;
    padding: .8rem 1rem; border-radius: .65rem; text-decoration: none; text-align: center;
}
.aiplc-demo-wall-btn-primary { background: #2ba8ff; color: #fff; }
.aiplc-demo-wall-btn-primary:hover { background: #1f93e6; }
.aiplc-demo-wall-btn-ghost {
    margin-top: .55rem; background: transparent; color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.aiplc-demo-wall-btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.aiplc-demo-wall-fine { margin: .8rem 0 0; font-size: .78rem; color: #94a3b8; }
.aiplc-demo-wall-fine a { color: #7cc7ff; font-weight: 600; }
