/* ============================================================
   globals.css — Jesus Calls Ministries
   Supplementary styles for the Tailwind-based site.
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
  --color-primary-dark: #7B1E7A;
  --color-dark-amethyst: #0C0A3E;
  --color-berry-crush: #B33F62;
  --color-vibrant-coral: #F9564F;
  --color-apricot-cream: #F3C677;
  --color-white: #FFFFFF;
  --color-light-grey: #F5F5F5;
  --color-body-text: #0C0A3E;
}

/* ----- Reset / Normalize Basics ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Ensure links are distinguishable per WCAG — underline on hover/focus */
a:hover,
a:focus {
  text-decoration: underline;
}

/* Nav and footer links already use color + weight; skip underline there */
nav a:hover,
nav a:focus,
footer a:hover,
footer a:focus {
  text-decoration: none;
}

/* ----- Smooth Scroll ----- */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Prevent body scroll when mobile drawer is open */
body.nav-open {
  overflow: hidden;
}

/* ----- Honeypot (anti-bot) ----- */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
  tab-size: 0;
}

/* ============================================================
   Loading Skeleton Animation (Promise Cards)
   ============================================================ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: 8px;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 10px;
  width: 80%;
}

.skeleton-text.short {
  width: 40%;
}

.skeleton-title {
  height: 20px;
  margin-bottom: 12px;
  width: 60%;
}

.skeleton-image {
  width: 200px;
  min-height: 160px;
  flex-shrink: 0;
}

/* ============================================================
   Featured Event Banner (dynamic)
   ============================================================ */
#featured-event-banner {
  display: none;
}

#featured-event-banner.is-active {
  display: flex;
}

/* ============================================================
   Form Validation Visual Feedback
   ============================================================ */
.field-error {
  border-color: var(--color-vibrant-coral) !important;
  box-shadow: 0 0 0 2px rgba(249, 86, 79, 0.15);
}

.error-message {
  color: var(--color-vibrant-coral);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.error-message.is-visible {
  display: block;
}

/* ============================================================
   Donation Page — Amount & Payment Tabs
   ============================================================ */
.amount-btn.is-selected {
  background-color: var(--color-berry-crush) !important;
  color: var(--color-white) !important;
}

.payment-tab.is-selected {
  background-color: var(--color-berry-crush) !important;
  color: var(--color-white) !important;
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
  nav,
  footer,
  button[type="submit"],
  #featured-event-banner,
  iframe,
  video {
    display: none !important;
  }

  body {
    color: #000 !important;
    background: #fff !important;
    font-size: 12pt;
    line-height: 1.5;
  }

  section {
    background: transparent !important;
    padding: 16px 0 !important;
    break-inside: avoid;
  }

  h1, h2, h3 {
    color: #000 !important;
    break-after: avoid;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 10pt;
    color: #555;
  }

  img {
    max-width: 100% !important;
    break-inside: avoid;
  }
}
