/* A8n.7.4.5.1: VehicleStay operations workspace ("Стоянки"). */


.vstay-tabs { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }

.vstay-tab {

  padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border, #2a2f3a);

  background: transparent; color: var(--text, #e6e9ef); cursor: pointer; font: inherit;

}

.vstay-tab.is-active { background: var(--accent, #3b82f6); border-color: var(--accent, #3b82f6); color: #fff; }


.vstay-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }

.vstay-filters input, .vstay-filters select {

  padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border, #2a2f3a);

  background: var(--panel, #12151c); color: var(--text, #e6e9ef); font: inherit;

}


.vstay-summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 2px; }

.vstay-metric {

  display: flex; flex-direction: column; gap: 2px; padding: 8px 14px;

  border: 1px solid var(--border, #2a2f3a); border-radius: 8px; background: var(--panel, #12151c); min-width: 120px;

}

.vstay-metric__n { font-size: 20px; font-weight: 700; }

.vstay-metric__l { font-size: 12px; color: var(--muted, #94a3b8); }

.vstay-summary__note { font-size: 12px; margin-bottom: 8px; }


.vstay-list { overflow-x: auto; }

.vstay-table { width: 100%; border-collapse: collapse; }

.vstay-table th, .vstay-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border, #2a2f3a); font-size: 13px; vertical-align: top; }

.vstay-table th { color: var(--muted, #94a3b8); font-weight: 600; }

.vstay-row { cursor: pointer; }

.vstay-row:hover, .vstay-row:focus { background: rgba(59,130,246,0.08); outline: none; }

.vstay-row__plate { font-weight: 700; }

.vstay-row__observed { font-size: 11px; font-weight: 400; }

.vstay-row__warn { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }


/* status is text+icon, never colour-only */

.vstay-life, .vstay-rev { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }

.vstay-life--active { background: rgba(34,197,94,0.15); color: #22c55e; }

.vstay-life--ended { background: rgba(59,130,246,0.15); color: #60a5fa; }

.vstay-life--lost { background: rgba(250,204,21,0.15); color: #facc15; }

.vstay-life--review { background: rgba(168,85,247,0.15); color: #c084fc; }

.vstay-life--unknown { background: rgba(148,163,184,0.12); color: #94a3b8; }

.vstay-rev--confirmed { background: rgba(34,197,94,0.12); color: #4ade80; }

.vstay-rev--corrected { background: rgba(59,130,246,0.12); color: #60a5fa; }

.vstay-rev--rejected { background: rgba(239,68,68,0.12); color: #f87171; }

.vstay-rev--needs { background: rgba(250,204,21,0.12); color: #facc15; }

.vstay-rev--unreviewed { background: rgba(148,163,184,0.1); color: #94a3b8; }


.vstay-clip { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; }

.vstay-clip--ready { background: rgba(34,197,94,0.12); color: #4ade80; }

.vstay-clip--pending { background: rgba(250,204,21,0.12); color: #facc15; }

.vstay-clip--failed, .vstay-clip--unavailable { background: rgba(239,68,68,0.12); color: #f87171; }

.vstay-clip--pruned { background: rgba(148,163,184,0.12); color: #94a3b8; }

.vstay-clip--unknown { background: rgba(148,163,184,0.1); color: #94a3b8; }


.vstay-pager { display: flex; gap: 8px; margin: 12px 0; }

.vstay-error { color: var(--red, #f87171); margin: 8px 0; }

.vstay-flash { margin: 6px 0; }

.vstay-client-note, [data-client-note] { font-size: 12px; }


.vstay-drawer {

  position: fixed; top: 0; right: 0; width: min(720px, 96vw); height: 100vh; overflow: auto;

  background: var(--panel, #12151c); border-left: 1px solid var(--border, #2a2f3a);

  box-shadow: -8px 0 24px rgba(0,0,0,0.4); padding: 16px; z-index: 40;

}

.vstay-drawer__head { margin-bottom: 12px; }

.vstay-detail__head { margin-bottom: 12px; }

.vstay-detail__plate { font-size: 24px; font-weight: 800; }

.vstay-detail__grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 12px 0; }

.vstay-detail__grid h4 { margin: 0 0 6px; }

.vstay-detail__warn { display: flex; gap: 6px; flex-wrap: wrap; }

.vstay-detail__actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

.vstay-detail__viewer { margin: 12px 0; border: 1px solid var(--border, #2a2f3a); border-radius: 8px; padding: 8px; }

.vstay-detail__viewer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }

.vstay-detail__media-stage { position: relative; width: 100%; }

.vstay-detail__media-stage .vstay-clip-video { width: 100%; display: block; border-radius: 6px; }

.vstay-detail__media-stage .vpass-path-overlay { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2; }

.vstay-detail__media-stage .vpass-path-overlay [role="button"] { pointer-events: auto; }

.vstay-detail__raw { margin-top: 12px; }

.vstay-detail__raw pre { overflow: auto; font-size: 11px; background: rgba(0,0,0,0.25); padding: 8px; border-radius: 6px; }


@media (min-width: 900px) {

  .vstay-detail__grid { grid-template-columns: repeat(3, 1fr); }

}

/* A8n7462: passage snapshot evidence (compact, honest, never a placeholder) */

.vstay-row__thumbs { padding: 6px; }

.vstay-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }

.vstay-thumb-btn {
  display: block; position: relative; padding: 0; border: none; background: none; cursor: zoom-in;
  border-radius: 6px; line-height: 0;
}

.vstay-thumb-btn:focus-visible { outline: 2px solid var(--accent, #3b82f6); outline-offset: 2px; }

.vstay-thumb {
  display: block; width: 160px; max-width: 200px; height: 100px;
  object-fit: cover; border-radius: 6px; background: #111827;
  border: 1px solid var(--border, #2a2f3a);
}

/* Compact direction badge - a dark chip readable over any underlying image
   (light or dark), kept small so it never covers the vehicle itself. */
.vstay-thumb__badge {
  position: absolute; top: 4px; left: 4px; z-index: 1;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(10, 12, 16, 0.72); color: #fff;
  font-size: 10px; line-height: 1.6; font-weight: 600;
  letter-spacing: 0.02em; pointer-events: none;
}

.vstay-thumb--empty {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 160px; height: 100px; border-radius: 6px; border: 1px dashed var(--border, #2a2f3a);
  color: var(--muted, #94a3b8); font-size: 11px; padding: 4px;
}

.vstay-detail__snapshot { margin: 4px 0 8px; }

@media (max-width: 480px) {
  .vstay-thumb, .vstay-thumb--empty { width: 130px; height: 82px; }
}

/* Reusable accessible image lightbox */

.img-lightbox {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(5, 9, 16, 0.82);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.img-lightbox__dialog {
  position: relative; max-width: min(1100px, 96vw); max-height: 92vh;
  display: flex; flex-direction: column; gap: 10px; outline: none;
}

.img-lightbox__figure { display: flex; align-items: center; justify-content: center; min-height: 0; }

.img-lightbox__image {
  display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto;
  object-fit: contain; border-radius: 8px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.img-lightbox__close {
  position: absolute; top: -14px; right: -14px; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--border, #2a2f3a);
  background: var(--panel, #12151c); color: var(--text, #e6e9ef);
  font-size: 20px; line-height: 1; cursor: pointer; z-index: 1;
}

.img-lightbox__close:focus-visible { outline: 2px solid var(--accent, #3b82f6); outline-offset: 2px; }

.img-lightbox__caption {
  background: var(--panel, #12151c); border: 1px solid var(--border, #2a2f3a);
  border-radius: 8px; padding: 8px 12px; color: var(--text, #e6e9ef); font-size: 13px;
}

.img-lightbox__line--plate { font-weight: 700; font-size: 15px; }

@media (max-width: 480px) {
  .img-lightbox { padding: 8px; }
  .img-lightbox__close { top: -10px; right: 0; }
}
