/*
 * Vietnam Jewellery & Gem Fair — interactive floor plan
 *
 * Every rule is scoped under .vjg-fp and every class carries a vjgp- prefix,
 * so nothing here can collide with the theme or with Elementor's own classes
 * (.card, .btn, .legend and friends are all taken on a live WordPress site).
 */

.vjg-fp{
  --vjgp-ink:#1c1a15;
  --vjgp-ink-soft:#57534a;
  --vjgp-ink-faint:#8c877c;
  --vjgp-gold:#a5842c;
  --vjgp-gold-deep:#7a611d;
  --vjgp-gold-tint:#f4ecd7;
  /* Sapphire for the visitor's own picks: it has to read clearly against the
     gold of a booked booth and the white of a free one. */
  --vjgp-select:#1f4f7a;
  --vjgp-paper:#eae7df;
  --vjgp-surface:#fff;
  --vjgp-line:#cbc6bb;
  --vjgp-line-soft:#e3dfd5;
  --vjgp-green:#2f6b4f;
  --vjgp-amber:#8a6410;
  --vjgp-shadow:0 1px 2px rgba(28,26,21,.06),0 8px 24px -16px rgba(28,26,21,.28);

  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:15px;
  line-height:1.55;
  color:var(--vjgp-ink);
  -webkit-font-smoothing:antialiased;
}
.vjg-fp,.vjg-fp *,.vjg-fp *::before,.vjg-fp *::after{box-sizing:border-box}

/* Full-bleed mode. The left offset and width are measured in JS; this only
   lifts the theme's own width cap and keeps a gutter at the page edges. */
.vjg-fp.vjgp-full{max-width:none;padding-left:clamp(16px,2.5vw,40px);padding-right:clamp(16px,2.5vw,40px)}

/* Neutralise theme styling on the elements we control. */
.vjg-fp p,.vjg-fp h2,.vjg-fp h3,.vjg-fp dl,.vjg-fp dd,.vjg-fp dt{margin:0;padding:0}
.vjg-fp button{
  font:inherit;color:inherit;cursor:pointer;margin:0;
  border-radius:2px;text-transform:none;letter-spacing:normal;box-shadow:none;
}
.vjg-fp input{font:inherit;color:inherit;margin:0}
.vjg-fp button:focus-visible,.vjg-fp input:focus-visible,.vjg-fp [tabindex]:focus-visible{
  outline:2px solid var(--vjgp-gold);outline-offset:2px
}
.vjg-fp .screen-reader-text{
  position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap
}

/* ---------- Heading ---------- */
.vjgp-head{text-align:center;margin-bottom:22px}
.vjgp-title{
  font-family:"Poppins",system-ui,-apple-system,sans-serif;font-weight:700;
  font-size:clamp(1.5rem,4vw,2.4rem);line-height:1.1;color:var(--vjgp-gold-deep);
}
.vjgp-when{
  display:inline-block;margin-top:12px!important;background:var(--vjgp-gold);color:#fff;
  padding:6px 18px;font-size:clamp(.78rem,2.2vw,.9rem);font-weight:500
}

/* ---------- Layout ---------- */
.vjgp-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}
.vjg-fp.vjgp-no-rail .vjgp-layout{grid-template-columns:minmax(0,1fr)}
@media (max-width:1080px){ .vjgp-layout{grid-template-columns:minmax(0,1fr)} }
/* Set from the element's measured width, so a narrow theme column collapses
   the rail even on a wide screen. */
.vjg-fp.vjgp-narrow .vjgp-layout{grid-template-columns:minmax(0,1fr)}

.vjgp-card{
  background:var(--vjgp-surface);border:1px solid var(--vjgp-line);
  border-radius:3px;box-shadow:var(--vjgp-shadow)
}
.vjgp-pad{padding:16px}
.vjgp-h{font-family:"Poppins",system-ui,-apple-system,sans-serif;font-size:19px;font-weight:500;line-height:1.3}
.vjgp-muted{color:var(--vjgp-ink-faint);font-size:13.5px}
.vjgp-small{font-size:12.5px}
.vjgp-row-between{display:flex;justify-content:space-between;align-items:baseline;gap:10px}

