/**
 * Digi Idle — chrome HUD: conn-status (tema Digivice)
 * Spellbar removida da UI.
 */

/* conn-status flutuante removido */
.conn-status,
.conn-status.dv-float-hud,
.conn-status.is-fab-ready,
.conn-status.dv-float-hud.is-fab-ready {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* —— Conn status (legado, oculto acima) —— */
.conn-status {
  position: fixed !important;
  top: 16px;
  right: calc(var(--bar-space, calc(var(--bar-h, 54px) + 16px)) + 12px);
  left: auto;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(72vw, 340px);
  padding: 7px 12px 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(79, 214, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 154, 46, 0.1), transparent 45%),
    linear-gradient(180deg, rgba(14, 22, 38, 0.94), rgba(8, 14, 24, 0.92));
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.25) inset;
  color: #9fb0c8;
  font: 600 11px Rajdhani, system-ui, sans-serif;
  letter-spacing: 0.03em;
  backdrop-filter: blur(14px) saturate(1.15);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
  /* some só após JS posicionar (evita flash na toolbar) */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.conn-status.is-fab-ready,
.conn-status.dv-float-hud.is-fab-ready {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.conn-status.is-dragging {
  cursor: grabbing;
  border-color: rgba(255, 154, 46, 0.45);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 154, 46, 0.15) inset;
}
.conn-status.dv-float-hud {
  right: auto !important;
  bottom: auto !important;
}

.conn-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #556;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.conn-dot.fresh {
  background: #48c96f;
  box-shadow: 0 0 8px rgba(72, 201, 111, 0.7);
}
.conn-dot.stale {
  background: #ffb04a;
  box-shadow: 0 0 8px rgba(255, 176, 74, 0.65);
}
.conn-dot.down {
  background: #e5484d;
  box-shadow: 0 0 8px rgba(229, 72, 77, 0.7);
  animation: barCritPulse 1.05s ease-in-out infinite;
}
.conn-dot.offline {
  background: #4fd6ff;
  box-shadow: 0 0 8px rgba(79, 214, 255, 0.6);
}

.conn-label {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #d7e3f5;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conn-sep {
  margin: 0 5px 0 2px;
  color: rgba(79, 214, 255, 0.35);
}

.conn-status.alert {
  color: #ffe4e4;
  border-color: rgba(229, 72, 77, 0.45);
  background:
    linear-gradient(135deg, rgba(229, 72, 77, 0.16), transparent 50%),
    linear-gradient(180deg, rgba(58, 18, 22, 0.95), rgba(20, 8, 10, 0.92));
}
.conn-dot.alert {
  background: #e5484d;
  box-shadow: 0 0 8px rgba(229, 72, 77, 0.75);
}

.conn-status.conn-update {
  top: 56px;
  align-items: flex-start;
  max-width: min(74vw, 320px);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  border-radius: 12px;
  font-weight: 600;
  color: #ffe2a0;
  background:
    linear-gradient(135deg, rgba(255, 176, 74, 0.14), transparent 50%),
    linear-gradient(180deg, rgba(48, 36, 10, 0.95), rgba(20, 14, 6, 0.92));
  border-color: rgba(242, 201, 74, 0.4);
}
.conn-status.conn-update .conn-dot {
  margin-top: 3px;
}
.conn-status.conn-update .conn-label {
  white-space: normal;
  color: #ffe2a0;
}

body[data-toolbar-pos="left"] .conn-status:not(.dv-float-hud) {
  right: 16px;
  left: auto;
}
body[data-toolbar-pos="right"] .conn-status:not(.dv-float-hud) {
  right: calc(var(--bar-space, calc(var(--bar-h, 54px) + 16px)) + 12px);
}

/* Spellbar removida da UI. */
.spellbar,
#spellbar-resize-handle {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  opacity: 0 !important;
}

@media (max-width: 640px) {
  .conn-status {
    max-width: min(88vw, 300px);
    padding: 6px 10px;
    font-size: 10px;
  }
}
