/* accessibility.css */

/* Increase outline visibility */
:focus {
  outline: 3px solid var(--nl-green-light);
  outline-offset: 3px;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px var(--nl-green-light);
}

/* Improve contrast for links & buttons */
body {
  background-color: var(--nl-white);
  color: var(--grey-700);
}

a,
button,
input,
textarea,
select {
  color: var(--grey-700);
  background-color: var(--nl-white);
  font-weight: 600;
}

a:hover,
button:hover {
  color: var(--nl-green-dark);
}

/* High contrast for important messages */
.alert,
.error,
.success {
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-100);
  margin-bottom: 1rem;
}
.alert.error {
  background-color: #ffe6e6;
  color: #800000;
}
.alert.success {
  background-color: #e6ffe6;
  color: #006600;
}
/*Simple form‑error state */
.invalid {
  background: #ffecec;
  border-color: #e44d4d;
}

/* Simple form‑success state */
.valid {
  background: #e6ffec;
  border-color: #4caf50;
}
/* 3. Avoid Removing Focus */
button,
a,
input,
select,
textarea {
  /* Disallow outline removal */
  outline: none;
}
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 3px solid var(--nl-green-light);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .search-box {
    margin: 1rem 0;
    max-width: 100%;
  }
  .search-icon,
  .clear-search,
  .search-input-wrapper .search-icon,
  .search-input-wrapper .clear-search {
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  .search-input-wrapper input,
  .search-box input {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* 4. Semantic Labeling */
label {
  display: inline-block;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 5. Respect User Preferences: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Responsive: on smaller screens, ensure modal width fits */
@media (max-width: 480px) {
  .modal {
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* -------------------------
    Tabels
   -------------------------*/

@media (max-width: 48rem) {
  table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em auto;
    font-size: var(--fs-100);
    font-family: var(--font-base);
    background-color: var(--grey-100);
    color: black;
  }
  th,
  td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
  }
  th {
    background-color: #f4f4f4;
  }
  tr:nth-child(even) {
    background-color: #fafafa;
  }
}

@media (max-width: 768px) {
  .video-container iframe {
    height: 250px;
  }
}

/* Responsive: 2 columns on tablets, 1 on mobile */
@media (max-width: 900px) {
  .blog-grid,
  .pricing {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
  .pricing-cards .pricing-card,
  .pricing .card {
    padding: 2rem 1.5rem !important;
    min-height: 450px !important;
  }
  .pricing-cards .pricing-card.featured,
  .pricing .card.featured {
    transform: scale(1.02) !important;
  }

  .pricing-cards .pricing-card.featured:hover,
  .pricing .card.featured:hover {
    transform: translateY(-8px) scale(1.04) !important;
  }
  .pricing-section {
    padding: 2rem 0.5rem !important;
  }
}

/* 6. Increase Touch Target Size for Interactives */
button,
input[type="checkbox"],
input[type="radio"],
a {
  min-height: 44px;
  min-width: 44px;
}

/* 7. Form Control Contrast Overrides (for autofill) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  box-shadow: 0 0 0px 1000px var(--nl-white) inset !important;
  -webkit-text-fill-color: var(--grey-700) !important;
}

/* Force visible labels for screen readers */
label {
  font-weight: 500;
  display: inline-block;
  margin-bottom: 0.25rem;
}

/* Increase touch target sizes */
input[type="checkbox"],
input[type="radio"],
button {
  min-height: 44px;
  min-width: 44px;
}

/* Visually hidden text helper (for screen readers) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

Accessible skip‑link */ .skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  padding: 0.5em 1em;
  background: var(--nl-green-dark);
  color: var(--nl-white);
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}
