/* ═══════════════════════════════════════
   Flowmatix — Demo QR Widget
   Bottom-right floating widget
   ═══════════════════════════════════════ */

.fx-qr-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Trigger Button ── */
.fx-qr-trigger {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #FF8C42, #4cc9ff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 24px rgba(255, 140, 66, 0.35),
    0 0 40px rgba(76, 201, 255, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fxQrPulse 2.5s ease-in-out infinite;
  position: relative;
}

.fx-qr-trigger:hover {
  transform: scale(1.1);
  box-shadow:
    0 6px 32px rgba(255, 140, 66, 0.5),
    0 0 60px rgba(76, 201, 255, 0.3);
}

.fx-qr-trigger svg {
  width: 28px;
  height: 28px;
  fill: white;
}

/* Glow ring around trigger */
.fx-qr-trigger::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8C42, #4cc9ff, #FF8C42);
  background-size: 300% 300%;
  animation: fxQrGlow 3s ease-in-out infinite;
  z-index: -1;
  opacity: 0.6;
  filter: blur(8px);
}

@keyframes fxQrPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes fxQrGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── Card (hidden by default) ── */
.fx-qr-card {
  position: fixed;
  top: 50%;
  left: 50%;
  bottom: auto;
  right: auto;
  width: 300px;
  z-index: 10000;
  background: linear-gradient(165deg, #0c1625 0%, #0a0f1a 100%);
  border: 1px solid rgba(76, 201, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(76, 201, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fx-qr-card.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* Animated border glow */
.fx-qr-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FF8C42, #4cc9ff, #2f7bff, #FF8C42);
  background-size: 400% 400%;
  animation: fxQrBorder 4s ease-in-out infinite;
  z-index: -1;
  opacity: 0.4;
}

@keyframes fxQrBorder {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

/* ── Card Header ── */
.fx-qr-header {
  text-align: center;
  margin-bottom: 16px;
}

.fx-qr-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 140, 66, 0.15), rgba(76, 201, 255, 0.15));
  border: 1px solid rgba(255, 140, 66, 0.25);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #FF8C42;
  margin-bottom: 10px;
}

.fx-qr-title {
  font-size: 16px;
  font-weight: 700;
  color: #eef4ff;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.fx-qr-subtitle {
  font-size: 12px;
  color: rgba(178, 190, 214, 0.7);
  margin: 0;
}

/* ── QR Code ── */
.fx-qr-code {
  background: white;
  border-radius: 12px;
  padding: 12px;
  margin: 0 auto 16px;
  width: fit-content;
  position: relative;
}

.fx-qr-code img {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 4px;
}

/* ── CTA ── */
.fx-qr-cta {
  display: block;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF8C42, #FF7A1A);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fx-qr-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

/* ── Close button ── */
.fx-qr-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: rgba(178, 190, 214, 0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.fx-qr-close:hover {
  color: #eef4ff;
}

/* ── Language Switcher ── */
.fx-qr-langs {
  display: flex !important;
  justify-content: center !important;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.fx-qr-lang {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: rgba(178, 190, 214, 0.7) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  padding: 4px 7px !important;
  border-radius: 5px !important;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
  min-width: 28px;
  text-align: center;
}

.fx-qr-lang:hover {
  background: rgba(255, 140, 66, 0.12) !important;
  border-color: rgba(255, 140, 66, 0.4) !important;
  color: #FF8C42 !important;
}

.fx-qr-lang.active {
  background: rgba(255, 140, 66, 0.18) !important;
  border-color: #FF8C42 !important;
  color: #FF8C42 !important;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .fx-qr-widget { bottom: 16px; right: 16px; }
  .fx-qr-trigger { width: 56px; height: 56px; }
  .fx-qr-trigger svg { width: 24px; height: 24px; }
  .fx-qr-card { width: 280px; padding: 20px; }
  .fx-qr-code img { width: 140px; height: 140px; }
}
