/* =========================
   Proxy Toggle Switch
========================= */

/* .proxy-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 160px;
  min-width: 160px;
} */

.proxy-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Remove or decrease the hardcoded width */
  /* width: 160px; */ 
  /* min-width: 160px; */
}

.proxy-switch input {
  display: none;
}

.proxy-slider {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #b8b8b8;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #9e9e9e;
}

/* knob */
.proxy-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* ON state */
.proxy-switch input:checked + .proxy-slider {
  background: #f48120;
  border-color: #c86510;
}

.proxy-switch input:checked + .proxy-slider::before {
  transform: translateX(18px);
}

/* disabled */
.proxy-switch input:disabled + .proxy-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.proxy-label {
  font-size: 14px;
  font-weight: 500;
}

/* =========================
   Tooltip
========================= */

.history-tooltip {
  position: relative;
  cursor: pointer;
  color: #888;
  font-size: 14px;
}

.tooltip-content {
  position: absolute;
  left: 22px;
  top: -8px;
  width: 240px;
  background: #222;
  color: white;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.history-tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* =========================
   Loading Overlay
========================= */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.loading-box {
  background: white;
  padding: 20px 28px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  color: #374151;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}