/* ===== Saarthi button animations (site-wide) ===== */
:root {
  --sc-btn-blue-a: #006aff;
  --sc-btn-blue-b: #0888ff;
  --sc-btn-shadow: 0 10px 22px rgba(0, 106, 255, 0.28);
  --sc-btn-shadow-strong: 0 14px 28px rgba(0, 106, 255, 0.36);
  --sc-btn-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary,
.btn-login,
.btn-fleet,
.btn-view-all,
.btn-book-now,
.btn-book-sm,
.btn-book-vehicle,
.btn-payment,
.btn-solid,
.search-btn,
.help-btn,
.trip-tab {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.28s var(--sc-btn-ease),
    box-shadow 0.28s var(--sc-btn-ease),
    background 0.35s ease,
    background-position 0.45s ease,
    border-color 0.28s ease,
    color 0.28s ease,
    filter 0.28s ease;
}

/* Soft shine sweep */
.btn-primary::before,
.btn-login::before,
.btn-view-all::before,
.btn-book-now::before,
.btn-book-vehicle::before,
.btn-payment::before,
.btn-solid::before,
.search-btn::before,
.btn-book-sm::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 62%,
    transparent 100%
  );
  transform: translateX(-120%);
  transition: transform 0.65s var(--sc-btn-ease);
  pointer-events: none;
  z-index: 1;
}

.btn-primary:hover::before,
.btn-login:hover::before,
.btn-view-all:hover::before,
.btn-book-now:hover::before,
.btn-book-vehicle:hover::before,
.btn-payment:hover::before,
.btn-solid:hover::before,
.search-btn:hover::before,
.btn-book-sm:hover::before {
  transform: translateX(120%);
}

.btn-primary > *,
.btn-login > *,
.btn-view-all > *,
.btn-book-now > *,
.btn-book-vehicle > *,
.btn-payment > *,
.search-btn > *,
.btn-book-sm > * {
  position: relative;
  z-index: 2;
}

/* Primary CTAs */
.btn-primary,
.btn-login,
.btn-view-all,
.btn-book-now,
.btn-book-vehicle,
.btn-payment,
.btn-solid {
  background-image: linear-gradient(244deg, var(--sc-btn-blue-a) 0%, var(--sc-btn-blue-b) 55%, #39b6ff 100%);
  background-size: 160% 160%;
  background-position: 0% 50%;
  box-shadow: 0 4px 12px rgba(0, 106, 255, 0.18);
}

.btn-primary:hover,
.btn-login:hover,
.btn-view-all:hover,
.btn-book-now:hover,
.btn-book-vehicle:hover,
.btn-payment:hover,
.btn-solid:hover {
  transform: translateY(-3px) scale(1.02);
  background-position: 100% 50%;
  box-shadow: var(--sc-btn-shadow);
  filter: brightness(1.04);
}

.btn-primary:active,
.btn-login:active,
.btn-view-all:active,
.btn-book-now:active,
.btn-book-vehicle:active,
.btn-payment:active,
.btn-solid:active {
  transform: translateY(-1px) scale(0.985);
  box-shadow: 0 4px 10px rgba(0, 106, 255, 0.22);
  filter: brightness(0.98);
}

.btn-primary:focus-visible,
.btn-login:focus-visible,
.btn-view-all:focus-visible,
.btn-book-now:focus-visible,
.btn-book-vehicle:focus-visible,
.btn-payment:focus-visible,
.search-btn:focus-visible,
.help-btn:focus-visible,
.trip-tab:focus-visible,
.btn-book-sm:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(0, 106, 255, 0.35), var(--sc-btn-shadow);
}

/* Search / Explore Cabs */
.search-btn {
  background-image: linear-gradient(244deg, var(--sc-btn-blue-a) 0%, var(--sc-btn-blue-b) 55%, #39b6ff 100%);
  background-size: 160% 160%;
  background-position: 0% 50%;
  box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0.12);
}

.search-btn:hover {
  transform: translateY(-2px) scale(1.015);
  background-position: 100% 50%;
  box-shadow: var(--sc-btn-shadow-strong);
}

.search-btn:active {
  transform: translateY(0) scale(0.99);
}

/* Small book buttons */
.btn-book-sm {
  background-image: linear-gradient(244deg, #2563eb 0%, #3b82f6 100%);
  background-size: 140% 140%;
  background-position: 0% 50%;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.22);
}

.btn-book-sm:hover {
  transform: translateY(-2px) scale(1.04);
  background-position: 100% 50%;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.btn-book-sm:active {
  transform: translateY(0) scale(0.98);
}

/* Trip tabs */
.trip-tab {
  box-shadow: none;
}

.trip-tab:hover:not(.active) {
  transform: translateY(-1px);
  background: rgba(0, 106, 255, 0.08);
  color: #006aff;
}

.trip-tab.active {
  box-shadow: 0 6px 16px rgba(0, 106, 255, 0.28);
  transform: translateY(0);
  animation: sc-tab-pop 0.35s var(--sc-btn-ease);
}

.trip-tab.active:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 18px rgba(0, 106, 255, 0.32);
}

@keyframes sc-tab-pop {
  0% {
    transform: scale(0.96);
  }
  70% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

/* Help chip — motion only (colors come from page styles) */
.help-btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.help-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}

.help-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Navbar login icon slight bounce on hover */
.btn-primary svg,
.btn-login svg {
  transition: transform 0.28s var(--sc-btn-ease);
  display: inline-block;
  vertical-align: middle;
}

.btn-primary:hover svg,
.btn-login:hover svg {
  transform: translateY(2px);
}

/* Idle gentle pulse on main CTAs (subtle, non-intrusive) */
@keyframes sc-cta-glow {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(0, 106, 255, 0.18);
  }
  50% {
    box-shadow: 0 8px 20px rgba(0, 106, 255, 0.3);
  }
}

.search-btn,
.btn-book-vehicle {
  animation: sc-cta-glow 2.8s ease-in-out infinite;
}

.search-btn:hover,
.btn-book-vehicle:hover {
  animation: none;
}

/* Prefer quieter motion when requested */
@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-login,
  .btn-fleet,
  .btn-view-all,
  .btn-book-now,
  .btn-book-sm,
  .btn-book-vehicle,
  .btn-payment,
  .search-btn,
  .help-btn,
  .trip-tab,
  .btn-primary::before,
  .btn-login::before,
  .btn-view-all::before,
  .btn-book-now::before,
  .btn-book-vehicle::before,
  .btn-payment::before,
  .search-btn::before,
  .btn-book-sm::before,
  .btn-primary svg,
  .btn-login svg {
    transition: none !important;
    animation: none !important;
  }

  .btn-primary:hover,
  .btn-login:hover,
  .btn-view-all:hover,
  .btn-book-now:hover,
  .btn-book-vehicle:hover,
  .btn-payment:hover,
  .search-btn:hover,
  .btn-book-sm:hover,
  .help-btn:hover,
  .trip-tab:hover,
  .trip-tab.active {
    transform: none !important;
  }
}
