/* =============================================
   Site Preview Bar — v1 / v2 switcher
   ============================================= */

:root {
  --preview-bar-height: 46px;
}

body.has-preview-bar {
  padding-bottom: var(--preview-bar-height);
}

body.has-preview-bar .fab-widget {
  bottom: calc(24px + var(--preview-bar-height));
}

.site-preview-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  height: var(--preview-bar-height);
  background: linear-gradient(180deg, #0f2848 0%, var(--navy) 100%);
  border-top: 1px solid rgba(198, 167, 92, 0.35);
  box-shadow: 0 -4px 24px rgba(11, 31, 58, 0.22);
  font-family: 'Vazirmatn', sans-serif;
}

.site-preview-bar__inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.site-preview-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.site-preview-bar__local {
  color: var(--gold, #c6a75c);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(198, 167, 92, 0.45);
  border-radius: 4px;
  padding: 2px 8px;
  line-height: 1.4;
}

.site-preview-bar__local:hover {
  background: rgba(198, 167, 92, 0.15);
}

.site-preview-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 167, 92, 0.25);
  animation: preview-bar-pulse 2s ease-in-out infinite;
}

@keyframes preview-bar-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

.site-preview-bar__switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.site-preview-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.site-preview-bar__btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.site-preview-bar__btn.is-active {
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 2px 10px rgba(198, 167, 92, 0.35);
}

.site-preview-bar__badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 122, 99, 0.22);
  border: 1px solid rgba(31, 122, 99, 0.45);
  color: #b8e8d8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 640px) {
  :root {
    --preview-bar-height: 56px;
  }

  .site-preview-bar__inner {
    justify-content: space-between;
    gap: 8px;
  }

  .site-preview-bar__label {
    font-size: 12px;
  }

  .site-preview-bar__btn {
    padding: 0 10px;
    font-size: 11px;
  }

  .site-preview-bar__badge {
    display: none;
  }
}
