/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing .dot {
  width: 6px;
  height: 6px;
  background: #999;
  border-radius: 50%;
  display: inline-block;
  animation: typing-bounce 1.2s infinite ease-in-out;
}

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

.typing .dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

/* Range slider pseudo-elements cannot be styled with Tailwind, so CSS is required */
.contribution-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.25rem;
  /* w-5 */
  height: 1.25rem;
  /* h-5 */
  border-radius: 9999px;
  /* rounded-full */
  background: white;
  /* bg-white */
  cursor: pointer;
  border: 1px solid rgb(213 215 218);
  /* border-[#D5D7DA] */
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  /* shadow-sm */
  margin-top: -0.375rem;
}

.contribution-slider::-moz-range-thumb {
  width: 1.25rem;
  /* w-5 */
  height: 1.25rem;
  /* h-5 */
  border-radius: 9999px;
  /* rounded-full */
  background: white;
  /* bg-white */
  cursor: pointer;
  border: 1px solid rgb(213 215 218);
  /* border-[#D5D7DA] */
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  /* shadow-sm */
}

.contribution-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #DD2590 0%, #DD2590 var(--slider-progress, 0%), rgb(229 231 235) var(--slider-progress, 0%), rgb(229 231 235) 100%);
  /* pink accent fill, gray-200 remainder */
  border-radius: 9999px;
  /* rounded-full */
  height: 0.5rem;
  /* h-2 */
  width: 100%;
}

.contribution-slider::-moz-range-track {
  background: rgb(229 231 235);
  /* bg-gray-200 */
  border-radius: 9999px;
  /* rounded-full */
  height: 0.5rem;
  /* h-2 */
}

.contribution-slider::-moz-range-progress {
  background: #DD2590;
  /* pink accent to match design system */
  border-radius: 9999px;
  /* rounded-full */
  height: 0.5rem;
  /* h-2 */
}

/* Sidebar collapsed state styles - only apply on desktop */
@media (min-width: 1024px) {
  .collapsed {
    width: 5rem !important;
    /* w-20 */
    box-shadow: none;
    z-index: 40;
    /* Same level as content when collapsed */
  }

  /* When expanded, overlay content with shadow and higher z-index */
  aside[data-sidebar-target="sidebar"]:not(.collapsed) {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    z-index: 50 !important;
    /* Higher than content when expanded */
  }
}

/* On very large screens (>= 2000px), always keep sidebar expanded and on same z-index plane */
@media (min-width: 2000px) {
  aside[data-sidebar-target="sidebar"] {
    width: 16rem !important;
    /* Force full width */
    position: fixed !important;
    /* Keep fixed so it doesn't scroll with page */
    z-index: 40 !important;
    /* Same z-index as content (not overlaying) */
    box-shadow: none !important;
    /* No shadow - not overlaying */
    height: 100vh !important;
    /* Full viewport height */
    min-height: 100vh !important;
    /* Ensure it extends to bottom */
  }

  aside[data-sidebar-target="sidebar"].collapsed {
    width: 16rem !important;
    /* Override collapsed width */
  }

  .sidebar-toggle-half-circle {
    display: none !important;
    /* Hide toggle button */
  }

  /* Reserve space for sidebar - push main content to the right */
  .sidebar-container main {
    margin-left: 16rem !important;
    /* Reserve space for sidebar */
  }
}

/* On mobile, ensure collapsed state doesn't interfere */
@media (max-width: 1023px) {
  .collapsed {
    width: 16rem !important;
    /* Full width on mobile */
  }
}

.collapsed .sidebar-logo-full {
  display: none;
}

.collapsed .sidebar-logo-collapsed {
  display: block;
}


.sidebar-toggle-half-circle {
  left: 15.9rem;
  /* 16rem - 0.1rem (4px) to align with border */
  transition: left 0.3s ease-in-out;
  box-shadow: 4px 4px 6px -1px rgb(0 0 0 / 0.1), 1px 2px 4px -2px rgb(0 0 0 / 0.1);
}

.sidebar-toggle-half-circle.sidebar-collapsed {
  left: 4.9rem;
  /* 5rem - 0.1rem (4px) to align with border */
}

/* Arrow points right when collapsed (to expand), left when expanded (to collapse) */
.sidebar-toggle-half-circle:not(.sidebar-collapsed) .sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* Hide toggle button on mobile */
@media (max-width: 1023px) {
  .sidebar-toggle-half-circle {
    display: none !important;
  }
}

.collapsed nav a span,
.collapsed nav a .collapsed\:hidden {
  display: none;
}

.collapsed nav a {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.collapsed .sidebar-user-menu {
  padding: 0.5rem;
}

.collapsed .sidebar-user-button {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.collapsed .sidebar-user-info,
.collapsed .sidebar-user-chevron {
  display: none;
}

.collapsed .sidebar-user-avatar {
  height: 2rem;
  width: 2rem;
}

.collapsed .sidebar-user-avatar span {
  font-size: 0.75rem;
  line-height: 1rem;
}

.collapsed [data-dashboard-toggle-target="menu"] {
  left: 5rem;
  right: auto;
  width: 16rem;
}

/* Hand-drawn arrow pointing up at the last question's button in the quote flow */
#questions-container>div:last-child {
  position: relative;
  margin-bottom: 5rem;
}

#questions-container>div:last-child::after {
  content: '';
  position: absolute;
  bottom: -6.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 38.2px;
  height: 90.75px;
  background-image: url("data:image/svg+xml,%3Csvg width='42' height='94' viewBox='0 0 42 94' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.8305 3.82256C17.8305 3.82256 27.2205 51.6825 17.3305 92.2525M39.7005 18.0726L21.7105 2.69257C19.7205 0.992569 16.7605 1.12257 14.9305 3.00257C10.8005 7.24257 3.99049 14.9226 1.50049 21.8626' stroke='%23181D27' stroke-width='3' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}