/* style.css - Nigerian Cancer Society Custom Styles */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-break-after {
    page-break-after: always;
  }
  
  .print-break-before {
    page-break-before: always;
  }
  
  .print-break-avoid {
    page-break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000 !important;
    background: #fff !important;
  }
  
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
  
  /* Hide interactive elements */
  nav, 
  .donate-button,
  .volunteer-button,
  .social-links {
    display: none !important;
  }
}

/* Accessibility Enhancements */
.focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .high-contrast-border {
    border: 1px solid currentColor;
  }
  
  .high-contrast-text {
    color: #000 !important;
  }
}

/* Custom text balance utility */
.text-balance {
  text-wrap: balance;
}

/* Updated gradient animation (matches Tailwind primary + secondary) */
.gradient-shift {
  background: linear-gradient(-45deg,
    #0ea5e9,  /* primary-500 */
    #22c55e,  /* secondary-500 */
    #0284c7,  /* primary-600 */
    #16a34a   /* secondary-600 */
  );
  background-size: 400% 400%;
  animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating animation for attention elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Custom selection colors (primary-500) */
::selection {
  background-color: #0ea5e9;
  color: white;
}

::-moz-selection {
  background-color: #0ea5e9;
  color: white;
}

/* Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #0ea5e9; /* primary-500 */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0284c7; /* primary-600 */
}

/* Loading state for buttons */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-right-color: transparent;
  animation: btn-spinner 0.75s linear infinite;
}

@keyframes btn-spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Custom focus styles for form elements */
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* Utility for screen readers only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Custom map placeholder styling (matching primary-100 + secondary-200) */
.map-placeholder {
  background: linear-gradient(135deg,
    #e0f2fe, /* primary-100 */
    #bbf7d0  /* secondary-200 */
  );
  position: relative;
}

.map-placeholder::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230ea5e9"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"/></svg>')
    center no-repeat;
  opacity: 0.1;
}
