/* public-forms-children.css
   Public forms: children picker grid, cards and extra spread styling. */

#children-grid-section .child-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  text-decoration: none;
  color: inherit;
}

#children-grid-section .child-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: var(--fx-bg);
}

#children-grid-section .child-thumb--loading {
  min-height: 200px;
  background: #f5f5f5;
}

#children-grid-section .child-thumb .child-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

#children-grid-section .child-meta {
  width: 100%;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
}

#children-grid-section .child-pay-badge {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, .12);
}

:root {
  --extra-accent: var(--bs-primary, #7C5CFC);
  --extra-bg: var(--fx-bg, #F3EFFF);
  --extra-border: var(--fx-border, #A08BFF);
}

#children-grid-section .bg-extra {
  background-color: var(--fx-extra-accent);
  color: var(--fx-card);
}

#children-grid-section section.extra-spread {
  position: relative;
  border: 2px dashed var(--extra-border);
  border-radius: 16px;
  background: var(--extra-bg);
  overflow: hidden;
}

#children-grid-section section.extra-spread .card-2025 {
  background: var(--extra-bg, #f8f9fa);
  border: 4px dashed var(--extra-border, #6c757d);
  border-radius: 24px;
  box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.1);
  padding: 16px;
}

#children-grid-section section.extra-spread::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 24 24' fill='none' stroke='%237C5CFC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'>\
  <rect x='3' y='4' width='18' height='16' rx='3'/>\
  <path d='M3 10h18'/>\
  <path d='M8 14h8'/>\
  </svg>");
  background-repeat: no-repeat;
  background-position: right -20px bottom -10px;
  background-size: 200px;
  opacity: .06;
  pointer-events: none;
}

#children-grid-section .price-badge {
  background: var(--fx-card);
  border: 1px solid var(--extra-border);
  color: var(--fx-extra-accent);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
  line-height: 1;
}

#children-grid-section section.extra-spread:hover,
#children-grid-section section.extra-spread:focus-within {
  border-color: var(--fx-extra-accent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --extra-bg: #2a2440;
    --extra-border: #9c8cff;
  }

  #children-grid-section .price-badge {
    background: var(--fx-card);
    color: var(--fx-extra-accent);
  }
}

@media print {
  #children-grid-section section.extra-spread {
    border-style: solid;
  }
}
