/* ═══════════════════════════════════════════════════
   FOLLOWHACK — CUSTOMER AUTH MODAL + WHATSAPP BUTTON
   Neon Glass Terminal Design System
   ═══════════════════════════════════════════════════ */

/* ── AUTH MODAL OVERLAY ── */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── AUTH MODAL CONTAINER ── */
.auth-modal {
  width: 100%;
  max-width: 420px;
  margin: 20px;
  background: rgba(20, 20, 28, 0.95);
  border: 1px solid rgba(132, 204, 22, 0.2);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 0 40px rgba(132, 204, 22, 0.08), 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-modal-overlay.active .auth-modal {
  transform: translateY(0) scale(1);
}

/* ── CLOSE BUTTON ── */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ── TABS ── */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-tab.active {
  background: rgba(132, 204, 22, 0.15);
  color: #84CC16;
}

.auth-tab:hover:not(.active) {
  color: rgba(255, 255, 255, 0.8);
}

/* ── FORM PANELS ── */
.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
  animation: authFadeIn 0.3s ease;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── FORM GROUPS ── */
.auth-form-group {
  margin-bottom: 18px;
}

.auth-form-group label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.auth-form-group input:focus {
  border-color: rgba(132, 204, 22, 0.5);
  box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.1);
}

.auth-form-group input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* ── SUBMIT BUTTON ── */
.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: #84CC16;
  border: none;
  border-radius: 10px;
  color: #050507;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  margin-top: 8px;
}

.auth-submit-btn:hover {
  background: #a3e635;
  box-shadow: 0 0 20px rgba(132, 204, 22, 0.3);
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── ERROR / SUCCESS MESSAGES ── */
.auth-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-bottom: 16px;
  display: none;
}

.auth-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.auth-message.success {
  display: block;
  background: rgba(132, 204, 22, 0.1);
  border: 1px solid rgba(132, 204, 22, 0.3);
  color: #84CC16;
}

/* ── HEADER NAV AUTH BUTTON ── */
.nav-auth-btn {
  padding: 8px 18px;
  background: rgba(132, 204, 22, 0.1);
  border: 1px solid rgba(132, 204, 22, 0.3);
  border-radius: 8px;
  color: #84CC16;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.nav-auth-btn:hover {
  background: rgba(132, 204, 22, 0.2);
  border-color: #84CC16;
}

/* ── LOGGED-IN STATE ── */
.nav-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout-btn {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ── CHECKOUT AUTH HINT ── */
.checkout-auth-hint {
  background: rgba(132, 204, 22, 0.06);
  border: 1px solid rgba(132, 204, 22, 0.15);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-auth-hint p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.checkout-auth-hint a {
  color: #84CC16;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.checkout-auth-hint a:hover {
  text-decoration: underline;
}

.checkout-logged-as {
  background: rgba(132, 204, 22, 0.08);
  border: 1px solid rgba(132, 204, 22, 0.2);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #84CC16;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── WHATSAPP FLOATING BUTTON (DISCREET) ── */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9990;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  background: rgba(37, 211, 102, 0.85);
  border-color: #25D366;
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.whatsapp-float svg {
  width: 22px;
  height: 22px;
  fill: rgba(37, 211, 102, 0.6);
  transition: fill 0.3s ease;
}

.whatsapp-float:hover svg {
  fill: #fff;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .auth-modal {
    margin: 12px;
    padding: 24px 20px;
  }

  .nav-auth-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  .whatsapp-float {
    width: 40px;
    height: 40px;
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-float svg {
    width: 20px;
    height: 20px;
  }
}