/* Halo Funding Application - Consolidated Styles */

/* ===== BASE STYLES ===== */
body {
  font-family: "Work Sans", "Inter", sans-serif;
  color: rgb(15, 13, 13);
  min-height: 100vh;
}

/* Application specific font family override */
.application-body {
  font-family: "Inter", sans-serif;
}

html {
  scroll-behavior: smooth;
}

.application-hero-section {
  height: 75vh !important;
}

/* ===== NAVIGATIO
N STYLES ===== */
/* Custom hover styles for header navigation */
.header-nav-item:hover {
  font-weight: 500;
  color: #000000;
  font-family: Lato, sans-serif;
  font-style: normal;
  text-decoration: none;
}

/* Make logo white */
.logo-white {
  filter: brightness(0) invert(1);
}

/* Mobile navigation menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* ===== FORM ELEMENT STYLES ===== */
/* Checkbox styles for peer interaction */
.peer:checked ~ div svg {
  opacity: 1;
}

.peer:not(:checked) ~ div svg {
  opacity: 0;
}

/* Radio button styles */
.peer:checked ~ label .radio-dot {
  opacity: 1;
  background-color: #246fff; /* blue-500 */
}

.peer:not(:checked) ~ label .radio-dot {
  opacity: 0;
}

.peer:checked ~ label .radio-border {
  border-color: #246fff; /* blue-500 */
  background-color: white;
}

.peer:not(:checked) ~ label .radio-border {
  border-color: #d1d5db; /* gray-300 */
  background-color: white;
}

/* ===== VALIDATION STYLES ===== */
/* Enhanced validation styles */
.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

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

.error-message {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.success-message {
  color: #10b981;
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== TOAST NOTIFICATION SYSTEM ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
  max-width: 400px;
}

.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 8px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 320px;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease-out;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.2s ease-in;
}

.toast-success {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
}

.toast-error {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.toast-info {
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  word-wrap: break-word;
}

.toast-success .toast-message {
  color: #065f46;
}

.toast-error .toast-message {
  color: #991b1b;
}

.toast-warning .toast-message {
  color: #92400e;
}

.toast-info .toast-message {
  color: #1e40af;
}

.toast-close {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.8);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 0 0 8px 8px;
  transition: width linear;
}

.toast-success .toast-progress {
  background: #10b981;
}

.toast-error .toast-progress {
  background: #ef4444;
}

.toast-warning .toast-progress {
  background: #f59e0b;
}

.toast-info .toast-progress {
  background: #3b82f6;
}

/* Hover effects */
.toast:hover {
  transform: translateX(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.toast:hover .toast-progress {
  animation-play-state: paused;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Mobile responsive */
@media (max-width: 640px) {
  .toast-container {
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .toast {
    min-width: auto;
  }
}

/* ===== APPLICATION FORM RESPONSIVE ===== */
/* Mobile-first approach for application form */
.application-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.application-sidebar {
  order: 2;
  width: 100%;
  min-height: auto;
}

.application-main {
  order: 1;
  width: 100%;
  flex: 1;
}

/* Tablet and up */
@media (min-width: 768px) {
  .application-container {
    flex-direction: row;
    height: 94vh;
  }

  .application-sidebar {
    order: 1;
    width: 35%;
    min-height: 94vh;
  }

  .application-main {
    order: 2;
    width: 65%;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .application-sidebar {
    width: 40%;
  }

  .application-main {
    width: 60%;
  }
}

/* ===== MOBILE NAVIGATION STYLES ===== */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85%;
  height: 100%;
  background: white;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-menu.active {
  transform: translateX(0);
}

/* ===== STEP NAVIGATION RESPONSIVE ===== */
.step-nav-mobile {
  display: block;
}

.step-nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .step-nav-mobile {
    display: none;
  }

  .step-nav-desktop {
    display: block;
  }
}

/* ===== FORM GRID RESPONSIVE ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .form-grid {
    gap: 2rem;
  }
}

/* ===== FEATURE GRID RESPONSIVE ===== */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

/* ===== MOBILE SPECIFIC IMPROVEMENTS ===== */
@media (max-width: 767px) {
  /* Reduce padding on mobile */
  .mobile-px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mobile-py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Smaller text on mobile */
  .mobile-text-sm {
    font-size: 0.875rem;
  }

  /* Hide elements on mobile */
  .mobile-hidden {
    display: none;
  }

  /* Show only on mobile */
  .mobile-only {
    display: block;
  }

  /* Responsive images */
  .responsive-img {
    width: 100%;
    height: auto;
  }

  /* Mobile-friendly buttons */
  .mobile-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  /* Mobile form spacing */
  .mobile-form-spacing > * + * {
    margin-top: 1rem;
  }

  /* Sticky mobile navigation */
  .mobile-sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid #e5e7eb;
  }
}

/* Show only on desktop */
@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }

  .desktop-only {
    display: block;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
/* Focus states for better accessibility */
.focus-ring:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .header-nav-item {
    border: 1px solid transparent;
  }

  .header-nav-item:hover {
    border-color: currentColor;
  }
}

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

@keyframes toast-progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
