/* ==========================================================================
   camDash VMS — Layout & Components
   ========================================================================== */

/* ---------- Global: запрет выделения ---------- */
body {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

input,
textarea,
[contenteditable] {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* ---------- Login ---------- */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.25s,
    visibility 0.25s;
}
.login-overlay.active {
  opacity: 1;
  visibility: visible;
}
.login-overlay:not(.active) {
  opacity: 0;
  visibility: hidden;
}

.login-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  padding: 32px;
  width: 100%;
  max-width: 360px;
}

.login-brand {
  text-align: center;
  font-size: 1.6em;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-primary);
  margin-bottom: 28px;
  text-transform: uppercase;
}
.login-brand span {
  font-size: 0.5em;
  color: var(--text-muted);
  vertical-align: super;
  letter-spacing: 1px;
}

.input-group {
  margin-bottom: 14px;
}
.input-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input-group input {
  width: 100%;
  padding: 9px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 0.95em;
  font-family: inherit;
  transition: border-color 0.15s;
}
.input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

#login-btn {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: var(--accent-primary);
  color: var(--bg-body);
  border: none;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity 0.15s;
}
#login-btn:hover {
  opacity: 0.9;
}
#login-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.error-msg {
  color: var(--status-offline);
  text-align: center;
  margin-top: 12px;
  font-size: 0.85em;
  min-height: 16px;
}

/* ---------- Top Bar ---------- */
.vms-topbar {
  height: var(--topbar-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-md);
  flex-shrink: 0;
}

.vms-brand {
  font-family: "Domargo", "Consolas", "Monaco", monospace;
  font-size: 1.1em;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  text-transform: uppercase;
}
.vms-brand-sub {
  font-size: 0.6em;
  color: var(--text-muted);
  margin-left: 4px;
  vertical-align: super;
}

.vms-topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.vms-clock {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

.vms-user {
  color: var(--text-secondary);
  font-size: 0.9em;
}

.vms-btn {
  padding: 5px 12px;
  font-size: 0.85em;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.vms-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}
.vms-btn-ghost {
  border-color: transparent;
}
.vms-btn-ghost:hover {
  border-color: var(--border-accent);
}

.vms-btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1em;
  padding: 2px 6px;
  transition: color 0.15s;
}
.vms-btn-icon:hover {
  color: var(--text-primary);
}

/* ---------- Layout ---------- */
.vms-layout {
  display: flex;
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
}

/* ---------- Panels ---------- */
.vms-panel {
  background: var(--bg-panel);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}
.vms-panel-left {
  width: var(--panel-width-left);
}
.vms-panel-right {
  width: var(--panel-width-right);
  border-right: none;
  border-left: 1px solid var(--border-default);
}

.vms-panel-header {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.vms-panel-title {
  font-size: 0.8em;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.vms-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
}

.vms-panel-footer {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--border-default);
  flex-shrink: 0;
}

/* ---------- Search ---------- */
.vms-search {
  margin-bottom: var(--space-sm);
}
.vms-search input {
  width: 100%;
  padding: 7px 9px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 0.85em;
  font-family: inherit;
}
.vms-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* ---------- Device Tree ---------- */
.vms-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vms-tree-item {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
  border: 1px solid transparent;
  border-radius: 3px;
  transition:
    background 0.12s,
    transform 0.1s;
  user-select: none;
}
.vms-tree-item:hover {
  background: var(--bg-subtle);
}
.vms-tree-item:active {
  cursor: grabbing;
  transform: scale(0.98);
}
.vms-tree-item.selected {
  background: var(--accent-primary-bg);
  border: 1px solid var(--accent-primary);
}

.vms-tree-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.vms-tree-dot.online {
  background: var(--status-online);
  box-shadow: 0 0 6px var(--status-online);
}
.vms-tree-dot.offline {
  background: var(--status-offline);
  opacity: 0.5;
}

.vms-tree-name {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vms-tree-item:hover .vms-tree-name {
  color: var(--text-primary);
}

.vms-tree-object {
  font-size: 0.75em;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.vms-empty {
  text-align: center;
  color: var(--text-dim);
  padding: var(--space-lg);
  font-size: 0.9em;
}

/* ---------- Legend ---------- */
.vms-legend {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8em;
  color: var(--text-muted);
}
.vms-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vms-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.vms-dot-online {
  background: var(--status-online);
}
.vms-dot-offline {
  background: var(--status-offline);
  opacity: 0.5;
}

/* ---------- Main Content ---------- */
.vms-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-cell);
  overflow: hidden;
  min-width: 0;
}

.vms-toolbar {
  height: 38px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-md);
  flex-shrink: 0;
}

.vms-toolbar-group {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.vms-toolbar-label {
  font-size: 0.8em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.vms-btn-layout {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 0.8em;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.12s;
}
.vms-btn-layout:hover {
  border-color: var(--border-accent);
  color: var(--text-secondary);
}
.vms-btn-layout.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-body);
}

