/* ============================================
   Import Custom Fonts
   ============================================ */
@import url('../fonts/stylesheet.css');

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --font-stack: 'Matter', 'DM Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============================================
   Base Styles
   ============================================ */
html, body {
  height: 100%;
}

body {
  font-family: var(--font-stack);
  -webkit-user-select: none;
  user-select: none;
}

* {
  font-family: var(--font-stack);
}

/* Allow text selection for form inputs and links */
input, textarea, a, button {
  -webkit-user-select: text;
  user-select: text;
}

/* ============================================
   Input Styles
   ============================================ */
input::placeholder {
  color: #707070 !important;
}

.input-valid {
  border: 2px solid #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
  animation: valid-pulse 2s ease-in-out infinite;
}

@keyframes valid-pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.2);
  }
}

.input-invalid {
  border: 2px solid #ef4444 !important;
}

/* ============================================
   Button Styles
   ============================================ */
button:hover {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:disabled {
  cursor: default !important;
}

/* ============================================
   Main Container
   ============================================ */
main {
  animation: fade-in 0.5s ease-in;
}

/* ============================================
   Password Step Transition
   ============================================ */
#passwordStep {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Toast Container
   ============================================ */
#toast-container {
  position: fixed !important;
  top: 1rem !important;
  right: 1rem !important;
  z-index: 9999 !important;
}

@media (max-width: 640px) {
  #toast-container {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    max-width: calc(100% - 1.5rem);
    width: auto;
  }
}

/* ============================================
   Scrollbar Styles
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

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

/* ============================================
   Accessibility
   ============================================ */
input:focus,
input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
}

.animate-slide-down {
  animation: slide-down 0.2s ease-out;
}

.animate-fade-out {
  animation: fade-out 0.25s ease-out forwards;
}
