/* Container for gender buttons */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Match previous 20px gap */
  justify-content: flex-start; /* or center, if needed */
}

/* Gender selection buttons */
.selection-btn {
  flex: 1 1 calc(33.333% - 20px);
  max-width: calc(33.333% - 20px);

  background-color: #f5f5f5;
  border: 1px solid #ccc;
  color: #333;

  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  padding: 15px 12px;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  font-weight: 600;
  font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  /* Smooth transition for background, border, color */
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  white-space: normal; /* Allow text wrap */
  word-break: break-word;
}

/* Buttons with images */
.selection-btn img {
  width: 80px;
  height: auto;
  margin-bottom: 12px;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Selected state */
.selection-btn.selected {
  background-color: #08a; /* match your original primary */
  border-color: #005177;
  color: #fff !important;
}

/* Hover / focus */
.selection-btn:not(.selected):hover,
.selection-btn:not(.selected):focus {
  background-color: #e4f0f9;  /* exact original hover background */
  border-color: #0073aa;      /* exact original hover border */
  color: #333;
  outline: none;
}

/* Focus visible for accessibility */
.selection-btn:focus-visible {
  outline: 3px solid #0073aa;
  outline-offset: 2px;
}

/* Responsive: 2 per row tablet and smaller */
@media (max-width: 768px) {
  .selection-btn {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

/* Mobile phones: full width stacked buttons */
@media (max-width: 480px) {
  .selection-btn {
    flex: 1 1 100%;
    max-width: 100%;
    font-size: 16px;
    padding: 14px 10px;
  }
  .selection-btn img {
    width: 70px;
    margin-bottom: 10px;
  }
}


/* Name input box styling */
#pinyin {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 20px 0;
  padding: 10px 12px;
  font-size: 16px;
  font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

#pinyin:focus {
  border-color: #0073aa;
  outline: none;
}

#checkout_button {
  display: block;          /* makes the button act as block element */
  margin: 20px auto 0;     /* centers horizontally (left + right auto), add top margin */
  width: max-content;      /* shrink width to button content */
}

#checkout_buttons_container {
  display: flex;
  gap: 10px; /* space between buttons */
  justify-content: center; /* center buttons horizontally */
}
