/* Base Sticky Bar - Hidden by default */
#sticky-conversion-bar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  background: linear-gradient(135deg, #4a8c4a, #3a7c3a) !important;
  color: white !important;
  z-index: 9999 !important;
  padding: 12px 0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s ease-in-out !important;
}

/* Show state */
#sticky-conversion-bar.show {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ===== UNIVERSAL RESET - OVERRIDE ANY CONFLICTING STYLES ===== */
html body #sticky-conversion-bar,
html body div#sticky-conversion-bar {
  display: block !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

html body #sticky-conversion-bar * {
  box-sizing: border-box !important;
}

/* ===== DESKTOP LAYOUT - SWAPPED BUTTON POSITIONS ===== */

/* ===== DESKTOP LAYOUT (769px and above) ===== */
@media (min-width: 769px) {
  html body #sticky-conversion-bar .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 30px !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Desktop Quote Button - NOW ON THE LEFT (order: 1) */
  html body #sticky-conversion-bar .sticky-quote-btn {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: linear-gradient(135deg, #ff8c42, #ff6b1a) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    text-indent: 0 !important;
    overflow: visible !important;
    position: relative !important;
    order: 1 !important; /* LEFT SIDE */
  }

  /* Desktop Call Button - NOW ON THE RIGHT (order: 3) */
  html body #sticky-conversion-bar .sticky-call-btn {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    text-indent: 0 !important;
    overflow: visible !important;
    position: relative !important;
    order: 3 !important; /* RIGHT SIDE */
  }

  /* Desktop Logos - CENTER (order: 2) */
  html body #sticky-conversion-bar .sticky-logos-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    order: 2 !important; /* CENTER */
    flex: 1 !important;
  }

  html body #sticky-conversion-bar .sticky-bar-logo {
    height: 30px !important;
    width: auto !important;
    opacity: 1 !important;
    background-color: white !important;
    padding: 5px;
    border-radius: 3px;
  }

  /* Desktop Hover Effects */
  html body #sticky-conversion-bar .sticky-call-btn:hover {
    background: white !important;
    transform: translateY(-1px) !important;
  }

  html body #sticky-conversion-bar .sticky-quote-btn:hover {
    background: linear-gradient(135deg, #ff7a2b, #ff5500) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 26, 0.3) !important;
  }

  /* FORCE REMOVE any pseudo-elements on desktop */
  html body #sticky-conversion-bar .sticky-call-btn::before,
  html body #sticky-conversion-bar .sticky-call-btn::after,
  html body #sticky-conversion-bar .sticky-quote-btn::before,
  html body #sticky-conversion-bar .sticky-quote-btn::after {
    display: none !important;
    content: none !important;
  }
}

/* ===== MOBILE LAYOUT - SWAPPED BUTTON POSITIONS ===== */

/* ===== MOBILE LAYOUT (768px and below) ===== */
@media (max-width: 768px) {
  html body #sticky-conversion-bar {
    padding: 8px 0 !important;
  }

  html body #sticky-conversion-bar .container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 0 12px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Mobile Quote Button - NOW ON THE LEFT (order: 1) */
  html body #sticky-conversion-bar .sticky-quote-btn {
    display: inline-block !important;
    padding: 10px 12px !important;
    background: linear-gradient(135deg, #ff8c42, #ff6b1a) !important;
    color: transparent !important; /* Hide original text */
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 11px !important;
    transition: all 0.3s ease !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-indent: -9999px !important;
    position: relative !important;
    order: 1 !important; /* LEFT SIDE */
    width: 135px !important;
    max-width: 135px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  html body #sticky-conversion-bar .sticky-quote-btn::after {
    content: "Quick Quote" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-indent: 0 !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    display: block !important;
  }

  /* Mobile Call Button - NOW ON THE RIGHT (order: 3) */
  html body #sticky-conversion-bar .sticky-call-btn {
    display: inline-block !important;
    padding: 10px 12px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: transparent !important; /* Hide original text */
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 11px !important;
    transition: all 0.3s ease !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-indent: -9999px !important;
    position: relative !important;
    order: 3 !important; /* RIGHT SIDE */
    width: 120px !important;
    max-width: 120px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  html body #sticky-conversion-bar .sticky-call-btn::after {
    content: "Call Now" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-indent: 0 !important;
    color: #333 !important;
    font-size: 11px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    display: block !important;
  }

  /* Mobile Logos - CENTER (order: 2) */
  html body #sticky-conversion-bar .sticky-logos-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    flex: 1 !important;
    order: 2 !important; /* CENTER */
    margin: 0 !important;
    padding: 0 8px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html body #sticky-conversion-bar .sticky-bar-logo {
    height: 32px !important;
    width: auto !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    max-width: 55px !important;
  }

  /* Mobile Hover Effects */
  html body #sticky-conversion-bar .sticky-call-btn:hover {
    background: white !important;
    transform: translateY(-1px) !important;
  }

  html body #sticky-conversion-bar .sticky-quote-btn:hover {
    background: linear-gradient(135deg, #ff7a2b, #ff5500) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 26, 0.3) !important;
  }
}

