/* ═══════════════════════════════════════
   Acacia Quick Inquiry — Plugin Styles
   Matches theme's booking-drawer.php + sticky-actions.php
   Self-contained, no theme dependency
   Uses !important to override any theme CSS
   ═══════════════════════════════════════ */

/* ─── Sticky CTA Bar ─── */
#aqi-sticky.aqi-sticky {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99990 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px 20px !important;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(1, 1, 1, 0.92) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  transform: translateY(100%) !important;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
  direction: rtl !important;
  font-family: 'Cairo', sans-serif !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  width: 100% !important;
}

#aqi-sticky.aqi-sticky.is-visible {
  transform: translateY(0) !important;
}

/* ─── Buttons (shared) ─── */
#aqi-sticky .aqi-btn,
#aqi-drawer .aqi-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: none !important;
  cursor: pointer !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  border-radius: 12px !important;
  transition: transform 0.15s ease, background-color 0.2s ease !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
  height: 48px !important;
  min-height: 44px !important;
  min-width: 44px !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

#aqi-sticky .aqi-btn:active,
#aqi-drawer .aqi-btn:active {
  transform: scale(0.98) !important;
}

#aqi-sticky .aqi-icon,
#aqi-drawer .aqi-icon {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

/* WhatsApp button */
#aqi-sticky .aqi-btn--wa,
#aqi-drawer .aqi-btn--wa {
  flex: 1 !important;
  background: #16a34a !important;
  color: #fff !important;
}

#aqi-sticky .aqi-btn--wa:hover,
#aqi-sticky .aqi-btn--wa:focus,
#aqi-drawer .aqi-btn--wa:hover {
  background: #15803d !important;
  color: #fff !important;
}

/* Call button */
#aqi-sticky .aqi-btn--call {
  flex: 1 !important;
  background: #c19c52 !important;
  color: #010101 !important;
}

#aqi-sticky .aqi-btn--call:hover,
#aqi-sticky .aqi-btn--call:focus {
  background: #9a7b3e !important;
  color: #010101 !important;
}

/* Submit button (inside drawer) */
#aqi-drawer .aqi-btn--submit {
  width: 100% !important;
  flex: none !important;
  background: #16a34a !important;
  color: #fff !important;
  padding: 14px 24px !important;
  margin-top: 8px !important;
  font-size: 15px !important;
  height: 48px !important;
  border-radius: 12px !important;
}

#aqi-drawer .aqi-btn--submit:hover,
#aqi-drawer .aqi-btn--submit:focus {
  background: #15803d !important;
  color: #fff !important;
}

/* ─── Drawer ─── */
#aqi-drawer.aqi-drawer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none !important;
  font-family: 'Cairo', sans-serif !important;
  direction: rtl !important;
  margin: 0 !important;
  padding: 0 !important;
}

#aqi-drawer.aqi-drawer.is-open {
  display: block !important;
}

/* Overlay */
#aqi-drawer .aqi-drawer__overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  border: none !important;
}

#aqi-drawer.is-open .aqi-drawer__overlay {
  opacity: 1 !important;
}

/* Sheet */
#aqi-drawer .aqi-drawer__sheet {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: #010101 !important;
  border-top-left-radius: 16px !important;
  border-top-right-radius: 16px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateY(100%) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

#aqi-drawer.is-animating .aqi-drawer__sheet {
  transform: translateY(0) !important;
}

/* Handle */
#aqi-drawer .aqi-drawer__handle {
  display: flex !important;
  justify-content: center !important;
  padding: 12px 0 8px !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
}

#aqi-drawer .aqi-drawer__handle-bar {
  width: 40px !important;
  height: 6px !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: none !important;
}

/* Body */
#aqi-drawer .aqi-drawer__body {
  padding: 0 20px 24px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  background: transparent !important;
}

/* Title */
#aqi-drawer .aqi-drawer__title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 0 4px !important;
  text-align: center !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  line-height: 1.4 !important;
}

/* Subtitle */
#aqi-drawer .aqi-drawer__subtitle {
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.5) !important;
  margin: 0 0 20px !important;
  text-align: center !important;
  padding: 0 !important;
  background: transparent !important;
  line-height: 1.5 !important;
}

/* ─── Form ─── */
#aqi-drawer .aqi-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

#aqi-drawer .aqi-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Label */
#aqi-drawer .aqi-label {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  margin-bottom: 4px !important;
  padding: 0 !important;
  background: transparent !important;
  display: block !important;
  text-align: right !important;
}

/* Input & Select — FORCE dark styling */
#aqi-drawer .aqi-input,
#aqi-drawer input.aqi-input,
#aqi-drawer select.aqi-input,
#aqi-drawer input[type="date"].aqi-input {
  width: 100% !important;
  padding: 12px 16px !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 14px !important;
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  min-height: 44px !important;
  height: auto !important;
  transition: border-color 0.2s ease !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  text-align: right !important;
  direction: rtl !important;
}

