/*
 * Seletor de tamanho e ciclo da seção #precos (opções montadas por
 * plans.js). Mesma linguagem do checkout: opção chapada, a escolhida em
 * Verde tinta com contorno verde e o check desenhado, nunca só cor.
 */

.capacity-picker {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.capacity-picker legend {
  width: 100%;
  margin-bottom: 4px;
  padding: 0;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.capacity-guidance {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.capacity-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 8px;
}

.capacity-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.capacity-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  opacity: 0;
  clip: rect(0 0 0 0);
}

.capacity-choice {
  position: relative;
  display: flex;
  min-height: 84px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  transition:
    border-color 0.18s var(--ease-out),
    background-color 0.18s var(--ease-out);
}

.capacity-size {
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.capacity-unit,
.capacity-price {
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 600;
}

.capacity-price {
  margin-top: 4px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* "Melhor custo por pessoa": rótulo de texto em cima da opção. */
.capacity-best-value {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 8px;
  border-radius: var(--r-chip);
  border: 1px solid var(--border-strong);
  background: var(--raised);
  color: var(--text-2);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.capacity-option:hover .capacity-choice {
  border-color: var(--border-strong);
}

.capacity-option input:focus-visible + .capacity-choice {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.capacity-option input:checked + .capacity-choice {
  border-color: var(--green);
  background: var(--green-ink);
}

.capacity-option input:checked + .capacity-choice .capacity-unit,
.capacity-option input:checked + .capacity-choice .capacity-price {
  color: var(--green-300);
}

.capacity-option input:checked + .capacity-choice::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--green)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306130B' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

.cycle-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cycle-options .capacity-size {
  font-size: 1.125rem;
}

@media (max-width: 520px) {
  .capacity-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .capacity-choice {
    transition: none;
  }
}
