/* ============================================
   OPTION GROUP - Premium Food Delivery Design
   ============================================ */

.option-group {
  margin-bottom: 1.75rem;
}

.option-group:last-child {
  margin-bottom: 0;
}

/* Header */
.option-header {
  margin-bottom: 0.875rem;
}

.option-title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.25rem;
}

.option-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  letter-spacing: -0.01em;
}

.option-hint {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* Badges */
.badge-required {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.375rem;
}

.badge-optional {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
}

/* Choice List */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Choice Card */
.choice-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.choice-card:hover {
  border-color: #d1d5db;
  background: #fafafa;
}

/* Hidden Input */
.choice-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
  top: 0;
  left: 0;
}

/* Card Content Layout */
.choice-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

/* Selection Indicators */
.choice-indicator {
  flex-shrink: 0;
}

/* Radio Button (Single Select) */
.indicator-radio {
  width: 20px;
  height: 20px;
  border: 1.5px solid #d1d5db;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: all 0.15s ease;
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s ease;
}

/* Checkbox (Multi Select) */
.indicator-checkbox {
  width: 20px;
  height: 20px;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: all 0.15s ease;
}

.indicator-check {
  width: 12px;
  height: 12px;
  color: white;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Choice Details */
.choice-details {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.choice-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  display: block;
  line-height: 1.3;
  text-align: left;
}

/* Price Styling */
.choice-price {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  margin-left: auto;
}

.price-regular {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
}

.price-discounted {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color, #007B83);
}

.price-original {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.price-free {
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
}

/* ============================================
   SELECTED STATE
   ============================================ */

/* Card Selected */
.choice-card:has(.choice-input:checked) {
  border-color: var(--primary-color, #007B83);
  background: rgba(0, 123, 131, 0.03);
}

.choice-card:has(.choice-input:checked):hover {
  border-color: var(--primary-color, #007B83);
  background: rgba(0, 123, 131, 0.05);
}

/* Radio Selected */
.choice-input:checked ~ .choice-content .indicator-radio {
  border-color: var(--primary-color, #007B83);
}

.choice-input:checked ~ .choice-content .indicator-dot {
  background: var(--primary-color, #007B83);
}

/* Checkbox Selected */
.choice-input:checked ~ .choice-content .indicator-checkbox {
  border-color: var(--primary-color, #007B83);
  background: var(--primary-color, #007B83);
}

.choice-input:checked ~ .choice-content .indicator-check {
  opacity: 1;
}

/* Text Enhancement on Selection */
.choice-input:checked ~ .choice-content .choice-name {
  color: #1f2937;
}

/* ============================================
   HOVER STATES
   ============================================ */

.choice-card:hover .indicator-radio,
.choice-card:hover .indicator-checkbox {
  border-color: #9ca3af;
}

.choice-card:has(.choice-input:checked):hover .indicator-radio {
  border-color: var(--primary-color, #007B83);
}

.choice-card:has(.choice-input:checked):hover .indicator-checkbox {
  border-color: var(--primary-color, #007B83);
  background: var(--primary-color, #007B83);
}

/* ============================================
   FOCUS & ACCESSIBILITY
   ============================================ */

.choice-card:focus-within {
  outline: none;
}

/* ============================================
   FALLBACK FOR BROWSERS WITHOUT :has()
   ============================================ */

/* JavaScript will add .is-selected class as fallback */
.choice-card.is-selected {
  border-color: var(--primary-color, #007B83);
  background: rgba(0, 123, 131, 0.03);
}

.choice-card.is-selected .indicator-radio {
  border-color: var(--primary-color, #007B83);
}

.choice-card.is-selected .indicator-dot {
  background: var(--primary-color, #007B83);
}

.choice-card.is-selected .indicator-checkbox {
  border-color: var(--primary-color, #007B83);
  background: var(--primary-color, #007B83);
}

.choice-card.is-selected .indicator-check {
  opacity: 1;
}

.choice-card.is-selected .choice-name {
  color: #1f2937;
}

/* ============================================
   RTL SUPPORT
   ============================================ */

[dir="rtl"] .choice-name,
[dir="rtl"] .choice-details {
  text-align: right;
}

[dir="rtl"] .option-title,
[dir="rtl"] .option-hint {
  text-align: right;
}

[dir="rtl"] .choice-price {
  margin-left: 0;
  margin-right: auto;
}