#aqi-drawer .aqi-input:focus,
#aqi-drawer input.aqi-input:focus,
#aqi-drawer select.aqi-input:focus {
  border-color: #c19c52 !important;
  box-shadow: 0 0 0 2px rgba(193, 156, 82, 0.3) !important;
  outline: none !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Placeholder */
#aqi-drawer .aqi-input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

/* Select arrow (RTL) */
#aqi-drawer select.aqi-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgba(255,255,255,0.4)' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 14px center !important;
  background-size: 16px !important;
  padding-left: 36px !important;
}

/* Select option styling (limited browser support but helps) */
#aqi-drawer select.aqi-input option {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
  padding: 8px !important;
}

/* Cancel */
#aqi-drawer .aqi-cancel {
  display: block !important;
  width: 100% !important;
  padding: 12px !important;
  margin-top: 4px !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: color 0.2s ease !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

#aqi-drawer .aqi-cancel:hover {
  color: #ffffff !important;
}

/* ─── Floating Action Button (WhatsApp) ─── */
#aqi-fab.aqi-fab {
  position: fixed !important;
  bottom: 24px !important;
  left: 24px !important;
  z-index: 99989 !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: #16a34a !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 20px rgba(22, 163, 74, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
  padding: 0 !important;
  animation: aqi-fab-pulse 2.5s ease-in-out infinite !important;
}

#aqi-fab.aqi-fab:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 6px 28px rgba(22, 163, 74, 0.5) !important;
}

#aqi-fab.aqi-fab:active {
  transform: scale(0.95) !important;
}

#aqi-fab .aqi-icon {
  width: 28px !important;
  height: 28px !important;
}

@keyframes aqi-fab-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(22, 163, 74, 0.4); }
  50%      { box-shadow: 0 4px 20px rgba(22, 163, 74, 0.4), 0 0 0 12px rgba(22, 163, 74, 0); }
}

/* ─── Greeting Bubble ─── */
#aqi-greeting.aqi-greeting {
  position: fixed !important;
  bottom: 96px !important;
  left: 24px !important;
  z-index: 99991 !important;
  max-width: 320px !important;
  width: calc(100vw - 48px) !important;
  font-family: 'Cairo', sans-serif !important;
  direction: rtl !important;
  opacity: 0 !important;
  transform: translateY(20px) scale(0.95) !important;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: none !important;
}

#aqi-greeting.aqi-greeting.is-visible {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

/* Bubble arrow pointing to FAB */
#aqi-greeting.aqi-greeting::after {
  content: '' !important;
  position: absolute !important;
  bottom: -8px !important;
  left: 26px !important;
  width: 16px !important;
  height: 16px !important;
  background: #ffffff !important;
  transform: rotate(45deg) !important;
  border-radius: 2px !important;
}

/* Close button */
#aqi-greeting .aqi-greeting__close {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: #333 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  font-size: 16px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
  padding: 0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
  transition: background 0.2s ease !important;
}

#aqi-greeting .aqi-greeting__close:hover {
  background: #555 !important;
}

/* Body */
#aqi-greeting .aqi-greeting__body {
  background: #ffffff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  transition: box-shadow 0.2s ease !important;
}

#aqi-greeting .aqi-greeting__body:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2) !important;
}

/* Greeting text */
#aqi-greeting .aqi-greeting__text {
  padding: 16px 20px 12px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  line-height: 1.6 !important;
  background: #ffffff !important;
  margin: 0 !important;
}

/* CTA row */
#aqi-greeting .aqi-greeting__cta {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 12px 20px !important;
  background: #16a34a !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  transition: background 0.2s ease !important;
}

#aqi-greeting .aqi-greeting__body:hover .aqi-greeting__cta {
  background: #15803d !important;
}

/* ─── Desktop: hide sticky bar, show FAB ─── */
@media (min-width: 769px) {
  #aqi-sticky.aqi-sticky {
    display: none !important;
  }

  #aqi-fab.aqi-fab {
    display: flex !important;
  }

  #aqi-greeting.aqi-greeting {
    max-width: 340px !important;
  }
}

/* ─── Mobile: show sticky bar, hide FAB when sticky is visible ─── */
@media (max-width: 768px) {
  #aqi-fab.aqi-fab {
    bottom: 80px !important;
    left: 16px !important;
    width: 52px !important;
    height: 52px !important;
  }

  #aqi-fab .aqi-icon {
    width: 24px !important;
    height: 24px !important;
  }

  /* Move greeting above sticky bar on mobile */
  #aqi-greeting.aqi-greeting {
    bottom: 144px !important;
    left: 16px !important;
    max-width: calc(100vw - 32px) !important;
  }

  /* Hide FAB when sticky bar is visible (to avoid overlap) */
  #aqi-sticky.aqi-sticky.is-visible ~ #aqi-fab.aqi-fab {
    display: none !important;
  }
}

/* ─── Small screen adjustments ─── */
@media (max-width: 380px) {
  #aqi-sticky .aqi-btn {
    font-size: 14px !important;
    gap: 6px !important;
  }

  #aqi-sticky .aqi-icon {
    width: 18px !important;
    height: 18px !important;
  }

  #aqi-greeting .aqi-greeting__text {
    font-size: 14px !important;
  }
}
