/**
 * Ruleset Selector Component Styles
 * 
 * Styles for the ruleset selection modal and inline variants.
 * Follows Bootstrap 5 patterns and game design system.
 */

/* Modal container */
#rulesetSelectorModal .modal-dialog {
  max-width: 500px;
}

#rulesetSelectorModal .modal-body {
  padding: 1.5rem;
  max-height: 60vh;
}

/* Ruleset options container */
.ruleset-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Individual ruleset option */
.ruleset-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--bs-body-bg, #fff);
}

.ruleset-option:hover {
  border-color: var(--bs-primary, #0d6efd);
  background-color: var(--bs-light, #f8f9fa);
}

.ruleset-option:focus-within {
  border-color: var(--bs-primary, #0d6efd);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  outline: none;
}

/* Selected state */
.ruleset-option:has(input:checked) {
  border-color: var(--bs-primary, #0d6efd);
  background-color: rgba(13, 110, 253, 0.05);
}

/* Radio input */
.ruleset-option .form-check-input {
  flex-shrink: 0;
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

/* Label */
.ruleset-option .form-check-label {
  flex: 1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Title */
.ruleset-option-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--bs-body-color, #212529);
  display: block;
}

/* Description */
.ruleset-option-desc {
  font-size: 0.875rem;
  color: var(--bs-secondary, #6c757d);
  display: block;
  line-height: 1.4;
}

/* Mobile optimizations */
@media (max-width: 575.98px) {
  #rulesetSelectorModal .modal-dialog {
    margin: 0.5rem;
  }

  #rulesetSelectorModal .modal-body {
    padding: 1rem;
    max-height: 70vh;
  }

  .ruleset-option {
    padding: 0.875rem;
    gap: 0.625rem;
  }

  .ruleset-option-title {
    font-size: 0.9375rem;
  }

  .ruleset-option-desc {
    font-size: 0.8125rem;
  }
}

/* Tablet optimizations */
@media (min-width: 576px) and (max-width: 767.98px) {
  #rulesetSelectorModal .modal-dialog {
    max-width: 90%;
  }
}

/* Keyboard navigation focus styles */
.ruleset-option .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Accessibility: high contrast mode support */
@media (prefers-contrast: high) {
  .ruleset-option {
    border-width: 3px;
  }

  .ruleset-option:has(input:checked) {
    border-width: 3px;
    background-color: rgba(13, 110, 253, 0.15);
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .ruleset-option {
    transition: none;
  }
}

/* Loading state (optional enhancement) */
.ruleset-options.loading {
  opacity: 0.6;
  pointer-events: none;
}

.ruleset-options.loading::after {
  content: "Loading rulesets...";
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--bs-secondary, #6c757d);
}

/* Empty state */
.ruleset-options:empty::before {
  content: "No rulesets available";
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--bs-secondary, #6c757d);
}
