/* ============================================================================
   VigilAI Restaurants — Login side panel (Pages/Shared/_AuthRestaurantPanel.cshtml)
   Scoped under .vg-rest, which sits on the same <aside> as .vg-auth__aside, so it
   inherits the auth shell (width, padding, grid backdrop) from auth.css and only
   adds the restaurant content. Colours are auth.css's tokens; nothing new is
   invented beyond a violet already used by the aside's backdrop glow.
   Dark only, like the rest of the dashboard (<meta name="color-scheme" content="dark">).
   ========================================================================= */

.vg-rest {
  justify-content: flex-start;
  gap: clamp(12px, 2vh, 18px);
  padding-top: 24px;
  padding-bottom: 22px;
  /* a warmer second glow than the generic panel: candle-light amber, not violet */
  background:
    radial-gradient(900px 620px at 18% 8%, rgba(0, 144, 231, .15), transparent 62%),
    radial-gradient(720px 520px at 85% 96%, rgba(255, 171, 0, .09), transparent 62%),
    var(--vg-panel);
}

.vg-rest > * { position: relative; }   /* above the ::before grid */

/* style.css pins text-align:left on the template's base elements, which leaves
   Arabic ragged on the wrong side; follow the writing direction instead. */
.vg-rest { text-align: start; }

/* ---- intro ---------------------------------------------------------------- */

.vg-rest__intro { max-width: 54ch; }

.vg-rest__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 171, 0, .32);
  background: rgba(255, 171, 0, .08);
  color: #ffd98a;
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .02em;
}

.vg-rest__eyebrow .vg-icon { flex: 0 0 auto; }

.vg-rest__title {
  margin: 12px 0 7px;
  font-size: clamp(1.25rem, 1.05rem + .5vw, 1.45rem);
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -.015em;
  color: #fff;
}

.vg-rest__body {
  margin: 0;
  color: var(--vg-muted);
  font-size: .89rem;
  line-height: 1.55;
}

/* ---- illustration --------------------------------------------------------- */

.vg-rest__art { margin: 0; width: 100%; max-width: 520px; }

.vg-rest__scene {
  position: relative;
  width: 100%;
  aspect-ratio: 600 / 320;
  border-radius: var(--vg-radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  container-type: inline-size;
}

.vg-rest__svg { display: block; width: 100%; height: 100%; }

/* The drawing has no text in it, so under RTL it is simply mirrored: the dining
   floor moves to the right, the kitchen to the left, and the HTML labels — which
   use logical insets — follow it. */
.vg-auth[dir="rtl"] .vg-rest__svg { transform: scaleX(-1); }

.vg-rest__pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: vgRestPulse 1.8s ease-out infinite;
}

@keyframes vgRestPulse {
  0%   { opacity: .9; transform: scale(.82); }
  100% { opacity: 0;  transform: scale(1.22); }
}

.vg-rest__rec { animation: vgRec 2.2s steps(1, end) infinite; }   /* keyframes in auth.css */

.vg-rest__box { animation: vgRestBox 2.4s ease-in-out infinite; }

@keyframes vgRestBox { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.vg-rest__scan { animation: vgRestScan 6s linear infinite; }

@keyframes vgRestScan {
  from { transform: translateY(-44px); }
  to   { transform: translateY(320px); }
}

.vg-rest__waiter {
  transform-box: view-box;
  animation: vgRestWalk 6s ease-in-out infinite alternate;
}

@keyframes vgRestWalk {
  from { transform: translate(64px, -6px); }
  to   { transform: translate(-64px, -4px); }
}

/* overlays on the scene — sized off the scene width so they scale with it */
.vg-rest__live,
.vg-rest__zone,
.vg-rest__tag {
  position: absolute;
  z-index: 2;
  white-space: nowrap;
  line-height: 1.2;
}

.vg-rest__live {
  top: 4.5%;
  inset-inline-start: 7%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(6, 12, 18, .82);
  border: 1px solid var(--vg-line);
  font-size: clamp(9px, 1.9cqi, 11px);
  font-weight: 700;
  letter-spacing: .06em;
  color: #8fa3b5;
}

.vg-rest__live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vg-danger);
  animation: vgRec 2.2s steps(1, end) infinite;
}

.vg-rest__zone {
  bottom: 4%;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(6, 12, 18, .7);
  font-size: clamp(9px, 1.9cqi, 11px);
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vg-faint);
}

.vg-rest__zone--floor   { inset-inline-start: 3.5%; }
.vg-rest__zone--kitchen { inset-inline-start: 69%; }

.vg-rest__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(13, 19, 26, .92);
  border: 1px solid var(--vg-line);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
  font-size: clamp(10px, 2.15cqi, 12.5px);
  font-weight: 600;
  color: var(--vg-text);
  animation: vgRestTagIn .6s ease both;
}

.vg-rest__tag b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  /* a timer: always reads left-to-right, even inside Arabic */
  direction: ltr;
  unicode-bidi: isolate;
}