/* ---------- Video Grid ---------- */
.vms-grid {
  flex: 1;
  display: grid;
  gap: 2px;
  padding: 2px;
  background: var(--border-default);
  overflow: hidden;
}
.vms-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.vms-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}
.vms-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
}
.vms-grid-5 {
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

.vms-grid-cell {
  background: var(--bg-cell);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.vms-grid-cell:hover {
  border-color: var(--border-accent);
}
.vms-grid-cell.selected {
  border-color: var(--accent-primary);
}

.vms-grid-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Подсветка ячейки при клике по камере в списке слева.
   Рисуем поверх видео через ::after: inset box-shadow на самой ячейке
   закрывается <video> и не виден. Плавность — через opacity. */
.vms-grid-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border: 3px solid #f59e0b;
  box-shadow: inset 0 0 28px rgba(245, 158, 11, 0.65);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.vms-grid-cell.highlighted::after {
  opacity: 1;
}

.vms-cell-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    transparent 100%
  );
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 2;
}

.vms-cell-name {
  font-size: 0.8em;
  color: var(--text-primary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  font-weight: 500;
}

.vms-cell-status {
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.vms-cell-status.live {
  background: var(--status-online);
  color: #000;
}
.vms-cell-status.loading {
  background: #a9cc2e;
  color: #000;
}
.vms-cell-status.offline {
  background: var(--status-offline);
  color: #fff;
}

.vms-cell-empty {
  color: var(--text-dim);
  font-size: 0.85em;
  text-align: center;
  user-select: none;
  pointer-events: none;
}
.vms-cell-empty-icon {
  font-size: 1.8em;
  margin-bottom: 6px;
  opacity: 0.3;
  transition: all 0.2s;
}
.vms-cell-empty-text {
  opacity: 0.5;
  transition: opacity 0.2s;
}

/* ---------- Drag & Drop ---------- */
.vms-grid-cell.drag-over {
  border-color: var(--text-primary) !important;
  border-style: solid !important;
  background: var(--accent-primary-bg) !important;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}
.vms-grid-cell.drag-over .vms-cell-empty-icon {
  opacity: 1;
  transform: scale(1.2);
  color: var(--text-primary);
}
.vms-grid-cell.drag-over .vms-cell-empty-text {
  opacity: 1;
  color: var(--text-primary);
}
.vms-grid-cell.drag-over video {
  opacity: 0.3;
}
.vms-grid-cell.drag-over .vms-cell-overlay {
  background: rgba(255, 255, 255, 0.1);
}

/* ---------- Context Menu ---------- */
.vms-context-menu {
  position: fixed;
  z-index: 10003;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  padding: 6px 0;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.vms-context-item {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85em;
  color: var(--text-secondary);
  transition: background 0.12s;
}

.vms-context-item:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.vms-context-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.vms-context-icon {
  font-size: 1em;
  width: 16px;
  text-align: center;
}

.vms-context-separator {
  height: 1px;
  background: var(--border-default);
  margin: 4px 0;
}

/* ---------- Right Panel ---------- */
.vms-selected-empty {
  color: var(--text-dim);
  font-size: 0.85em;
  text-align: center;
  padding: var(--space-lg) var(--space-sm);
  font-style: italic;
}

.vms-detail-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.vms-detail-row:last-child {
  border-bottom: none;
}

.vms-detail-label {
  display: block;
  font-size: 0.75em;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.vms-detail-value {
  color: var(--text-primary);
  font-size: 0.9em;
  word-break: break-word;
}

/* ---------- System Stats ---------- */
.vms-sys-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vms-sys-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-subtle);
  border-radius: 3px;
}
.vms-sys-stat-value {
  font-size: 1.1em;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.vms-sys-stat-label {
  font-size: 0.8em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Индикаторы состояния ячейки */
.vms-cell-status-msg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
  z-index: 3;
  display: none;
  pointer-events: none;
  border: 1px solid var(--border-accent);
}

/* ==========================================================================
   FULLSCREEN MODE
   ========================================================================== */

body.fullscreen-mode .vms-topbar,
body.fullscreen-mode .vms-panel-left,
body.fullscreen-mode .vms-panel-right,
body.fullscreen-mode .vms-toolbar {
  display: none !important;
}

body.fullscreen-mode .vms-layout {
  height: 100vh;
}

body.fullscreen-mode .vms-main {
  width: 100%;
  height: 100%;
}

body.fullscreen-mode .vms-grid {
  height: 100vh;
  padding: 0;
  gap: 1px;
}

.vms-exit-fullscreen {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9em;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  font-family: inherit;
}

body.fullscreen-mode .vms-exit-fullscreen {
  opacity: 0.6;
  pointer-events: auto;
}

body.fullscreen-mode .vms-exit-fullscreen:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* Single cell expand */
.vms-grid.single-cell-expanded .vms-grid-cell {
  display: none;
}

.vms-grid.single-cell-expanded .vms-grid-cell.expanded {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: #000;
  border: none;
}

.vms-grid.single-cell-expanded .vms-grid-cell.expanded video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vms-grid.single-cell-expanded .vms-grid-cell.expanded .vms-cell-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.8) 0%,
    transparent 60%
  );
}

