/* ====================================================================
   ATLAS YAHYA TRADING - UNIFIED B2B CONVERSION ENGINE (V6 CLEAN)
   Zero Overlaps • Single Source of Truth • Mobile Ergonomic Dock
   ==================================================================== */

:root {
  --ay-purple: #9B5CB2;
  --ay-purple-dark: #6D48A7;
  --ay-navy: #0B0A1E;
  --ay-navy-card: rgba(14, 12, 34, 0.96);
  --ay-green: #25D366;
  --ay-green-dark: #128C7E;
  --ay-gold: #F59E0B;
  --ay-gold-light: #FCD34D;
  --ay-text: #FFFFFF;
  --ay-text-muted: rgba(255, 255, 255, 0.7);
  --ay-border: rgba(155, 92, 178, 0.35);
  --ay-shadow: 0 16px 45px rgba(0, 0, 0, 0.55);
}

/* ====================================================================
   1. DESKTOP FLOATING WHATSAPP & BACK-TO-TOP
   ==================================================================== */
.ay-lead-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.atlas-rtl .ay-lead-floating {
  right: auto;
  left: 24px;
  align-items: flex-start;
}

/* Back to Top Button */
.ay-back-to-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(11, 10, 30, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ay-back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ay-back-to-top:hover {
  background: #6D48A7;
  border-color: #9B5CB2;
  transform: translateY(-2px);
}

/* Floating Action Button (FAB) */
.ay-lead-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #FFFFFF !important;
  text-decoration: none !important;
  padding: 11px 18px;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.ay-lead-fab:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 35px rgba(37, 211, 102, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.ay-lead-fab-icon {
  width: 26px;
  height: 26px;
  fill: #FFFFFF;
  flex-shrink: 0;
}

.ay-lead-fab-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.ay-lead-fab-title {
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: -0.2px;
}

.ay-lead-fab-sub {
  font-size: 11px;
  opacity: 0.92;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ay-lead-pulse-dot {
  width: 7px;
  height: 7px;
  background: #FFFFFF;
  border-radius: 50%;
  display: inline-block;
  animation: ayPulse 1.8s infinite;
}

@keyframes ayPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.ay-lead-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #EF4444;
  color: #FFF;
  font-size: 10.5px;
  font-weight: 800;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0B0A1E;
}

/* Proactive Speech Bubble */
.ay-lead-bubble {
  background: var(--ay-navy-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--ay-border);
  border-radius: 16px;
  padding: 16px 18px;
  width: 300px;
  box-shadow: var(--ay-shadow);
  color: #FFFFFF;
  display: none;
  animation: aySlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

.ay-lead-bubble.active {
  display: block;
}

.ay-lead-bubble-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  cursor: pointer;
}

body.atlas-rtl .ay-lead-bubble-close {
  right: auto;
  left: 12px;
}

.ay-lead-bubble-close:hover {
  color: #FFF;
}

.ay-lead-bubble-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ay-lead-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6D48A7, #9B5CB2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #FFF;
  border: 1.5px solid #25D366;
}

.ay-lead-agent-name {
  font-weight: 700;
  font-size: 13px;
}

.ay-lead-agent-status {
  font-size: 11px;
  color: #25D366;
  font-weight: 600;
}

.ay-lead-bubble-body {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.ay-lead-bubble-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ay-lead-btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #FFF !important;
  font-weight: 700;
  font-size: 12.5px;
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: background 0.2s;
}

.ay-lead-btn-wa:hover {
  background: #1eb956;
}

.ay-lead-btn-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(155, 92, 178, 0.2);
  border: 1px solid rgba(155, 92, 178, 0.4);
  color: #FFF !important;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.ay-lead-btn-modal:hover {
  background: rgba(155, 92, 178, 0.35);
}

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

/* ====================================================================
   2. MOBILE CLEAN ERGONOMIC DOCK (PHONES ONLY <= 768px)
   NO OVERLAPPING BARS • SINGLE TOUCH BAR
   ==================================================================== */
.ay-mobile-sticky-bar {
  display: none !important;
}

@media (max-width: 768px) {
  /* HIDE the desktop floating button completely on mobile to prevent overlap */
  .ay-lead-floating {
    display: none !important;
  }

  body {
    padding-bottom: 64px !important;
  }

  .ay-mobile-sticky-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99995 !important;
    background: rgba(11, 10, 30, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(155, 92, 178, 0.35) !important;
    height: 56px !important;
    padding: 0 8px calc(env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5) !important;
    align-items: center !important;
    justify-content: space-around !important;
  }

  .ay-mobile-item {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    height: 100% !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .ay-mobile-item svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0 !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .ay-mobile-item.active, .ay-mobile-item:hover {
    color: #9B5CB2 !important;
  }

  .ay-mobile-item.ay-highlight-wa {
    color: #25D366 !important;
    font-weight: 700 !important;
  }

  .ay-mobile-item.ay-highlight-quote {
    color: #F59E0B !important;
    font-weight: 700;
  }
}

/* ====================================================================
   3. 15-SECOND EXPRESS QUOTE MODAL (UNIVERSAL)
   ==================================================================== */
.ay-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 4, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ay-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.ay-modal-card {
  background: #0E0C24;
  border: 1px solid rgba(155, 92, 178, 0.45);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 26px 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  color: #FFFFFF;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ay-modal-overlay.active .ay-modal-card {
  transform: translateY(0);
}

.ay-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

body.atlas-rtl .ay-modal-close {
  right: auto;
  left: 14px;
}

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

.ay-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 9px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.ay-modal-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.25;
  color: #FFF;
}

.ay-modal-desc {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  line-height: 1.4;
}

.ay-form-group {
  margin-bottom: 11px;
}

.ay-form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.ay-form-input, .ay-form-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  padding: 10px 13px;
  color: #FFFFFF;
  font-size: 13.5px;
  outline: none;
  box-sizing: border-box;
}

.ay-form-input:focus, .ay-form-select:focus {
  border-color: #9B5CB2;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(155, 92, 178, 0.25);
}

.ay-form-select option {
  background: #0B0A1E;
  color: #FFF;
}

.ay-modal-submit {
  width: 100%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #FFF;
  border: none;
  border-radius: 11px;
  padding: 12px;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 14px;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
  transition: all 0.2s;
}

.ay-modal-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}

.ay-modal-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
}

/* ====================================================================
   4. LOCAL SOCIAL PROOF TOAST
   ==================================================================== */
.ay-social-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99980;
  background: rgba(14, 12, 34, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(155, 92, 178, 0.35);
  border-radius: 12px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  max-width: 300px;
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  pointer-events: none;
}

body.atlas-rtl .ay-social-toast {
  left: auto;
  right: 24px;
}

.ay-social-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .ay-social-toast {
    bottom: 64px;
    left: 12px;
    max-width: calc(100% - 24px);
  }
  body.atlas-rtl .ay-social-toast {
    right: 12px;
    left: auto;
  }
}

.ay-social-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #25D366;
  font-size: 14px;
  flex-shrink: 0;
}

.ay-social-toast-text {
  font-size: 11.5px;
  line-height: 1.35;
  color: #FFFFFF;
}

.ay-social-toast-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}