.vg-rest__tag--table { top: 45%; inset-inline-start: 24%; border-color: rgba(252, 66, 74, .45); }
.vg-rest__tag--table b { color: #ff8a90; }
.vg-rest__tag--door  { top: 56%; inset-inline-start: 66.5%; border-color: rgba(255, 171, 0, .45); animation-delay: .25s; }
.vg-rest__tag--door b { color: #ffd98a; }

/* Narrow scenes (phones): the kitchen is too slim to hold its tag, so it drops to
   the empty strip along the bottom, where the zone names would otherwise sit. */
@container (max-width: 480px) {
  .vg-rest__zone { display: none; }
  .vg-rest__tag--door { top: auto; bottom: 4%; inset-inline-start: auto; inset-inline-end: 3%; }
  .vg-rest__tag--table { inset-inline-start: 16%; }
  .vg-rest__tag { padding: 4px 8px; gap: 5px; }
}

@keyframes vgRestTagIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* status dots — shared by the tags and the legend */
.vg-rest i.is-served,
.vg-rest i.is-waiting,
.vg-rest i.is-critical,
.vg-rest i.is-clear {
  flex: 0 0 auto;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.vg-rest i.is-served   { background: var(--vg-success); }
.vg-rest i.is-waiting  { background: var(--vg-warning); }
.vg-rest i.is-critical { background: var(--vg-danger); box-shadow: 0 0 0 3px rgba(252, 66, 74, .22); }
.vg-rest i.is-clear    { background: transparent; border: 2px dashed #0090e7; }

.vg-rest__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 11px;
  font-size: .76rem;
  color: var(--vg-faint);
}

.vg-rest__legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---- features ------------------------------------------------------------- */

/* One card, one row per feature: five short rows fit a 900px-tall laptop next to
   the illustration, where a 2-column grid of cards wrapped each line three times.
   Each row links to its section of the public /Features page. */
.vg-rest__features {
  max-width: 640px;
  border-radius: var(--vg-radius);
  border: 1px solid var(--vg-line);
  background: rgba(255, 255, 255, .022);
  overflow: hidden;
}

.vg-rest__features-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--vg-line);
  background: rgba(255, 255, 255, .02);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--vg-faint);
}

.vg-auth[dir="rtl"] .vg-rest__features-head { letter-spacing: 0; font-size: .8rem; }

.vg-rest__more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5cc0ff;
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
}

.vg-rest__more:hover { color: #8fd3ff; text-decoration: none; }
.vg-rest__more .vg-icon { transition: transform .16s ease; }
.vg-rest__more:hover .vg-icon { transform: translateX(2px); }
.vg-auth[dir="rtl"] .vg-rest__more:hover .vg-icon { transform: scaleX(-1) translateX(2px); }

.vg-rest__list {
  margin: 0;
  padding: 0 6px;
  list-style: none;
}

.vg-rest__list li + li { border-top: 1px solid var(--vg-line); }

.vg-rest__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin: 0;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background .16s ease;
}

.vg-rest__feature:hover { background: rgba(255, 255, 255, .035); text-decoration: none; color: inherit; }
.vg-rest__feature:focus-visible,
.vg-rest__more:focus-visible { outline: 2px solid var(--vg-primary); outline-offset: 2px; }

.vg-rest__feature > div { min-width: 0; flex: 1 1 auto; }

.vg-rest__feature b {
  display: block;
  font-size: .86rem;
  font-weight: 650;
  color: #fff;
  margin-bottom: 1px;
}

.vg-rest__feature > div > span {
  display: block;
  font-size: .77rem;
  line-height: 1.45;
  color: var(--vg-muted);
}

.vg-rest__go {
  flex: 0 0 auto;
  color: var(--vg-faint);
  opacity: 0;
  transition: opacity .16s ease;
}

.vg-rest__feature:hover .vg-rest__go,
.vg-rest__feature:focus-visible .vg-rest__go { opacity: 1; }

@media (hover: none) { .vg-rest__go { opacity: .6; } }

.vg-rest__ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.vg-rest__ico .vg-icon { vertical-align: 0; }