/* ==========================================================================
   PTZ Controls
   ========================================================================== */
.vms-ptz-controls {
  padding: var(--space-md);
  border-top: 1px solid var(--border-default);
  margin-top: var(--space-md);
}

.vms-ptz-title {
  font-size: 0.8em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--space-sm);
  text-align: center;
}

.vms-ptz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  max-width: 140px;
  margin: 0 auto var(--space-md) auto;
}

.vms-ptz-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.vms-ptz-btn:active,
.vms-ptz-btn.active {
  background: var(--accent-primary);
  color: var(--bg-body);
  border-color: var(--accent-primary);
}

.vms-ptz-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Расположение кнопок в сетке */
.vms-ptz-btn[data-dir="up"] {
  grid-column: 2;
  grid-row: 1;
}
.vms-ptz-btn[data-dir="left"] {
  grid-column: 1;
  grid-row: 2;
}
.vms-ptz-btn[data-dir="right"] {
  grid-column: 3;
  grid-row: 2;
}
.vms-ptz-btn[data-dir="down"] {
  grid-column: 2;
  grid-row: 2;
}

.vms-ptz-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 140px;
  margin: 0 auto;
}

.vms-ptz-btn-zoom {
  flex: 1;
  padding: 8px 0;
  font-weight: bold;
  font-size: 1.4em;
}

.vms-ptz-label {
  font-size: 0.8em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   Device Tree: Grouping & Hover
   ========================================================================== */

/* Заголовок группы объектов */
.vms-group-header {
  padding: 6px 10px 4px 10px;
  font-size: 0.7em;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 6px;
  user-select: none;
}

.vms-group-header:first-child {
  border-top: none;
  margin-top: 0;
}

/* Подсветка группы при ховере (легкая, не конфликтует с highlighted) */
.vms-grid-cell.group-hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.vms-grid-cell.group-hover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

/* Fade-out эффект при исчезновении */
.vms-grid-cell.group-hover-fade::after {
  opacity: 0;
}

.vms-grid-cell.group-hover-fade {
  border-color: transparent;
  transition: border-color 0.3s ease-out;
}

/* При наведении на элемент списка — подсвечиваем его сильнее */
.vms-tree-item.group-hover-item {
  background: var(--bg-subtle);
  border-color: var(--border-accent);
}

/* ==========================================================================
   Устойчивое воспроизведение: замороженный кадр вместо чёрного экрана
   ========================================================================== */
.vms-grid-cell canvas.freeze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  background: #000;
}
.vms-grid.single-cell-expanded .vms-grid-cell.expanded canvas.freeze {
  object-fit: contain;
}

.vms-grid-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;

  /* Глубина: снаружи ярко, к центру — гаснет */
  background: radial-gradient(
    ellipse at center,
    rgba(126, 230, 168, 0) 0%,
    rgba(46, 204, 113, 0.2) 55%,
    rgba(46, 204, 113, 0.75) 82%,
    rgba(126, 230, 168, 1) 100%
  );

  opacity: 0;
  transition: opacity 0.45s ease;

  --m: linear-gradient(#000, #000);
  mask-image:
    var(--m), var(--m), var(--m), var(--m), var(--m), var(--m), var(--m),
    var(--m), var(--m), var(--m);
  mask-size:
    100% 100%,
    calc(100% - 10px) calc(100% - 10px),
    calc(100% - 20px) calc(100% - 20px),
    calc(100% - 28px) calc(100% - 28px),
    calc(100% - 36px) calc(100% - 36px),
    calc(100% - 42px) calc(100% - 42px),
    calc(100% - 48px) calc(100% - 48px),
    calc(100% - 52px) calc(100% - 52px),
    calc(100% - 56px) calc(100% - 56px),
    calc(100% - 58px) calc(100% - 58px);
  mask-position: center; /* ← симметрия вместо 5px 5px… */
  mask-repeat: no-repeat;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.vms-grid-cell.highlighted::after {
  opacity: 1;
  animation: vmsWarpPulse 3s ease-in-out infinite;
}

@keyframes vmsWarpPulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.035); /* лёгкий «вдох» туннеля */
    filter: brightness(1.25) saturate(1.15);
  }
}

.vms-panel-right {
  transition: width 0.2s ease;
}
.vms-panel-right > * {
  min-width: var(--panel-width-right);
} /* контент не «сплющивается» при анимации */
.vms-panel-right.collapsed {
  width: 0;
  border-left: none;
}

.vms-panel-body-fixed {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vms-btn-block {
  width: 100%;
  padding: 8px 12px;
}
.vms-btn-danger {
  border-color: var(--status-offline);
  color: var(--status-offline);
}
.vms-btn-danger:hover {
  background: var(--status-offline-bg);
  border-color: var(--status-offline);
  color: var(--status-offline);
}
.vms-btn.active {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

@keyframes vmsSpin {
  to {
    transform: rotate(360deg);
  }
}
.vms-btn-icon.spinning {
  animation: vmsSpin 0.8s linear infinite;
  pointer-events: none;
}