/* ---------- Toolbar ---------- */
.vjgp-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px;border-bottom:1px solid var(--vjgp-line-soft)}
.vjgp-search{position:relative;flex:1 1 190px;min-width:0}
.vjgp-search input{
  width:100%;padding:9px 34px 9px 12px;border:1px solid var(--vjgp-line);
  border-radius:2px;background:#fdfcfa;box-shadow:none
}
.vjgp-search button{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:0;background:none;padding:5px 7px;color:var(--vjgp-ink-faint);font-size:13px}
.vjgp-seg{display:flex;border:1px solid var(--vjgp-line);border-radius:2px;overflow:hidden;flex:none}
.vjgp-seg button{border:0;background:#fdfcfa;padding:9px 13px;font-size:13.5px;color:var(--vjgp-ink-soft);border-left:1px solid var(--vjgp-line-soft);white-space:nowrap;border-radius:0}
.vjgp-seg button:first-child{border-left:0}
.vjgp-seg button[aria-pressed="true"]{background:var(--vjgp-gold);color:#fff}
.vjgp-zoomers{display:flex;gap:6px;margin-left:auto}
.vjgp-icon{width:36px;height:36px;border:1px solid var(--vjgp-line);background:#fdfcfa;display:grid;place-items:center;font-size:15px;color:var(--vjgp-ink-soft);flex:none;padding:0}
.vjgp-icon:hover{border-color:var(--vjgp-gold);color:var(--vjgp-gold)}
.vjgp-icon-wide{width:auto;padding:0 12px;font-size:13.5px}

/* ---------- Plan ---------- */
.vjgp-stage{position:relative;background:#fbf9f3;overflow:hidden}
.vjgp-stage::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:linear-gradient(var(--vjgp-line-soft) 1px,transparent 1px),
                   linear-gradient(90deg,var(--vjgp-line-soft) 1px,transparent 1px);
  background-size:28px 28px;opacity:.5
}
/* Height is set directly. aspect-ratio combined with max-height makes the
   browser derive the width back from the clamped height, which shrinks the
   box and leaves a white gap beside it inside the card. */
.vjgp-box{width:100%;height:clamp(420px,72vh,780px)}
@media (max-width:640px){ .vjgp-box{height:clamp(360px,62vh,560px)} }
.vjg-fp.vjgp-narrow .vjgp-box{height:clamp(380px,60vh,620px)}

#vjgp-plan{display:block;width:100%;height:100%;touch-action:none;cursor:grab;position:relative}
#vjgp-plan.vjgp-dragging{cursor:grabbing}

.vjg-fp.vjgp-fs .vjgp-plan-card{position:fixed;inset:0;z-index:99999;border:0;border-radius:0;margin:0}
.vjg-fp.vjgp-fs .vjgp-box{height:calc(100dvh - 108px)}

/* booths */
.vjgp-booth rect{stroke:#4a443c;stroke-width:1.1;fill:#fff;transition:fill .12s ease}
.vjgp-booth text{font-family:"Inter",sans-serif;font-size:13px;font-weight:600;fill:var(--vjgp-gold);text-anchor:middle;dominant-baseline:central;pointer-events:none}
.vjgp-booth{cursor:pointer}
.vjgp-booth:hover rect{fill:#e9f0f7}
.vjgp-booth.vjgp-taken rect{fill:#f6efd9}
.vjgp-booth.vjgp-taken .vjgp-x{stroke:#6a645a;stroke-width:1.1}
.vjgp-booth.vjgp-taken{cursor:not-allowed}
.vjgp-booth.vjgp-taken:hover rect{fill:#efe4c4}
.vjgp-booth.vjgp-pending rect{fill:#e6efe9}
.vjgp-booth.vjgp-pending .vjgp-x{stroke:var(--vjgp-amber)}
.vjgp-booth.vjgp-picked rect{fill:var(--vjgp-select);stroke:#143a5c;stroke-width:1.2}
.vjgp-booth.vjgp-picked text{fill:#fff;font-weight:600}
.vjgp-booth.vjgp-active rect{stroke:var(--vjgp-gold);stroke-width:1.6}
.vjgp-booth.vjgp-dim{opacity:.2}
.vjgp-booth.vjgp-flash rect{fill:#cfe0f0}

.vjgp-floor{fill:#fffdf7;stroke:none}
.vjgp-wall{fill:none;stroke:#2a2620;stroke-width:2.6;stroke-linecap:round}
.vjgp-wall-thin{fill:none;stroke:#6a645a;stroke-width:1.1}
.vjgp-fixture{fill:none;stroke:#6a645a;stroke-width:1}
.vjgp-door{fill:none;stroke:#6a645a;stroke-width:1;stroke-linecap:round}
.vjgp-fixture-fill{fill:#fdfcf8;stroke:#4a443c;stroke-width:1.2}
.vjgp-solid{fill:#2a2620}
.vjgp-chair{fill:none;stroke:#9a9488;stroke-width:.7}
.vjgp-hatch{fill:#4a443c;opacity:.75}
.vjgp-exit{fill:none;stroke:var(--vjgp-gold);stroke-width:2.2;stroke-linecap:round}
.vjgp-north{fill:#2a2620}
.vjgp-dim{font-family:"Inter",sans-serif;font-size:8px;fill:#6a645a}
.vjgp-tick{fill:none;stroke:#9a9488;stroke-width:.6}
.vjgp-arrow{fill:none;stroke:#6a645a;stroke-width:.9}
.vjgp-lab{font-family:"Inter",sans-serif;font-size:9px;font-weight:600;fill:#332d33;letter-spacing:.04em}
.vjgp-lab.vjgp-lab-sm{font-size:7.6px;font-weight:500;fill:#6b656b}
.vjgp-lab.vjgp-lab-lg{font-size:16px;letter-spacing:.12em;font-weight:600}

.vjgp-tip{
  position:absolute;pointer-events:none;z-index:5;background:var(--vjgp-ink);color:#fff;
  padding:5px 9px;border-radius:2px;font-size:12.5px;white-space:nowrap;
  opacity:0;transform:translate(-50%,-140%);transition:opacity .1s
}
.vjgp-tip.vjgp-on{opacity:1}

.vjgp-legend{display:flex;flex-wrap:wrap;gap:8px 22px;align-items:center;padding:11px 14px;border-top:1px solid var(--vjgp-line-soft);font-size:13px;color:var(--vjgp-ink-soft)}
.vjgp-legend span{display:inline-flex;align-items:center;gap:8px}
.vjgp-legend .vjgp-hint{color:var(--vjgp-ink-faint)}
.vjgp-legend .vjgp-note{
  padding:2px 10px;border:1px solid var(--vjgp-line);border-radius:99px;
  font-size:12px;color:var(--vjgp-ink-soft)
}
.vjgp-swatch{width:17px;height:17px;border:1px solid #6f6a70;background:#fff;flex:none;position:relative}
.vjgp-swatch-booked{background:#f6efd9}
.vjgp-swatch-booked::before,.vjgp-swatch-booked::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(to top right,transparent 46%,#6f6a70 46%,#6f6a70 54%,transparent 54%)
}
.vjgp-swatch-booked::before{transform:scaleX(-1)}
.vjgp-swatch-sel{background:var(--vjgp-select);border-color:#143a5c}

/* ---------- Rail ---------- */
.vjgp-rail{display:flex;flex-direction:column;gap:14px}
.vjgp-counts{display:grid;grid-template-columns:repeat(3,1fr);text-align:center}
.vjgp-counts>div{padding:14px 6px;border-left:1px solid var(--vjgp-line-soft)}
.vjgp-counts>div:first-child{border-left:0}
.vjgp-counts b{display:block;font-family:"Poppins",system-ui,-apple-system,sans-serif;font-size:27px;font-weight:500;line-height:1.1}
.vjgp-counts small{font-size:12px;color:var(--vjgp-ink-faint)}
.vjgp-counts .vjgp-ok b{color:var(--vjgp-green)}
.vjgp-counts .vjgp-no b{color:var(--vjgp-gold)}
.vjgp-meter{height:5px;background:var(--vjgp-line-soft);border-radius:99px;overflow:hidden;margin:0 16px 16px}
.vjgp-meter i{display:block;height:100%;background:var(--vjgp-gold)}

.vjgp-detail-id{font-family:"Poppins",system-ui,-apple-system,sans-serif;font-size:34px;line-height:1.05;margin:2px 0 6px}
.vjgp-rows{margin-top:12px;font-size:13.5px}
.vjgp-rows>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-top:1px solid var(--vjgp-line-soft)}
.vjgp-rows dt{color:var(--vjgp-ink-faint)}
.vjgp-rows dd{margin:0;text-align:right}
.vjgp-pill{display:inline-block;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:500}
.vjgp-pill-ok{background:#e4efe8;color:var(--vjgp-green)}
.vjgp-pill-no{background:var(--vjgp-gold-tint);color:var(--vjgp-gold)}
.vjgp-pill-hold{background:#e6efe9;color:#2f6b4f}

.vjgp-btn{
  display:block;width:100%;margin-top:14px;padding:11px 14px;
  border:1px solid var(--vjgp-gold);background:var(--vjgp-gold);color:#fff;
  font-weight:500;text-align:center;line-height:1.4
}
.vjgp-btn:hover{background:var(--vjgp-gold-deep);border-color:var(--vjgp-gold-deep)}
.vjgp-btn-ghost{background:transparent;color:var(--vjgp-gold)}
.vjgp-btn-ghost:hover{background:var(--vjgp-gold-tint);color:var(--vjgp-gold-deep)}
.vjgp-btn[disabled]{opacity:.5;cursor:not-allowed}
.vjgp-link{background:none;border:0;padding:0;color:var(--vjgp-gold);font-size:13px;text-decoration:underline;text-underline-offset:2px}

.vjgp-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;max-height:172px;overflow:auto}
.vjgp-chip{border:1px solid var(--vjgp-line);background:#fdfcfa;padding:5px 9px;font-size:12.5px;color:var(--vjgp-ink-soft)}
.vjgp-chip:hover{border-color:var(--vjgp-gold);color:var(--vjgp-gold)}
.vjgp-chip.vjgp-on{background:var(--vjgp-select);border-color:#143a5c;color:#fff}

/* ---------- Modal ---------- */
.vjgp-modal{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:20px}
.vjgp-modal[hidden]{display:none}
.vjgp-modal-backdrop{position:absolute;inset:0;background:rgba(25,19,25,.55);backdrop-filter:blur(2px)}
.vjgp-modal-card{
  position:relative;width:min(460px,100%);max-height:90vh;overflow:auto;
  background:var(--vjgp-surface);border-radius:4px;padding:26px;
  box-shadow:0 24px 60px -20px rgba(25,19,25,.5);
  animation:vjgp-rise .18s ease-out
}
@keyframes vjgp-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.vjgp-modal-x{position:absolute;top:10px;right:12px;border:0;background:none;font-size:24px;line-height:1;color:var(--vjgp-ink-faint);padding:4px 8px}
.vjgp-modal-x:hover{color:var(--vjgp-ink)}
.vjgp-modal-h{font-size:23px;margin-bottom:6px}
.vjgp-modal-booths{
  margin:14px 0 4px;padding:10px 12px;background:#faf7f2;border:1px solid var(--vjgp-line-soft);
  font-size:13.5px;color:var(--vjgp-ink-soft)
}
.vjgp-modal-booths b{color:var(--vjgp-ink);font-weight:600}
.vjgp-field{margin-top:12px}
.vjgp-field label{display:block;font-size:13px;color:var(--vjgp-ink-soft);margin-bottom:5px}
.vjgp-field input{width:100%;padding:10px 12px;border:1px solid var(--vjgp-line);border-radius:2px;background:#fdfcfa}
.vjgp-field input:focus{border-color:var(--vjgp-gold)}
.vjgp-field-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:420px){ .vjgp-field-pair{grid-template-columns:1fr} }
.vjgp-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.vjgp-error{margin-top:12px!important;padding:9px 12px;background:var(--vjgp-gold-tint);color:var(--vjgp-gold-deep);font-size:13px}
.vjgp-error[hidden]{display:none}
.vjgp-consent{margin-top:10px!important}
.vjgp-done-mark{
  width:46px;height:46px;border-radius:50%;background:#e4efe8;color:var(--vjgp-green);
  display:grid;place-items:center;font-size:24px;margin-bottom:14px
}
#vjgp-modal-done[hidden]{display:none}

@media (prefers-reduced-motion:reduce){
  .vjg-fp *,.vjgp-modal-card{transition:none!important;animation:none!important}
}

/* ---------- Access gate ---------- */
.vjgp-gate{max-width:520px;margin:0 auto;padding:34px 30px;text-align:center}
.vjgp-gate-h{font-size:24px;margin-bottom:8px}
.vjgp-gate-form{display:flex;gap:8px;margin:18px 0 14px;flex-wrap:wrap}
.vjgp-gate-form input{
  flex:1 1 200px;min-width:0;padding:11px 13px;
  border:1px solid var(--vjgp-line);border-radius:2px;background:#fdfcfa;
  letter-spacing:.05em
}
.vjgp-gate-form input:focus{border-color:var(--vjgp-gold)}
.vjgp-gate-btn{width:auto;margin-top:0;flex:0 0 auto;padding:11px 20px}
.vjgp-gate .vjgp-error{text-align:left}
