/* Safari Integrated Business Solutions - Custom Enhancements */
@layer base {
  :root {
    --color-safari: #6A760C;
    --color-safari-dark: #535c09;
    --color-safari-light: #f2f4e8;
    --color-safari-accent: #8c9b10;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Hide scrollbar for carousel track */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Range Input Custom Styling for ROI Calculator */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  outline: none;
  transition: background 0.2s;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6A760C;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s, background-color 0.15s;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #535c09;
}
input[type=range]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6A760C;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s, background-color 0.15s;
}

/* Subtle glow and animation utilities */
.glow-safari {
  box-shadow: 0 0 25px -5px rgba(106, 118, 12, 0.35);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background-color: #6A760C;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.animate-pulse-subtle {
  animation: pulse-subtle 3s ease-in-out infinite;
}

/* Modal transitions */
dialog {
  padding: 0;
  border: none;
  border-radius: 1rem;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
}
dialog::backdrop {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-out;
}
dialog[open] {
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Toast styling */
.toast-container {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s ease;
}
.toast.toast-hiding {
  opacity: 0;
  transform: translateX(30px);
}
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================
 * Safari 3-Layer Contact Widget (WhatsApp, Message, Call)
 * Strictly matches Safari Olive (#6A760C) & WhatsApp (#25D366) theme
 * ============================================================ */

/* Vertical 3-Layer Contact Dock (Pinned to right edge across all pages/scrolls) */
.safari-contact-dock {
  position: fixed !important;
  right: 0 !important;
  bottom: 110px !important;
  z-index: 99999 !important;
  background: #ffffff !important;
  border-radius: 18px 0 0 18px !important;
  box-shadow: -4px 6px 25px rgba(15, 23, 42, 0.15) !important;
  border: 1px solid #e2e8f0 !important;
  border-right: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 8px 6px !important;
  gap: 2px !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.safari-contact-dock:hover {
  transform: translateX(-4px) !important;
  box-shadow: -6px 8px 30px rgba(15, 23, 42, 0.22) !important;
}

/* Individual Layer Button in Dock */
.dock-layer-btn {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

.dock-layer-btn:hover {
  background: #f7f9e8 !important;
}

#dock-whatsapp-btn:hover {
  background: #ecfdf5 !important;
}

/* Dock Tooltips */
.dock-tooltip {
  position: absolute !important;
  right: 52px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 4px 9px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.15s ease, visibility 0.15s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
  z-index: 100000 !important;
}

.dock-tooltip::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 100% !important;
  transform: translateY(-50%) !important;
  border-width: 4px !important;
  border-style: solid !important;
  border-color: transparent transparent transparent #0f172a !important;
}

.dock-layer-btn:hover .dock-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Divider between Dock buttons */
.dock-divider {
  width: 24px !important;
  height: 1px !important;
  background: #e2e8f0 !important;
  margin: 2px 0 !important;
}

/* 3-Layer Popup Card (Desktop & Mobile) */
.safari-contact-card {
  position: fixed !important;
  right: 64px !important;
  bottom: 85px !important;
  width: 340px !important;
  max-width: calc(100vw - 28px) !important;
  background: #ffffff !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #e2e8f0 !important;
  z-index: 99999 !important;
  overflow: hidden !important;
  animation: safariCardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes safariCardPop {
  0% { opacity: 0; transform: scale(0.92) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Movable Floating Demo Widget */
#floating-demo-widget {
  touch-action: none;
  user-select: none;
  cursor: grab;
  will-change: left, top;
}

#floating-demo-widget.is-dragging {
  cursor: grabbing !important;
  opacity: 0.95;
  filter: drop-shadow(0 20px 25px rgba(106, 118, 12, 0.45));
}

@media (max-width: 640px) {
  .safari-contact-dock {
    bottom: 84px !important;
  }
  .safari-contact-card {
    right: 12px !important;
    bottom: 80px !important;
    width: calc(100vw - 24px) !important;
  }
}

/* Print Styles for USALI Reports */
@media print {
  header, footer, #demo, #roi, #faq, .no-print, .safari-contact-dock, .safari-contact-card, #floating-demo-widget {
    display: none !important;
  }
  #usali {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

