/* The visual picker (core/visuals.py, VisualRadioSelect): radio buttons as picture cards. Our own class names only,
   so Wagtail's admin styles can change around it without touching it. */
.eyc-visuals { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 4px 0; padding: 0; }
.eyc-visuals--icon { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.eyc-visuals--swatch { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.eyc-visual { position: relative; display: grid; gap: 6px; padding: 6px; border: 2px solid #d5deea; border-radius: 10px;
  background: #fff; color: #12294d; cursor: pointer; font-size: .8125rem; line-height: 1.25; }
.eyc-visual:hover { border-color: #5d6e88; }
.eyc-visual input { position: absolute; opacity: 0; pointer-events: none; }
.eyc-visual:has(input:checked) { border-color: #154d95; box-shadow: 0 0 0 2px #154d95; }
.eyc-visual:has(input:focus-visible) { outline: 3px solid #e5533d; outline-offset: 2px; }
.eyc-visual__pic { display: grid; place-items: center; height: 64px; border-radius: 6px; background: #f3f6fb; overflow: hidden; }
.eyc-visuals--icon .eyc-visual__pic { height: 56px; }
.eyc-visuals--swatch .eyc-visual__pic { height: 28px; background: none; }
.eyc-visual__pic img { max-width: 100%; max-height: 100%; }
.eyc-visual__pic i { display: block; width: 100%; height: 100%; border-radius: 6px; border: 1px solid rgb(0 0 0 / .12); }
.eyc-visual__pic b { color: #5d6e88; font-weight: 600; }
.eyc-visual__name { font-weight: 600; text-align: center; }
.eyc-visual:has(input:checked) .eyc-visual__name { color: #154d95; }
@media (prefers-color-scheme: dark) {
  .w-theme-system .eyc-visual, .w-theme-dark .eyc-visual { background: #1d2532; color: #e6edf6; border-color: #3a4658; }
}
.w-theme-dark .eyc-visual { background: #1d2532; color: #e6edf6; border-color: #3a4658; }
.w-theme-dark .eyc-visual:has(input:checked), .w-theme-dark .eyc-visual:has(input:checked) .eyc-visual__name { border-color: #78c2eb; color: #78c2eb; }
.w-theme-dark .eyc-visual:has(input:checked) { box-shadow: 0 0 0 2px #78c2eb; }
@media (prefers-color-scheme: dark) {
  .w-theme-system .eyc-visual:has(input:checked), .w-theme-system .eyc-visual:has(input:checked) .eyc-visual__name { border-color: #78c2eb; color: #78c2eb; }
  .w-theme-system .eyc-visual:has(input:checked) { box-shadow: 0 0 0 2px #78c2eb; }
}
