

/* Whitelist Building Blocks Container - Scoped to config section */
.config-category .whitelist-building-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  grid-auto-rows: minmax(min-content, max-content);
}

/* Responsive Grid Layout */
@media (max-width: 1600px) {
  .config-category .whitelist-building-blocks {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .config-category .whitelist-building-blocks {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Individual Whitelist Building Block - Scoped */
.config-category .whitelist-building-block {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: fit-content;
  gap: 12px;
}

.config-category .whitelist-building-block:hover {
  transform: translateY(-2px);
}

/* Whitelist Header Layout - Scoped */
.config-category .whitelist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

/* Delete Whitelist Button - Scoped to match domain manager */
.config-category .delete-whitelist-btn {
  background: var(--status-danger);
  color: var(--text-primary);
  border: none;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.config-category .delete-whitelist-btn:hover {
  background: var(--status-danger-hover);
  transform: scale(1.05);
}

.config-category .delete-whitelist-btn.disabled {
  background: var(--text-muted);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.config-category .delete-whitelist-btn.disabled:hover {
  background: var(--text-muted);
  transform: none;
}

/* Delete Icon - Scoped */
.config-category .delete-icon {
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

/* Whitelist Input Fields - Scoped */
.config-category .whitelist-input {
  flex: 1;
  min-width: 0;
}

/* Whitelist Empty State - Scoped */
.config-category .whitelist-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: var(--card-bg);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
}

.config-category .whitelist-empty-state p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.5;
}

/* Whitelist Actions Container - Scoped */
.config-category .whitelist-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  padding: 10px 0;
}

/* Add Whitelist Entry Button - Scoped */
.config-category .whitelist-actions .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.config-category .whitelist-actions .btn-primary {
  background: var(--primary-color, var(--accent));
  color: var(--text-primary);
}

.config-category .whitelist-actions .btn-primary:hover {
  background: var(--primary-hover, var(--accent-hover));
  transform: translateY(-1px);
}

.config-category .whitelist-actions .btn-secondary {
  background: var(--secondary-color, var(--text-muted));
  color: var(--text-primary);
  cursor: not-allowed;
}

.config-category .whitelist-actions .btn-secondary:hover {
  background: var(--secondary-hover, var(--text-muted));
  transform: none;
}

/* Add Icon - Scoped */
.config-category .add-icon {
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}

/* Field Group Styling for Whitelist - Scoped */
.config-category .whitelist-building-block .field-group {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.config-category .whitelist-building-block .field-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-color);
  font-size: 14px;
}

.config-category .whitelist-building-block .form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 14px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.config-category .whitelist-building-block .form-control:focus {
  outline: none;
  border-color: var(--primary-color, var(--accent));
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.25);
}

.config-category .whitelist-building-block .form-control.error {
  border-color: var(--status-danger);
}

.config-category .whitelist-building-block .field-description {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Flash Animation for Validation - Scoped */
@keyframes whitelist-flash {
  0%, 100% { 
    background-color: transparent; 
    border-color: var(--border-color);
  }
  50% { 
    background-color: rgba(var(--status-danger-rgb), 0.1); 
    border-color: var(--status-danger);
  }
}

.config-category .whitelist-building-block.flash {
  animation: whitelist-flash 0.5s ease-in-out 2;
}

.config-category .whitelist-input.flash {
  animation: whitelist-flash 0.5s ease-in-out 2;
}

/* Responsive Adjustments - Scoped */
@media (max-width: 600px) {
  .config-category .whitelist-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .config-category .delete-whitelist-btn {
    align-self: flex-end;
    margin-top: 8px;
  }
  
  .config-category .whitelist-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