.vg-rest__ico--blue   { background: rgba(0, 144, 231, .14);  color: #5cc0ff; }
.vg-rest__ico--green  { background: rgba(0, 210, 91, .12);   color: #4be08a; }
.vg-rest__ico--red    { background: rgba(252, 66, 74, .13);  color: #ff7a80; }
.vg-rest__ico--amber  { background: rgba(255, 171, 0, .12);  color: #ffc44d; }
.vg-rest__ico--violet { background: rgba(143, 95, 232, .16); color: #b89cf5; }

/* ---- height-constrained desktops: drop the decorations first -------------- */

@media (min-width: 992px) and (max-height: 960px) {
  .vg-rest__art  { max-width: 480px; }
}

@media (min-width: 992px) and (max-height: 860px) {
  .vg-rest__body { display: none; }
  .vg-rest__art  { max-width: 460px; }
}

@media (min-width: 992px) and (max-height: 800px) {
  .vg-rest__feature > div > span { display: none; }   /* titles only */
  .vg-rest__ico { width: 30px; height: 30px; }
}

@media (min-width: 992px) and (max-height: 640px) {
  .vg-rest__art  { display: none; }
}

/* ---- form side (restaurant identity only: .vg-auth--rest) ----------------- */

/* The form half used to be a bare black field on wide screens. It gets the same
   ambient light as the panel, the form sits on a card, and a teaser below it
   leads to the public features page. */
.vg-auth--rest .vg-auth__main {
  position: relative;
  background:
    radial-gradient(760px 520px at 78% 12%, rgba(0, 144, 231, .10), transparent 65%),
    radial-gradient(680px 480px at 30% 100%, rgba(255, 171, 0, .06), transparent 65%),
    var(--vg-ground);
}

.vg-auth--rest .vg-auth__main::before {      /* faint dot grid, fading out at the edges */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 10%, transparent 75%);
  pointer-events: none;
}

.vg-auth--rest .vg-auth__main > * { position: relative; }

.vg-auth--rest .vg-auth__form { max-width: 460px; }

.vg-auth__card {
  padding: 36px 36px 30px;
  border-radius: 20px;
  border: 1px solid var(--vg-line);
  background: linear-gradient(180deg, rgba(23, 27, 33, .92), rgba(15, 19, 24, .92));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(6px);
}

.vg-auth__card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--vg-primary-soft);
  border: 1px solid var(--vg-primary-line);
  color: #5cc0ff;
}

.vg-auth--rest .vg-auth__subtitle { margin-bottom: 26px; }

/* teaser → /Features */
.vg-auth__teaser {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 10px;
  padding-inline-end: 16px;
  border-radius: 16px;
  border: 1px solid var(--vg-line);
  background: rgba(255, 255, 255, .025);
  color: var(--vg-text);
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.vg-auth__teaser:hover {
  border-color: var(--vg-primary-line);
  background: rgba(0, 144, 231, .06);
  color: var(--vg-text);
  text-decoration: none;
}

.vg-auth__teaser:focus-visible { outline: 2px solid var(--vg-primary); outline-offset: 2px; }

.vg-auth__teaser-img {
  flex: 0 0 auto;
  width: 112px;
  aspect-ratio: 8 / 5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--vg-line);
}

.vg-auth__teaser-img img { display: block; width: 100%; height: 100%; object-fit: cover; }

.vg-auth__teaser-txt { flex: 1 1 auto; min-width: 0; }
.vg-auth__teaser-txt b { display: block; font-size: .9rem; font-weight: 650; color: #fff; margin-bottom: 2px; }
.vg-auth__teaser-txt span { display: block; font-size: .78rem; line-height: 1.45; color: var(--vg-muted); }

.vg-auth__teaser > .vg-icon { flex: 0 0 auto; color: #5cc0ff; transition: transform .16s ease; }
.vg-auth__teaser:hover > .vg-icon { transform: translateX(3px); }
.vg-auth[dir="rtl"] .vg-auth__teaser:hover > .vg-icon { transform: scaleX(-1) translateX(3px); }

.vg-auth__foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 32px 22px;
  font-size: .78rem;
  color: var(--vg-faint);
}

.vg-auth__foot a { color: var(--vg-muted); text-decoration: none; }
.vg-auth__foot a:hover { color: #fff; text-decoration: none; }

@media (max-width: 991.98px) {
  .vg-auth__card-ico { display: none; }          /* the card already carries the logo */
  .vg-auth--rest .vg-auth__form-wrap { padding-top: 16px; }
}

@media (max-width: 480px) {
  .vg-auth__card { padding: 26px 20px 22px; border-radius: 16px; }
  .vg-auth__teaser-img { width: 88px; }
}

/* ---- tablet / phone: the panel follows the form instead of disappearing --- */

@media (max-width: 991.98px) {
  .vg-auth__aside.vg-rest {
    display: flex;
    order: 2;                  /* the form comes first */
    flex: 0 0 auto;
    max-width: none;
    padding: 28px 22px 34px;
    border-right: 0;
    border-left: 0;
    border-top: 1px solid var(--vg-line);
  }

  .vg-rest > .vg-auth__brand { display: none; }   /* the form already shows the logo */

  /* one centred column, every block the same width */
  .vg-auth__aside.vg-rest > * { width: 100%; max-width: 600px; margin-inline: auto; }
}

@media (max-width: 600px) {
  .vg-auth__aside.vg-rest { padding: 24px 16px 30px; }
  .vg-rest__features { padding: 2px 12px; }
  .vg-rest__feature { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .vg-rest__pulse,
  .vg-rest__rec,
  .vg-rest__box,
  .vg-rest__scan,
  .vg-rest__waiter,
  .vg-rest__live i { animation: none; }
  .vg-rest__scan { display: none; }
  .vg-rest__tag { animation: none; }
}
