/* =========================
   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);
  }
}

/* =========================
   Release Notes Modal
========================= */

.release-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
}

.release-box {
  background: white;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px 28px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.release-box h2 {
  margin: 0 0 4px;
  font-size: 1.35em;
  color: #111827;
}

.release-box .release-subtitle {
  margin: 0 0 16px;
  font-size: 0.85em;
  color: #9ca3af;
}

.release-box ul {
  list-style: disc !important;
  margin: 0 0 20px;
  padding-left: 1.4em !important;
}

.release-box li {
  margin-bottom: 10px;
  padding-left: 4px;
  font-size: 0.92em;
  color: #374151;
  line-height: 1.5;
}

.release-box li::marker {
  color: #2563eb;
}

.release-box li strong {
  color: #111827;
}

.release-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #2563eb;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.release-close-btn:hover {
  background: #1d4ed8;
}

/* =========================
   Dashboard Maintenance Banner
========================= */

.maintenance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 72rem;
  margin: 0 auto 16px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  color: #92400e;
  font-size: 0.9em;
  font-weight: 500;
}

.maintenance-banner-close {
  background: none;
  border: none;
  font-size: 1.3em;
  line-height: 1;
  color: #92400e;
  cursor: pointer;
  padding: 0 4px;
}

.maintenance-banner-close:hover {
  color: #78350f;
}

/* =========================
   App Footer (Version / What's New)
========================= */

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.app-footer__version {
  font-size: 0.75em;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

.app-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75em;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.app-footer__link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.app-footer__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
}