/* ═══════════════════════════════════════════════
   SHC Gauge — Visual result bar component
   ═══════════════════════════════════════════════ */

.shc-gauge {
  position: relative;
  width: 100%;
  margin: 12px 0 8px;
  user-select: none;
}

/* ─── Bar Container ─── */
.shc-gauge-bar {
  display: flex;
  width: 100%;
  height: 28px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

/* ─── Zone Segments ─── */
.shc-gz {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.shc-gz + .shc-gz {
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}

/* RTL border flip */
[data-shc-app][dir="rtl"] .shc-gz + .shc-gz {
  border-left: none;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

/* Zone label */
.shc-gzl {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  opacity: 0.9;
}

/* ─── Zone Colors ─── */

/* OK / Green */
.shc-gz--ok {
  background: linear-gradient(180deg, rgba(70, 245, 140, 0.35), rgba(70, 245, 140, 0.2));
  color: #d4ffe5;
}

/* Warning / Yellow */
.shc-gz--warn {
  background: linear-gradient(180deg, rgba(255, 214, 102, 0.35), rgba(255, 214, 102, 0.2));
  color: #fff3d4;
}

/* Danger / Red */
.shc-gz--danger {
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.35), rgba(255, 107, 107, 0.2));
  color: #ffd9d9;
}

/* Info / Blue */
.shc-gz--info {
  background: linear-gradient(180deg, rgba(115, 216, 255, 0.35), rgba(115, 216, 255, 0.2));
  color: #d4f0ff;
}

/* Neutral */
.shc-gz--neutral {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  color: rgba(255, 255, 255, 0.6);
}


/* ─── Marker / Needle ─── */
.shc-gauge-mk {
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 2;
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* RTL marker */
[data-shc-app][dir="rtl"] .shc-gauge-mk {
  transform: translateX(50%);
}

/* Needle arrow */
.shc-gauge-needle {
  font-size: 14px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 0 3px rgba(70, 245, 140, 0.4));
}

/* Value badge */
.shc-gauge-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 0 8px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}


/* ─── Hover Enhancement ─── */
.shc-gauge:hover .shc-gz {
  opacity: 0.7;
}

.shc-gauge:hover .shc-gauge-mk {
  filter: brightness(1.1);
}


/* ─── Responsive ─── */
@media (max-width: 560px) {
  .shc-gauge-bar {
    height: 22px;
    border-radius: 11px;
  }

  .shc-gzl {
    font-size: 8px;
  }

  .shc-gauge-needle {
    font-size: 12px;
  }

  .shc-gauge-val {
    height: 18px;
    min-width: 28px;
    font-size: 9px;
    padding: 0 6px;
  }
}


/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  .shc-gauge-mk {
    transition: none;
  }
}


/* ─── Print ─── */
@media print {
  .shc-gauge-bar {
    border: 1px solid #999;
    background: #f5f5f5;
  }

  .shc-gz--ok      { background: #c8f7d5; color: #1a5c2a; }
  .shc-gz--warn    { background: #fff3d4; color: #6b5a1e; }
  .shc-gz--danger  { background: #ffd9d9; color: #6b1a1a; }
  .shc-gz--info    { background: #d4f0ff; color: #1a4a6b; }
  .shc-gz--neutral { background: #eee;    color: #666; }

  .shc-gauge-val {
    background: #333;
    border-color: #999;
  }
}