/* Shared UI components: dialogs, film player, lightbox, toast, buttons, chips, form fields. */
.jj-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- buttons / chips / fields (used by the configurator, shop, investor tools, new pages) ---- */
.jj-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;border-radius:999px;border:1px solid var(--border);
  background:var(--card);color:var(--foreground);padding:.7rem 1.25rem;font:inherit;font-size:.9rem;font-weight:600;cursor:pointer;text-decoration:none;
  transition:transform .2s,background-color .2s,border-color .2s,box-shadow .2s;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.jj-btn:hover{border-color:var(--lime)}
.jj-btn.is-primary{background:var(--lime);color:var(--primary-foreground);border-color:transparent;box-shadow:var(--shadow-glow)}
.jj-btn.is-primary:hover{transform:translateY(-1px)}
.jj-btn.is-sm{padding:.45rem .9rem;font-size:.8rem}
.jj-btn[disabled]{opacity:.5;cursor:not-allowed;transform:none}
.jj-chip{display:inline-flex;align-items:center;gap:.4rem;border-radius:999px;border:1px solid var(--border);background:transparent;color:var(--foreground);
  padding:.4rem .95rem;font:inherit;font-size:.85rem;cursor:pointer;transition:background-color .2s,border-color .2s,color .2s}
.jj-chip:hover{border-color:var(--lime)}
.jj-chip[aria-pressed="true"],.jj-chip.is-on{background:var(--lime);color:var(--primary-foreground);border-color:transparent;font-weight:700}
.jj-field{display:flex;flex-direction:column;gap:.35rem;font-size:.8rem;color:var(--muted-foreground)}
.jj-field input,.jj-field select,.jj-field textarea{width:100%;border-radius:.6rem;border:1px solid var(--input);background:color-mix(in srgb,var(--secondary) 40%,transparent);
  color:var(--foreground);padding:.7rem .9rem;font:inherit;font-size:.9rem;outline:none}
.jj-field input:focus,.jj-field select:focus,.jj-field textarea:focus{border-color:var(--lime)}
.jj-field select option{background:var(--popover);color:var(--foreground)}
.jj-note{font-size:.75rem;color:var(--muted-foreground);line-height:1.5}
:focus-visible{outline:2px solid var(--lime);outline-offset:2px}

/* ---- dialog ---- */
.jj-modal{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:1rem;background:rgba(5,8,7,.82);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);animation:jj-fade .2s ease-out}
.jj-modal-box{position:relative;width:min(520px,100%);max-height:calc(100dvh - 2rem);overflow:auto;border-radius:1.25rem;border:1px solid var(--border);background:var(--popover);color:var(--foreground);padding:1.75rem;box-shadow:0 30px 80px -20px #000}
.jj-modal-box.is-wide{width:min(1100px,100%);padding:0;background:#000;border-color:#ffffff22}
.jj-modal-box:focus{outline:none}
.jj-modal-title{margin:0 2.5rem .75rem 0;font-family:var(--font-display);font-size:1.35rem;font-weight:700}
.jj-x{position:absolute;top:.75rem;right:.75rem;z-index:3;width:2.5rem;height:2.5rem;border-radius:999px;border:1px solid var(--border);background:rgba(13,16,15,.7);color:var(--foreground);font-size:1.5rem;line-height:1;cursor:pointer}
@keyframes jj-fade{from{opacity:0}to{opacity:1}}

/* ---- film ---- */
.jj-film{position:relative;aspect-ratio:16/9;background:#000}
.jj-film-video{width:100%;height:100%;display:block;object-fit:contain;background:#000}
.jj-film-msg{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted-foreground);margin:0;text-align:center;padding:1rem}

/* ---- lightbox ---- */
.jj-lb{position:relative;display:grid;place-items:center;min-height:50vh}
.jj-lb-img{max-width:100%;max-height:calc(100dvh - 9rem);object-fit:contain;display:block}
.jj-lb-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:3rem;height:3rem;border-radius:999px;border:1px solid var(--border);background:rgba(13,16,15,.75);color:var(--foreground);font-size:1.8rem;cursor:pointer}
.jj-lb-nav.is-prev{left:.75rem}.jj-lb-nav.is-next{right:.75rem}
.jj-lb-foot{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:space-between;gap:1rem;padding:.9rem 1.2rem;background:linear-gradient(transparent,rgba(0,0,0,.85));font-size:.85rem}
.jj-lb-cap span{color:var(--muted-foreground)}
.jj-lb-count{color:var(--muted-foreground);white-space:nowrap}

/* ---- toast ---- */
.jj-toast{position:fixed;left:50%;bottom:1.5rem;transform:translateX(-50%);z-index:90;max-width:calc(100vw - 2rem);padding:.75rem 1.25rem;border-radius:999px;background:var(--lime);color:var(--primary-foreground);font-weight:700;font-size:.9rem;box-shadow:var(--shadow-glow);transition:opacity .4s}
.jj-toast.is-out{opacity:0}

@media (prefers-reduced-motion:reduce){.jj-modal{animation:none}}