/* ===== SMALL MOBILE (480px and below) ===== */
@media (max-width: 480px) {
  html body #sticky-conversion-bar .container {
    gap: 6px !important;
    padding: 0 10px !important;
  }

  html body #sticky-conversion-bar .sticky-quote-btn {
    width: 120px !important; /* Quick Quote on left */
    max-width: 120px !important;
    padding: 8px 10px !important;
    order: 1 !important;
  }

  html body #sticky-conversion-bar .sticky-call-btn {
    width: 105px !important; /* Call Now on right */
    max-width: 105px !important;
    padding: 8px 10px !important;
    order: 3 !important;
  }

  html body #sticky-conversion-bar .sticky-call-btn::after,
  html body #sticky-conversion-bar .sticky-quote-btn::after {
    font-size: 10px !important;
  }

  html body #sticky-conversion-bar .sticky-bar-logo {
    height: 28px !important;
    max-width: 50px !important;
    background-color: white !important;
    padding: 5px;
    border-radius: 3px;
  }

  html body #sticky-conversion-bar .sticky-logos-container {
    gap: 8px !important;
    padding: 0 6px !important;
    order: 2 !important;
  }
}

/* ===== VERY SMALL MOBILE (360px and below) ===== */
@media (max-width: 360px) {
  html body #sticky-conversion-bar .container {
    gap: 4px !important;
    padding: 0 8px !important;
  }

  html body #sticky-conversion-bar .sticky-quote-btn {
    width: 113px !important; /* Quick Quote on left */
    max-width: 113px !important;
    padding: 8px 8px !important;
    order: 1 !important;
  }

  html body #sticky-conversion-bar .sticky-call-btn {
    width: 98px !important; /* Call Now on right */
    max-width: 98px !important;
    padding: 8px 8px !important;
    order: 3 !important;
  }

  html body #sticky-conversion-bar .sticky-call-btn::after,
  html body #sticky-conversion-bar .sticky-quote-btn::after {
    font-size: 9px !important;
  }

  html body #sticky-conversion-bar .sticky-bar-logo {
    height: 26px !important;
    max-width: 48px !important;
  }

  html body #sticky-conversion-bar .sticky-logos-container {
    gap: 6px !important;
    padding: 0 4px !important;
    order: 2 !important;
  }
}

/* ===== NUCLEAR OVERRIDE - FORCE CORRECT LAYOUT ===== */
html body #sticky-conversion-bar.show {
  display: block !important;
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html body #sticky-conversion-bar.show .container {
  display: flex !important;
}

html body #sticky-conversion-bar.show .sticky-call-btn,
html body #sticky-conversion-bar.show .sticky-quote-btn,
html body #sticky-conversion-bar.show .sticky-logos-container {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure no other styles interfere */
html body #sticky-conversion-bar .sticky-call-btn,
html body #sticky-conversion-bar .sticky-quote-btn {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

html body #sticky-conversion-bar .sticky-call-btn:focus,
html body #sticky-conversion-bar .sticky-quote-btn:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(74, 140, 74, 0.3) !important;
}
