/* Addon Limits Styles */
.wfs-addons-element-block[data-limit] {
  position: relative;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
  background: #fafbfc;
}

/* Title styling for limited categories */
.wfs-addons-element-block[data-limit] .wfs-addon-category-title {
  position: relative;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
  margin-bottom: 15px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Limit info styling */
.wfs-addon-limit-info {
  font-size: 0.85em;
  font-weight: 400;
  color: #7f8c8d;
  background: #ecf0f1;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #bdc3c7;
  margin-left: 8px;
  white-space: nowrap;
}

/* Selection counter */
.wfs-selection-counter {
  background: #3498db;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  min-width: 35px;
  text-align: center;
  transition: all 0.3s ease;
}

.wfs-selection-counter.at-limit {
  background: #e74c3c;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Disabled checkbox styling */
.wfs-addon-category input[type="checkbox"]:disabled + span {
  opacity: 0.5;
  color: #999;
  text-decoration: line-through;
  cursor: not-allowed;
}

.wfs-addon-category input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

/* Disabled addon items (enhanced) */
.wfs-disabled {
  opacity: 0.4;
  position: relative;
  pointer-events: none;
}

.wfs-disabled input[type="checkbox"] {
  cursor: not-allowed !important;
}

.wfs-disabled label {
  cursor: not-allowed !important;
  color: #999 !important;
}

/* Add subtle overlay for disabled items */
.wfs-disabled::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 1;
  border-radius: 4px;
}

/* Disabled item text styling */
.wfs-disabled .wfs-addon-item-name,
.wfs-disabled .wfs-addon-item-price {
  text-decoration: line-through;
  color: #ccc !important;
}

/* Selected items styling */
.wfs-addon-category input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: #27ae60;
}

/* Limit message */
.wfs-limit-message {
  color: #e74c3c !important;
  font-size: 12px !important;
  margin-top: 8px !important;
  padding: 6px 10px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  animation: fadeIn 0.3s ease-in;
}

.wfs-limit-message::before {
  content: "⚠";
  margin-right: 6px;
  font-weight: bold;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animation for state changes */
.wfs-addon-category input[type="checkbox"] + span,
.wfs-addon-category input[type="checkbox"]:disabled + span {
  transition: all 0.3s ease;
}

/* Required addon categories */
.wfs-addons-element-block.wfs-addon-required {
  border-color: #f39c12;
}

.wfs-addons-element-block.wfs-addon-required .wfs-addon-category-title {
  border-bottom-color: #f39c12;
}

.wfs-addons-element-block.wfs-addon-required .wfs-addon-category-title::after {
  content: " *";
  color: #e74c3c;
  font-weight: bold;
}

/* Hover effects */
.wfs-addon-category:hover {
  background: rgba(52, 152, 219, 0.05);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.wfs-addon-category label {
  cursor: pointer;
  padding: 5px;
  display: block;
  border-radius: 4px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .wfs-addons-element-block[data-limit] {
    padding: 10px;
    margin-bottom: 15px;
  }
  
  .wfs-addon-category-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .wfs-selection-counter {
    align-self: flex-end;
  }
}
