/* Custom Radio Button Groups */
.custom-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.custom-radio-option {
  position: relative;
  cursor: pointer;
}

.custom-radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-radio-card {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.15s ease-out;
  background: #ffffff;
}

.custom-radio-card:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.custom-radio-option input[type="radio"]:checked + .custom-radio-card {
  border-color: #3b82f6;
  background: #eff6ff;
}

.custom-radio-option input[type="radio"]:focus + .custom-radio-card {
  ring: 2px solid #3b82f6;
  ring-offset: 2px;
}

.custom-radio-content {
  flex: 1;
  margin-left: 0.75rem;
}

.custom-radio-title {
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.25rem;
}

.custom-radio-description {
  font-size: 0.875rem;
  color: #6b7280;
}

.custom-radio-indicator {
  margin-left: 0.5rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.custom-radio-option input[type="radio"]:checked + .custom-radio-card .custom-radio-indicator {
  border-color: #3b82f6;
  background: #3b82f6;
}

.custom-radio-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0;
}

.custom-radio-option input[type="radio"]:checked + .custom-radio-card .custom-radio-dot {
  opacity: 1;
}

/* Custom Checkbox Groups */
.custom-checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  max-height: 15rem;
  overflow-y: auto;
}

.custom-checkbox-option {
  position: relative;
  cursor: pointer;
}

.custom-checkbox-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-checkbox-card {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  transition: all 0.15s ease-out;
  background: #ffffff;
}

.custom-checkbox-card:hover {
  border-color: #d1d5db;
}

.custom-checkbox-option input[type="checkbox"]:checked + .custom-checkbox-card {
  border-color: #3b82f6;
  background: #eff6ff;
}

.custom-checkbox-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.custom-checkbox-indicator {
  margin-left: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.125rem;
  flex-shrink: 0;
}

.custom-checkbox-option input[type="checkbox"]:checked + .custom-checkbox-card .custom-checkbox-indicator {
  border-color: #3b82f6;
  background: #3b82f6;
}

/* Compact styles for smaller items */
.custom-radio-compact .custom-radio-card {
  padding: 0.75rem;
}

.custom-radio-compact .custom-radio-title {
  font-size: 0.875rem;
}

.custom-radio-compact .custom-radio-description {
  font-size: 0.75rem;
}

.custom-radio-compact .custom-radio-indicator {
  width: 0.75rem;
  height: 0.75rem;
}

.custom-radio-compact .custom-radio-dot {
  width: 0.375rem;
  height: 0.375rem;
}

/* Active state animations */
.custom-radio-card:active,
.custom-checkbox-card:active {
  transform: scale(0.99);
}

/* Focus styles for accessibility */
.custom-radio-option input[type="radio"]:focus-visible + .custom-radio-card,
.custom-checkbox-option input[type="checkbox"]:focus-visible + .custom-checkbox-card {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}