/* Custom styles for SOBR website */

/* Base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
}

/* Utility classes */
.text-balance {
  text-wrap: balance;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #7c4dff;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b3fd8;
}

/* Focus styles */
input:focus,
textarea:focus {
  outline: none;
  border-color: #7c4dff !important;
  box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.2);
}

/* Button hover effects */
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}

/* Dialog animations */
.dialog-enter {
  opacity: 0;
  transform: scale(0.95);
}

.dialog-enter-active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.dialog-exit {
  opacity: 1;
  transform: scale(1);
}

.dialog-exit-active {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 200ms ease-in, transform 200ms ease-in;
}

/* Loading spinner */
.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #7c4dff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive text adjustments */
@media (max-width: 768px) {
  .text-8xl {
    font-size: 3rem;
    line-height: 1.1;
  }

  .text-6xl {
    font-size: 2.5rem;
    line-height: 1.2;
  }
}

/* Custom underline decoration */
.underline-decoration {
  text-decoration: underline;
  text-decoration-color: #4b5563;
  text-decoration-thickness: 4px;
  text-underline-offset: 8px;
}

/* Backdrop blur support */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Custom gradient backgrounds */
.gradient-purple-blue {
  background: linear-gradient(to right, #7c3aed, #3b82f6);
}

.gradient-dark {
  background: linear-gradient(
    to bottom right,
    rgba(17, 24, 39, 0.2),
    transparent
  );
}

/* Focus visible for accessibility */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid #7c4dff;
  outline-offset: 2px;
}

/* Disabled state styles */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Form validation styles */
.error {
  border-color: #ef4444 !important;
}

.error:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

/* Success state styles */
.success {
  border-color: #10b981 !important;
}

.success:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-gray-400 {
    color: #d1d5db !important;
  }

  .text-gray-500 {
    color: #9ca3af !important;
  }

  .border-gray-800 {
    border-color: #374151 !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  button:hover {
    transform: none !important;
  }
}
