/* BrianToddInsurance.com - Custom Design System Styles */

/* Modern Typography & Font Features */
html {
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Range Slider */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 100%;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #4f46e5;
  cursor: pointer;
  margin-top: -7px;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
  border: 2.5px solid #ffffff;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #4338ca;
}

input[type=range]::-moz-range-thumb {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #4f46e5;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
  border: 2.5px solid #ffffff;
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #e2e8f0;
  border-radius: 9999px;
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #e2e8f0;
  border-radius: 9999px;
}

/* Subtle Pulse for Trust Elements */
@keyframes subtle-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

.animate-float {
  animation: subtle-float 4s ease-in-out infinite;
}

/* Chat Message Bubbles */
.chat-bubble-user {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-ai {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

/* Custom Scrollbar for Chat and Content */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Fade in page animation */
.page-view {
  animation: fadeIn 0.25s ease-out;
}

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

/* Typing Indicator Animation */
.typing-dot {
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Touch Action & Tap Highlight for Mobile */
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* AI Drawer Slide-out & Backdrop (High z-index for Mobile) */
#ai-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 28rem;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

#ai-drawer.open,
#ai-drawer.active,
#ai-drawer.translate-x-0 {
  transform: translateX(0) !important;
}

#ai-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#ai-drawer-backdrop.open,
#ai-drawer-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}


