/* MSW — korekta czytelności kart 1.0.1.
   Celowo ograniczona do klas komponentów MSW: bez nadpisywania kart
   innych wtyczek i bez zmian w panelu administracyjnym. */

:root {
  --msw-fix-card-bg: #102442;
  --msw-fix-card-bottom: #0a1930;
  --msw-fix-card-title: #f5f9ff;
  --msw-fix-card-text: #d6e4f9;
  --msw-fix-card-link: #67e8f9;
  --msw-fix-card-border: rgba(151, 199, 255, .24);
  --msw-fix-card-focus: #ffd166;
}

/* Zrzut: strona „Katalog usług MSW — 42 specjalizacje”.
   msw-card, msw-card-top, msw-badge, msw-actions, msw-link są
   rzeczywistymi klasami elementów strony. */
body :is(article.msw-card, .msw-card, .msw-service-card, .msw-tool-card, .msw-form-card) {
  background: linear-gradient(155deg, var(--msw-fix-card-bg), var(--msw-fix-card-bottom)) !important;
  background-color: var(--msw-fix-card-bg) !important;
  border: 1px solid var(--msw-fix-card-border) !important;
  color: var(--msw-fix-card-text) !important;
  box-shadow: 0 12px 30px rgba(1, 8, 24, .24);
}

body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card)
:is(h2, h3, h4, h5, .msw-card-title, .msw-card-top h3) {
  color: var(--msw-fix-card-title) !important;
  text-shadow: none !important;
}
body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card)
:is(p, li, small, label, .msw-card-description, .msw-card-text) {
  color: var(--msw-fix-card-text) !important;
  opacity: 1 !important;
}

body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card) .msw-badge,
body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card) .msw-badge.muted {
  background: rgba(39, 211, 187, .17) !important;
  border: 1px solid rgba(70, 228, 206, .27) !important;
  color: #baffee !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card)
:is(a.msw-link, .msw-actions a, a.msw-link.action) {
  color: var(--msw-fix-card-link) !important;
  text-decoration-color: currentColor !important;
  opacity: 1 !important;
  text-underline-offset: 4px;
}
body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card) a:hover {
  color: #ffffff !important;
}
body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card)
:is(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--msw-fix-card-focus) !important;
  outline-offset: 3px;
}

/* Pola umieszczone wewnątrz ciemnych kart pozostają czytelne,
   zamiast mieć jasny tekst na białym polu. */
body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card)
:is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  background: #f7fbff !important;
  color: #12233e !important;
  border-color: #8faac9 !important;
}
body :is(.msw-card, .msw-service-card, .msw-tool-card, .msw-form-card)
:is(input, textarea)::placeholder {
  color: #526681 !important;
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  body :is(.msw-card, .msw-service-card, .msw-tool-card) {
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  body :is(.msw-card, .msw-service-card, .msw-tool-card):hover {
    border-color: rgba(103, 232, 249, .46) !important;
    box-shadow: 0 14px 32px rgba(1, 8, 24, .34);
  }
}
